mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
javadoc @param values highlighted
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
@@ -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),
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -350,6 +350,14 @@
|
||||
</value>
|
||||
</option>
|
||||
|
||||
<option name="DOC_COMMENT_TAG_VALUE">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="3d3d3d"/>
|
||||
<option name="BACKGROUND"/>
|
||||
<option name="FONT_TYPE" value="3"/>
|
||||
</value>
|
||||
</option>
|
||||
|
||||
<option name="JSP_SCRIPTING_BACKGROUND">
|
||||
<value>
|
||||
<option name="FOREGROUND"/>
|
||||
|
||||
@@ -723,6 +723,7 @@
|
||||
<codeInsight.lineMarkerProvider language="JAVA" implementationClass="com.intellij.codeInsight.daemon.impl.JavaLineMarkerProvider"/>
|
||||
<codeInsight.lineMarkerProvider language="JAVA" implementationClass="com.intellij.codeInsight.daemon.impl.IconLineMarkerProvider"/>
|
||||
|
||||
<annotator language="JAVA" implementationClass="com.intellij.codeInsight.daemon.impl.JavaDocAnnotator"/>
|
||||
<statementUpDownMover implementation="com.intellij.codeInsight.editorActions.moveUpDown.StatementMover" id="statement"
|
||||
order="before declaration"/>
|
||||
<statementUpDownMover implementation="com.intellij.codeInsight.editorActions.moveUpDown.DeclarationMover" id="declaration"
|
||||
|
||||
Reference in New Issue
Block a user