Search in sources :

Example 1 with SQLFullLineRule

use of org.jkiss.dbeaver.ui.editors.sql.syntax.rules.SQLFullLineRule in project dbeaver by dbeaver.

the class ExasolSQLDialect method extendRules.

@Override
public void extendRules(@NotNull List<IRule> rules, @NotNull SQLRuleProvider.RulePosition position) {
    if (position == SQLRuleProvider.RulePosition.CONTROL) {
        final SQLControlToken defineToken = new SQLControlToken(new TextAttribute(UIUtils.getGlobalColor(SQLConstants.CONFIG_COLOR_COMMAND), null, SWT.BOLD), "exasol.define");
        // $NON-NLS-1$
        SQLFullLineRule defineRule = new SQLFullLineRule("define", defineToken);
        rules.add(defineRule);
        // $NON-NLS-1$
        SQLFullLineRule defineRule2 = new SQLFullLineRule("DEFINE", defineToken);
        rules.add(defineRule2);
    }
}
Also used : SQLFullLineRule(org.jkiss.dbeaver.ui.editors.sql.syntax.rules.SQLFullLineRule) TextAttribute(org.eclipse.jface.text.TextAttribute) SQLControlToken(org.jkiss.dbeaver.ui.editors.sql.syntax.tokens.SQLControlToken)

Example 2 with SQLFullLineRule

use of org.jkiss.dbeaver.ui.editors.sql.syntax.rules.SQLFullLineRule in project dbeaver by dbeaver.

the class MySQLDialect method extendRules.

@Override
public void extendRules(@NotNull List<IRule> rules, @NotNull RulePosition position) {
    if (position == RulePosition.CONTROL) {
        final SQLControlToken sourceToken = new SQLControlToken(new TextAttribute(UIUtils.getGlobalColor(SQLConstants.CONFIG_COLOR_COMMAND), null, SWT.BOLD), "mysql.source");
        // $NON-NLS-1$
        SQLFullLineRule sourceRule2 = new SQLFullLineRule("SOURCE", sourceToken);
        rules.add(sourceRule2);
    }
}
Also used : SQLFullLineRule(org.jkiss.dbeaver.ui.editors.sql.syntax.rules.SQLFullLineRule) TextAttribute(org.eclipse.jface.text.TextAttribute) SQLControlToken(org.jkiss.dbeaver.ui.editors.sql.syntax.tokens.SQLControlToken)

Aggregations

TextAttribute (org.eclipse.jface.text.TextAttribute)2 SQLFullLineRule (org.jkiss.dbeaver.ui.editors.sql.syntax.rules.SQLFullLineRule)2 SQLControlToken (org.jkiss.dbeaver.ui.editors.sql.syntax.tokens.SQLControlToken)2