Commit ce3ad6a8 authored by Dmitry Avdeev's avatar Dmitry Avdeev
Browse files

web references highlighting: fixes

parent 75a21259
Showing with 4 additions and 2 deletions
+4 -2
......@@ -18,12 +18,14 @@ import org.jetbrains.annotations.NotNull;
public class HyperlinkAnnotator implements Annotator {
private static final String ourMessage = getMessage();
@Override
public void annotate(@NotNull PsiElement element, @NotNull AnnotationHolder holder) {
for (PsiReference reference : element.getReferences()) {
if (reference instanceof WebReference) {
Annotation annotation =
holder.createInfoAnnotation(reference.getRangeInElement().shiftRight(element.getTextRange().getStartOffset()), getMessage());
holder.createInfoAnnotation(reference.getRangeInElement().shiftRight(element.getTextRange().getStartOffset()), ourMessage);
annotation.setTextAttributes(CodeInsightColors.INACTIVE_HYPERLINK_ATTRIBUTES);
}
}
......
......@@ -44,7 +44,7 @@ public class GeneralColorsPage implements ColorSettingsPage, InspectionColorSett
"JetBrains Home Page: <hyperlink_f>http://www.jetbrains.com</hyperlink_f>\n" +
"JetBrains Developer Community: <hyperlink>https://www.jetbrains.com/devnet</hyperlink>\n" +
"<ref_hyperlink>ReferenceHyperlink</ref_hyperlink>\n" +
"<inactive_hyperlink>Inactive hyperlink</inactive_hyperlink>\n" +
"Inactive hyperlink in code: \"<inactive_hyperlink>http://jetbrains.com</inactive_hyperlink>\"\n" +
"\n" +
"Search:\n" +
" <search_result_wr>result</search_result_wr> = \"<search_text>text</search_text>, <search_text>text</search_text>, <search_text>text</search_text>\";\n" +
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment