Annotator helps highlight and annotate any code based on specific rules.

7.1. Define an annotator

In this tutorial we will annotate usages of our properties within Java code. Let's consider a literal which starts with "simple:" as a usage of our property.

{% include /code_samples/simple_language_plugin/src/com/simpleplugin/SimpleAnnotator.java %}

7.2. Register the annotator

<annotator language="JAVA" implementationClass="com.simpleplugin.SimpleAnnotator"/>

7.3. Run the project

Let's define the following Java file and check if the IDE resolves a property.

public class Test {
    public static void main(String[] args) {
        System.out.println("simple:website");
    }
}

Annotator

If we type an undefined property name, it will annotate the code with a error.

Unresolved property

Previous Top Next

results matching ""

    No results matching ""