mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java] excludes @author tag from completion in method Javadoc (IDEA-159020)
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2000-2016 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.psi.impl.source.javadoc;
|
||||
|
||||
import com.intellij.pom.java.LanguageLevel;
|
||||
import com.intellij.psi.PsiClass;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiMethod;
|
||||
import com.intellij.psi.PsiPackage;
|
||||
|
||||
class AuthorDocTagInfo extends SimpleDocTagInfo {
|
||||
AuthorDocTagInfo() {
|
||||
super("author", LanguageLevel.JDK_1_3, false, PsiClass.class, PsiPackage.class, PsiMethod.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValidInContext(PsiElement element) {
|
||||
if (element instanceof PsiMethod && !element.isPhysical()) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
return super.isValidInContext(element);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -39,7 +39,7 @@ public class JavadocManagerImpl implements JavadocManager {
|
||||
public JavadocManagerImpl(Project project) {
|
||||
myInfos = new ArrayList<JavadocTagInfo>();
|
||||
|
||||
myInfos.add(new SimpleDocTagInfo("author", LanguageLevel.JDK_1_3, false, PsiClass.class, PsiPackage.class, PsiMethod.class));
|
||||
myInfos.add(new AuthorDocTagInfo());
|
||||
myInfos.add(new SimpleDocTagInfo("deprecated", LanguageLevel.JDK_1_3, false, PsiElement.class));
|
||||
myInfos.add(new SimpleDocTagInfo("serialData", LanguageLevel.JDK_1_3, false, PsiMethod.class));
|
||||
myInfos.add(new SimpleDocTagInfo("serialField", LanguageLevel.JDK_1_3, false, PsiField.class));
|
||||
|
||||
Reference in New Issue
Block a user