Java Code Examples for org.eclipse.xtext.ui.editor.syntaxcoloring.IHighlightingConfigurationAcceptor#acceptDefaultHighlighting()
The following examples show how to use
org.eclipse.xtext.ui.editor.syntaxcoloring.IHighlightingConfigurationAcceptor#acceptDefaultHighlighting() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HighlightingConfiguration.java From n4js with Eclipse Public License 1.0 | 6 votes |
@Override public void configure(IHighlightingConfigurationAcceptor acceptor) { // acceptor.acceptDefaultHighlighting(KEYWORD_ID, "Keyword", keywordTextStyle()); acceptor.acceptDefaultHighlighting(PUNCTUATION_ID, "Punctuation character", punctuationTextStyle()); acceptor.acceptDefaultHighlighting(COMMENT_ID, "Comment", commentTextStyle()); acceptor.acceptDefaultHighlighting(TASK_ID, "Task Tag", taskTextStyle()); acceptor.acceptDefaultHighlighting(STRING_ID, "String", stringTextStyle()); acceptor.acceptDefaultHighlighting(NUMBER_ID, "Number", numberTextStyle()); acceptor.acceptDefaultHighlighting(DEFAULT_ID, "Default", defaultTextStyle()); acceptor.acceptDefaultHighlighting(INVALID_TOKEN_ID, "Invalid Symbol", errorTextStyle()); acceptor.acceptDefaultHighlighting(REGEX_ID, "Regular Expression", regExTextStyle()); acceptor.acceptDefaultHighlighting(TEMPLATE_ID, "Template Text", literalTextStyle()); acceptor.acceptDefaultHighlighting(TEMPLATE_DELIMITER_ID, "Template Delimiter", templateDelimiterTextStyle()); acceptor.acceptDefaultHighlighting(ANNOTATION_ID, "Annotation", annotationTextStyle()); acceptor.acceptDefaultHighlighting(TYPE_REF_ID, "Type Reference", typeRefTextStyle()); acceptor.acceptDefaultHighlighting(IDENTIFIER_ID, "Identifier", defaultTextStyle()); acceptor.acceptDefaultHighlighting(IDENTIFIER_REF_ID, "Reference", defaultTextStyle()); acceptor.acceptDefaultHighlighting(TYPE_VARIABLE_ID, "Type Variable", defaultTextStyle()); acceptor.acceptDefaultHighlighting(JS_DOC_ID, "JSDoc Comment", jsDocTextStyle()); acceptor.acceptDefaultHighlighting(ES5_KW_ID, "ES5 Keywords", keywordTextStyle()); acceptor.acceptDefaultHighlighting(ES6_KW_ID, "ES6 Keywords", keywordTextStyle()); acceptor.acceptDefaultHighlighting(FUTURE_KW_ID, "Reserved words", keywordTextStyle()); acceptor.acceptDefaultHighlighting(N4JS_KW_ID, "N4JS Keywords", keywordTextStyle()); acceptor.acceptDefaultHighlighting(NULL_LITERAL_ID, "Null literals", keywordTextStyle()); acceptor.acceptDefaultHighlighting(BOOLEAN_LITERAL_ID, "Boolean literals", keywordTextStyle()); }
Example 2
Source File: GamlHighlightingConfiguration.java From gama with GNU General Public License v3.0 | 6 votes |
@Override public void configure(final IHighlightingConfigurationAcceptor acceptor) { acceptor.acceptDefaultHighlighting(KEYWORD_ID, "Statement keywords", keywordTextStyle()); acceptor.acceptDefaultHighlighting(PUNCTUATION_ID, "Punctuation characters", punctuationTextStyle()); acceptor.acceptDefaultHighlighting(OPERATOR_ID, "Operators & action calls", operatorTextStyle()); acceptor.acceptDefaultHighlighting(RESERVED_ID, "Reserved symbols", reservedTextStyle()); acceptor.acceptDefaultHighlighting(COMMENT_ID, "Comments", commentTextStyle()); acceptor.acceptDefaultHighlighting(STRING_ID, "Strings", stringTextStyle()); acceptor.acceptDefaultHighlighting(NUMBER_ID, "Literal constants", numberTextStyle()); acceptor.acceptDefaultHighlighting(DEFAULT_ID, "Default", defaultTextStyle()); acceptor.acceptDefaultHighlighting(FACET_ID, "Facet keys", facetTextStyle()); acceptor.acceptDefaultHighlighting(VARIABLE_ID, "Variables used in expressions", variableTextStyle()); acceptor.acceptDefaultHighlighting(VARDEF_ID, "Variables definitions", varDefTextStyle()); acceptor.acceptDefaultHighlighting(TYPE_ID, "Type", typeTextStyle()); acceptor.acceptDefaultHighlighting(ASSIGN_ID, "Assignment signs", assignTextStyle()); acceptor.acceptDefaultHighlighting(UNIT_ID, "Unit names", unitTextStyle()); acceptor.acceptDefaultHighlighting(TASK_ID, "Tasks", taskTextStyle()); acceptor.acceptDefaultHighlighting(PRAGMA_ID, "Pragma", pragmaTextStyle()); }
Example 3
Source File: SleighHighlightingConfiguration.java From ghidra with Apache License 2.0 | 5 votes |
public void addType(IHighlightingConfigurationAcceptor acceptor, String s, RGB rgb, int style) { TextStyle textStyle = new TextStyle(); textStyle.setBackgroundColor(new RGB(255, 255, 255)); textStyle.setColor(rgb); textStyle.setStyle(style); acceptor.acceptDefaultHighlighting(s, s, textStyle); }
Example 4
Source File: JSONHighlightingConfiguration.java From n4js with Eclipse Public License 1.0 | 5 votes |
@Override public void configure(IHighlightingConfigurationAcceptor acceptor) { acceptor.acceptDefaultHighlighting(PROPERTY_NAME_ID, "Property Name", propertyNameTextStyle()); acceptor.acceptDefaultHighlighting(KEYWORD_ID, "Boolean/Null Literals", keywordTextStyle()); acceptor.acceptDefaultHighlighting(PUNCTUATION_ID, "Punctuation character", punctuationTextStyle()); acceptor.acceptDefaultHighlighting(COMMENT_ID, "Comment", commentTextStyle()); acceptor.acceptDefaultHighlighting(STRING_ID, "String", stringTextStyle()); acceptor.acceptDefaultHighlighting(NUMBER_ID, "Number", numberTextStyle()); acceptor.acceptDefaultHighlighting(DEFAULT_ID, "Default", defaultTextStyle()); acceptor.acceptDefaultHighlighting(INVALID_TOKEN_ID, "Invalid Symbol", errorTextStyle()); }
Example 5
Source File: SolidityHighlightingConfiguration.java From solidity-ide with Eclipse Public License 1.0 | 5 votes |
@Override public void configure(IHighlightingConfigurationAcceptor acceptor) { super.configure(acceptor); acceptor.acceptDefaultHighlighting(STATE_VARIABLE, "StateVariable", stateVariableTextStyle()); acceptor.acceptDefaultHighlighting(FUNCTION_PARAMETER, "FunctionParameter", localVariableTextStyle()); }
Example 6
Source File: TemplatesHighlightingConfiguration.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
@Override public void configure(IHighlightingConfigurationAcceptor acceptor) { super.configure(acceptor); acceptor.acceptDefaultHighlighting(TEMPLATE_BODY, "Template body", defaultTextStyle()); acceptor.acceptDefaultHighlighting(TEMPLATE_VARIABLE, "Template variable", decorationsStyle()); acceptor.acceptDefaultHighlighting(TEMPLATE_VARIABLE_ARGUMENT, "Template argument", counterStyle()); }
Example 7
Source File: SemanticHighlightingConfiguration.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
@Override public void configure(IHighlightingConfigurationAcceptor acceptor) { super.configure(acceptor); acceptor.acceptDefaultHighlighting(RULE_DECLARATION_ID, Messages.SemanticHighlightingConfiguration_5, defaultTextStyle()); acceptor.acceptDefaultHighlighting(TYPE_REFERENCE_ID, Messages.SemanticHighlightingConfiguration_6, typeReference()); acceptor.acceptDefaultHighlighting(DATA_TYPE_RULE_ID, Messages.SemanticHighlightingConfiguration_7, dataTypeRule()); acceptor.acceptDefaultHighlighting(UNUSED_VALUE_ID, Messages.SemanticHighlightingConfiguration_8, unusedValue()); acceptor.acceptDefaultHighlighting(NEVER_CALLED_RULE_ID, Messages.SemanticHighlightingConfiguration_9, unusedRule()); acceptor.acceptDefaultHighlighting(SPECIAL_ATTRIBUTE_ID, Messages.SemanticHighlightingConfiguration_10, specialAttribute()); }
Example 8
Source File: XbaseHighlightingConfiguration.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
@Override public void configure(IHighlightingConfigurationAcceptor acceptor) { acceptor.acceptDefaultHighlighting(STATIC_METHOD_INVOCATION, "Static method invocations", staticMethodInvocation()); acceptor.acceptDefaultHighlighting(STATIC_FIELD, "Static fields", staticField()); acceptor.acceptDefaultHighlighting(FIELD, "Fields", field()); acceptor.acceptDefaultHighlighting(ANNOTATION, "Annotations", annotation()); acceptor.acceptDefaultHighlighting(EXTENSION_METHOD_INVOCATION, "Extension method invocations", extensionMethodInvocation()); acceptor.acceptDefaultHighlighting(DEPRECATED_MEMBERS, "Deprecated members", deprecatedMembers()); acceptor.acceptDefaultHighlighting(XbaseHighlightingStyles.INTERFACE, "Interfaces", interfaces()); acceptor.acceptDefaultHighlighting(XbaseHighlightingStyles.ENUM, "Enums", enums()); acceptor.acceptDefaultHighlighting(XbaseHighlightingStyles.CLASS, "Classes", classes()); acceptor.acceptDefaultHighlighting(XbaseHighlightingStyles.ABSTRACT_CLASS, "Abstract classes", abstractClasses()); acceptor.acceptDefaultHighlighting(XbaseHighlightingStyles.STATIC_FINAL_FIELD, "Static final fields", staticFinalField()); // not supported yet // acceptor.acceptDefaultHighlighting(XbaseHighlightingStyles.INHERITED_FIELD, "Inherited fields", inheritedField()); acceptor.acceptDefaultHighlighting(XbaseHighlightingStyles.METHOD, "Methods", method()); acceptor.acceptDefaultHighlighting(XbaseHighlightingStyles.ABSTRACT_METHOD_INVOCATION, "Abstract method invocations", abstractMethodInvocation()); // not supported yet // acceptor.acceptDefaultHighlighting(XbaseHighlightingStyles.INHERITED_METHOD_INVOCATION, "Inherited method invocations", inheritedMethodInvocation()); acceptor.acceptDefaultHighlighting(XbaseHighlightingStyles.LOCAL_VARIABLE, "Local variables", localVariable()); acceptor.acceptDefaultHighlighting(XbaseHighlightingStyles.LOCAL_VARIABLE_DECLARATION, "Local variable declarations", localVariableDecl()); acceptor.acceptDefaultHighlighting(XbaseHighlightingStyles.LOCAL_FINAL_VARIABLE, "Local final variables", localFinalVariable()); acceptor.acceptDefaultHighlighting(XbaseHighlightingStyles.LOCAL_FINAL_VARIABLE_DECLARATION, "Local final variable declarations", localFinalVariableDecl()); acceptor.acceptDefaultHighlighting(XbaseHighlightingStyles.PARAMETER_VARIABLE, "Parameter variables", parameterVariable()); acceptor.acceptDefaultHighlighting(XbaseHighlightingStyles.TYPE_VARIABLE, "Type variables", typeVariable()); acceptor.acceptDefaultHighlighting(XbaseHighlightingStyles.TYPE_ARGUMENT, "Type arguments", typeArgument()); super.configure(acceptor); }
Example 9
Source File: XtendHighlightingConfiguration.java From xtext-xtend with Eclipse Public License 2.0 | 5 votes |
@Override public void configure(IHighlightingConfigurationAcceptor acceptor) { super.configure(acceptor); acceptor.acceptDefaultHighlighting(RICH_TEXT_ID, "Template Text", richTextStyle()); acceptor.acceptDefaultHighlighting(RICH_TEXT_DELIMITER_ID, "Template Terminals", richTextDelimiterStyle()); acceptor.acceptDefaultHighlighting(INSIGNIFICANT_TEMPLATE_TEXT, "Insignificant Template Whitespace", insignificantTemplateTextStyle()); acceptor.acceptDefaultHighlighting(ACTIVE_ANNOTATION, "Active Annotations", activeAnnotationStyle()); acceptor.acceptDefaultHighlighting(SINGLE_LINE_COMMENT, "Single Line Comments", commentTextStyle()); acceptor.acceptDefaultHighlighting(MULTI_LINE_COMMENT, "Multi Line Comments", commentTextStyle()); }
Example 10
Source File: SARLHighlightingConfiguration.java From sarl with Apache License 2.0 | 5 votes |
@Override public void configure(IHighlightingConfigurationAcceptor acceptor) { super.configure(acceptor); acceptor.acceptDefaultHighlighting( SARLHighlightingStyles.CAPACITY_METHOD_INVOCATION, "Capacity method invocations", //$NON-NLS-1$ capacityMethodInvocation()); }
Example 11
Source File: DotHighlightingConfiguration.java From gef with Eclipse Public License 2.0 | 4 votes |
@Override public void configure(IHighlightingConfigurationAcceptor acceptor) { // semantic highlighting acceptor.acceptDefaultHighlighting(GRAPH_NAME_ID, "Graph Id", //$NON-NLS-1$ graphIdTextStyle()); acceptor.acceptDefaultHighlighting(NODE_NAME_ID, "Node Id", //$NON-NLS-1$ nodeIdTextStyle()); acceptor.acceptDefaultHighlighting(PORT_NAME_ID, "Port Id", //$NON-NLS-1$ portIdTextStyle()); acceptor.acceptDefaultHighlighting(ATTRIBUTE_NAME_ID, "Attribute Id", //$NON-NLS-1$ attributeIdTextStyle()); acceptor.acceptDefaultHighlighting(EDGE_OP_ID, "Edge Op", //$NON-NLS-1$ edgeOpTextStyle()); acceptor.acceptDefaultHighlighting(DEFAULT_ID, "Default", //$NON-NLS-1$ defaultTextStyle()); acceptor.acceptDefaultHighlighting(KEYWORD_ID, "Keyword", //$NON-NLS-1$ keywordTextStyle()); // lexical highlighting acceptor.acceptDefaultHighlighting(NUMERAL_ID, "Numeral", //$NON-NLS-1$ numberTextStyle()); acceptor.acceptDefaultHighlighting(QUOTED_STRING_ID, "Quoted String", //$NON-NLS-1$ quotedStringTextStyle()); acceptor.acceptDefaultHighlighting(STRING_ID, "(Unquoted) String", //$NON-NLS-1$ stringTextStyle()); acceptor.acceptDefaultHighlighting(COMMENT_ID, "Comment", //$NON-NLS-1$ commentTextStyle()); acceptor.acceptDefaultHighlighting(PUNCTUATION_ID, "Punctuation Character", punctuationTextStyle()); //$NON-NLS-1$ acceptor.acceptDefaultHighlighting(INVALID_TOKEN_ID, "Invalid Symbol", //$NON-NLS-1$ errorTextStyle()); // html-like label sub-grammar highlighting acceptor.acceptDefaultHighlighting(HTML_TAG, "Html Tag", //$NON-NLS-1$ htmlTagStyle()); acceptor.acceptDefaultHighlighting(HTML_ATTRIBUTE_NAME, "Html Attribute Name", //$NON-NLS-1$ htmlAttributeNameStyle()); acceptor.acceptDefaultHighlighting(HTML_ATTRIBUTE_EQUAL_SIGN, "Html Attribute Equal Sign", //$NON-NLS-1$ htmlAttributeEqualSignStyle()); acceptor.acceptDefaultHighlighting(HTML_ATTRIBUTE_VALUE, "Html Attribute Value", //$NON-NLS-1$ htmlAttributeValueStyle()); acceptor.acceptDefaultHighlighting(HTML_CONTENT, "Html Content", //$NON-NLS-1$ htmlContentStyle()); acceptor.acceptDefaultHighlighting(HTML_COMMENT, "Html Comment", //$NON-NLS-1$ htmlCommentStyle()); // deprecated highlighting acceptor.acceptDefaultHighlighting(DEPRECATED_ATTRIBUTE_VALUE, "Deprecated Attribute Value", //$NON-NLS-1$ deprecatedStyle()); acceptor.acceptDefaultHighlighting(DEPRECATED_ATTRIBUTE_VALUE_QUOTED, "Deprecated Attribute Value Quoted", //$NON-NLS-1$ deprecatedQuotedStyle()); }
Example 12
Source File: CheckHighlightingConfiguration.java From dsl-devkit with Eclipse Public License 1.0 | 4 votes |
@Override public void configure(final IHighlightingConfigurationAcceptor acceptor) { super.configure(acceptor); acceptor.acceptDefaultHighlighting(JAVADOC_ID, "JavaDoc", javaDocCommentTextStyle()); }
Example 13
Source File: SemanticHighlightingConfiguration.java From dsl-devkit with Eclipse Public License 1.0 | 4 votes |
@Override public void configure(final IHighlightingConfigurationAcceptor acceptor) { super.configure(acceptor); acceptor.acceptDefaultHighlighting(DISABLED_VALUE_ID, Messages.SemanticHighlightingConfiguration_0, disabledValue()); }
Example 14
Source File: SGenHighlightingConfiguration.java From statecharts with Eclipse Public License 1.0 | 4 votes |
@Override public void configure(IHighlightingConfigurationAcceptor acceptor) { super.configure(acceptor); acceptor.acceptDefaultHighlighting(DEPRECATION, "Deprecation", deprecationTextStyle()); }