diff --git a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/JavaDocAnnotator.java b/java/java-impl/src/com/intellij/codeInsight/daemon/impl/JavaDocAnnotator.java new file mode 100644 index 000000000000..82c9080b9b9b --- /dev/null +++ b/java/java-impl/src/com/intellij/codeInsight/daemon/impl/JavaDocAnnotator.java @@ -0,0 +1,45 @@ +/* + * Copyright 2000-2011 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.intellij.codeInsight.daemon.impl; + +import com.intellij.lang.annotation.Annotation; +import com.intellij.lang.annotation.AnnotationHolder; +import com.intellij.lang.annotation.Annotator; +import com.intellij.openapi.editor.colors.CodeInsightColors; +import com.intellij.psi.PsiElement; +import com.intellij.psi.javadoc.PsiDocTag; +import com.intellij.psi.javadoc.PsiDocTagValue; +import org.jetbrains.annotations.NotNull; + +/** + * @author Dmitry Avdeev + * Date: 11/8/11 + */ +public class JavaDocAnnotator implements Annotator { + @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(CodeInsightColors.DOC_COMMENT_TAG_VALUE); + } + } + } + } +} diff --git a/java/java-impl/src/com/intellij/openapi/options/colors/pages/JavaColorSettingsPage.java b/java/java-impl/src/com/intellij/openapi/options/colors/pages/JavaColorSettingsPage.java index 0b340cddf195..56dedea0c7ca 100644 --- a/java/java-impl/src/com/intellij/openapi/options/colors/pages/JavaColorSettingsPage.java +++ b/java/java-impl/src/com/intellij/openapi/options/colors/pages/JavaColorSettingsPage.java @@ -56,6 +56,7 @@ public class JavaColorSettingsPage implements ColorSettingsPage, InspectionColor new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.block.comment"), SyntaxHighlighterColors.JAVA_BLOCK_COMMENT), new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.javadoc.comment"), SyntaxHighlighterColors.DOC_COMMENT), new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.javadoc.tag"), SyntaxHighlighterColors.DOC_COMMENT_TAG), + new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.javadoc.tag.value"), CodeInsightColors.DOC_COMMENT_TAG_VALUE), new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.javadoc.markup"), SyntaxHighlighterColors.DOC_COMMENT_MARKUP), new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.class"), CodeInsightColors.CLASS_NAME_ATTRIBUTES), diff --git a/platform/platform-api/src/com/intellij/openapi/editor/colors/CodeInsightColors.java b/platform/platform-api/src/com/intellij/openapi/editor/colors/CodeInsightColors.java index c6ed84fc282e..823769f0eed8 100644 --- a/platform/platform-api/src/com/intellij/openapi/editor/colors/CodeInsightColors.java +++ b/platform/platform-api/src/com/intellij/openapi/editor/colors/CodeInsightColors.java @@ -67,4 +67,6 @@ public interface CodeInsightColors { TextAttributesKey LINE_FULL_COVERAGE = TextAttributesKey.createTextAttributesKey("LINE_FULL_COVERAGE"); TextAttributesKey LINE_PARTIAL_COVERAGE = TextAttributesKey.createTextAttributesKey("LINE_PARTIAL_COVERAGE"); TextAttributesKey LINE_NONE_COVERAGE = TextAttributesKey.createTextAttributesKey("LINE_NONE_COVERAGE"); + + TextAttributesKey DOC_COMMENT_TAG_VALUE = TextAttributesKey.createTextAttributesKey("DOC_COMMENT_TAG_VALUE"); } diff --git a/platform/platform-resources-en/src/messages/OptionsBundle.properties b/platform/platform-resources-en/src/messages/OptionsBundle.properties index a0f76f78116b..c31957c6a932 100644 --- a/platform/platform-resources-en/src/messages/OptionsBundle.properties +++ b/platform/platform-resources-en/src/messages/OptionsBundle.properties @@ -59,6 +59,7 @@ options.java.attribute.descriptor.line.comment=Line comment options.java.attribute.descriptor.block.comment=Block comment options.java.attribute.descriptor.javadoc.comment=JavaDoc comment options.java.attribute.descriptor.javadoc.tag=JavaDoc tag +options.java.attribute.descriptor.javadoc.tag.value=JavaDoc tag value options.java.attribute.descriptor.javadoc.markup=JavaDoc markup options.java.attribute.descriptor.unknown.symbol=Unknown symbol options.java.attribute.descriptor.error=Error diff --git a/platform/platform-resources/src/DefaultColorSchemesManager.xml b/platform/platform-resources/src/DefaultColorSchemesManager.xml index 5e47aa78f1a9..c87696c7beae 100644 --- a/platform/platform-resources/src/DefaultColorSchemesManager.xml +++ b/platform/platform-resources/src/DefaultColorSchemesManager.xml @@ -350,6 +350,14 @@ + +