use of com.intellij.lang.annotation.Annotation in project android by JetBrains.
the class AndroidColorAnnotatorTest method testColorReferenceInXml1.
public void testColorReferenceInXml1() {
// Reference to a color from a layout file
Annotation annotation = findAnnotation("res/layout/color_test.xml", "@color/color1", XmlAttributeValue.class);
checkAnnotationColor(annotation, new Color(63, 81, 181));
}
use of com.intellij.lang.annotation.Annotation in project android by JetBrains.
the class AndroidColorAnnotatorTest method testColorInValues1.
public void testColorInValues1() {
// Color definition in a values file
Annotation annotation = findAnnotation("res/values/colors1.xml", "3F51B5", XmlTag.class);
checkAnnotationColor(annotation, new Color(63, 81, 181));
}
use of com.intellij.lang.annotation.Annotation in project android by JetBrains.
the class AndroidColorAnnotatorTest method testColorStateListInValues.
public void testColorStateListInValues() {
// Color definition in a color state list file
Annotation annotation = findAnnotation("res/color/selector.xml", "ffff0000", XmlAttributeValue.class);
checkAnnotationColor(annotation, new Color(255, 0, 0));
annotation = findAnnotation("res/color/selector.xml", "#ff00ff00", XmlAttributeValue.class);
checkAnnotationColor(annotation, new Color(0, 255, 0));
}
use of com.intellij.lang.annotation.Annotation in project android by JetBrains.
the class AndroidColorAnnotatorTest method testColorReferenceInXml2.
public void testColorReferenceInXml2() {
// Reference to a color from a layout file
Annotation annotation = findAnnotation("res/layout/color_test.xml", "@color/color2", XmlAttributeValue.class);
checkAnnotationColor(annotation, new Color(0x303F9F));
}
use of com.intellij.lang.annotation.Annotation in project intellij-community by JetBrains.
the class JavaDocAnnotator method annotate.
@Override
public void annotate(@NotNull PsiElement element, @NotNull AnnotationHolder holder) {
if (element instanceof PsiDocTag) {
String name = ((PsiDocTag) element).getName();
if ("param".equals(name)) {
PsiDocTagValue tagValue = ((PsiDocTag) element).getValueElement();
if (tagValue != null) {
Annotation annotation = holder.createInfoAnnotation(tagValue, null);
annotation.setTextAttributes(JavaHighlightingColors.DOC_COMMENT_TAG_VALUE);
}
}
}
}
Aggregations