mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
hide jump to source action for special cases (e.g. module node) from Main Menu|View (IDEA-67662)
This commit is contained in:
@@ -46,6 +46,11 @@ public abstract class BaseNavigateToSourceAction extends AnAction implements Dum
|
||||
event.getPresentation().setEnabled(enabled);
|
||||
}
|
||||
if (target != null && target instanceof NavigatableWithText) {
|
||||
//as myFocusEditor is always ignored - Main Menu|View always contains 2 actions with the same name and actually same behaviour
|
||||
if (myFocusEditor) {
|
||||
event.getPresentation().setVisible(false);
|
||||
return;
|
||||
}
|
||||
final String navigateActionText = ((NavigatableWithText)target).getNavigateActionText(myFocusEditor);
|
||||
if (navigateActionText != null) {
|
||||
event.getPresentation().setText(navigateActionText);
|
||||
|
||||
Reference in New Issue
Block a user