2 * Copyright 2000-2009 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
21 package com
.intellij
.codeInsight
.daemon
;
23 import com
.intellij
.codeInspection
.InspectionProfileEntry
;
24 import com
.intellij
.codeInspection
.ModifiableModel
;
25 import com
.intellij
.codeInspection
.ex
.LocalInspectionToolWrapper
;
26 import com
.intellij
.codeInspection
.javaDoc
.JavaDocLocalInspection
;
27 import com
.intellij
.profile
.codeInspection
.InspectionProfileManager
;
28 import org
.jdom
.Element
;
29 import org
.jetbrains
.annotations
.NonNls
;
31 public class JavaAwareInspectionProfileCoverter
extends InspectionProfileConvertor
{
32 private String myAdditionalJavadocTags
;
33 @NonNls private static final String ADDITONAL_JAVADOC_TAGS_OPTION
= "ADDITIONAL_JAVADOC_TAGS";
35 public JavaAwareInspectionProfileCoverter(InspectionProfileManager manager
) {
40 protected boolean processElement(final Element option
, final String name
) {
41 if (super.processElement(option
, name
)) {
44 if (name
.equals(ADDITONAL_JAVADOC_TAGS_OPTION
)) {
45 myAdditionalJavadocTags
= option
.getAttributeValue(VALUE_ATT
);
52 protected void fillErrorLevels(final ModifiableModel profile
) {
53 super.fillErrorLevels(profile
);
56 final InspectionProfileEntry inspectionTool
= profile
.getInspectionTool(JavaDocLocalInspection
.SHORT_NAME
, null);
57 JavaDocLocalInspection inspection
= (JavaDocLocalInspection
)((LocalInspectionToolWrapper
)inspectionTool
).getTool();
58 inspection
.myAdditionalJavadocTags
= myAdditionalJavadocTags
;