mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
disable external annotations on non-physical elements (IDEA-160840)
This commit is contained in:
+2
-1
@@ -49,7 +49,8 @@ public abstract class AddAnnotationIntention extends BaseIntentionAction {
|
||||
public boolean isAvailable(@NotNull Project project, Editor editor, PsiFile file) {
|
||||
final PsiModifierListOwner owner = AddAnnotationPsiFix.getContainer(file, editor.getCaretModel().getOffset());
|
||||
if (owner == null ||
|
||||
!(owner.getManager().isInProject(owner) || CodeStyleSettingsManager.getSettings(project).USE_EXTERNAL_ANNOTATIONS)) {
|
||||
!owner.isPhysical() ||
|
||||
owner.getManager().isInProject(owner) && !CodeStyleSettingsManager.getSettings(project).USE_EXTERNAL_ANNOTATIONS) {
|
||||
return false;
|
||||
}
|
||||
Pair<String, String[]> annotations = getAnnotations(project);
|
||||
|
||||
Reference in New Issue
Block a user