This annotation also could be used as a meta-annotation, to define derived annotations for convenience. E.g. the following annotation could be defined to annotate the strings that represent Java methods:
@Language(value = "JAVA", prefix = "class X{", suffix = "}")
@interface JavaMethod {}
Note that using the derived annotation as meta-annotation is not supported. Meta-annotation works only one level deep.
| Modifier and Type | Method and Description |
|---|---|
| public @NonNls String | |
| public @NonNls String | |
| public @NonNls String | value()
Language name like "JAVA", "HTML", "XML", "RegExp", etc. The complete list of supported languages is not specified. |
| prefix | back to summary |
|---|---|
| public @NonNls String prefix() A constant prefix that is assumed to be implicitly added before the literal.
This helps to apply proper highlighting when the program element represents only a part of the valid program.
E.g. if the method parameter accepts a Java method, it could be annotated as
| |
| suffix | back to summary |
|---|---|
| public @NonNls String suffix() A constant suffix that is assumed to be implicitly added after the literal. See
| |
| value | back to summary |
|---|---|
| public @NonNls String value() Language name like "JAVA", "HTML", "XML", "RegExp", etc. The complete list of supported languages is not specified. However, at least the following languages should be recognized:
| |