mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Suppressions: do not show host-suppressions available in injections only
This commit is contained in:
+14
-4
@@ -196,10 +196,20 @@ public class IntentionListStep implements ListPopupStep<IntentionActionWithTextC
|
||||
final List<IntentionAction> options = descriptor.getOptions(element, containingEditor);
|
||||
if (options == null) return cachedAction;
|
||||
for (IntentionAction option : options) {
|
||||
if (!option.isAvailable(myProject, containingEditor, containingFile)) {
|
||||
// if option is not applicable in injected fragment, check in host file context
|
||||
if (containingEditor == myEditor || !option.isAvailable(myProject, myEditor, myFile)) {
|
||||
continue;
|
||||
if (containingFile != null && containingEditor != null && myEditor != null) {
|
||||
if (!ShowIntentionActionsHandler.availableFor(containingFile, containingEditor, option)) {
|
||||
//if option is not applicable in injected fragment, check in host file context
|
||||
if (containingEditor == myEditor || !ShowIntentionActionsHandler.availableFor(myFile, myEditor, option)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!option.isAvailable(myProject, containingEditor, containingFile)) {
|
||||
// if option is not applicable in injected fragment, check in host file context
|
||||
if (containingEditor == myEditor || !option.isAvailable(myProject, myEditor, myFile)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
IntentionActionWithTextCaching textCaching = new IntentionActionWithTextCaching(option);
|
||||
|
||||
Reference in New Issue
Block a user