mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
add javadoc intention should be unavailable if javadoc already exists IDEA-174275
This commit is contained in:
@@ -37,7 +37,9 @@ public class AddJavadocIntention extends BaseElementAtCaretIntentionAction imple
|
||||
return false;
|
||||
}
|
||||
final PsiElement parent = element.getParent();
|
||||
return parent instanceof PsiDocCommentOwner && !(parent instanceof PsiTypeParameter);
|
||||
return parent instanceof PsiDocCommentOwner &&
|
||||
((PsiDocCommentOwner)parent).getDocComment() == null &&
|
||||
!(parent instanceof PsiTypeParameter);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Add Javadoc" "false"
|
||||
/**
|
||||
* javadoc
|
||||
*/
|
||||
class F<caret>oo {
|
||||
|
||||
}
|
||||
-3
@@ -17,9 +17,6 @@ package com.intellij.java.codeInsight.intention;
|
||||
|
||||
import com.intellij.codeInsight.daemon.LightIntentionActionTestCase;
|
||||
|
||||
/**
|
||||
* @author Dmitry Batkovich
|
||||
*/
|
||||
public class AddJavadocIntentionTest extends LightIntentionActionTestCase {
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
Reference in New Issue
Block a user