mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Do not show "Jump to source" action, if we can't to do so
restore old behavior
This commit is contained in:
@@ -52,7 +52,7 @@ public abstract class BaseNavigateToSourceAction extends AnAction implements Dum
|
|||||||
event.getPresentation().setEnabled(enabled);
|
event.getPresentation().setEnabled(enabled);
|
||||||
}
|
}
|
||||||
//as myFocusEditor is always ignored - Main Menu|View always contains 2 actions with the same name and actually same behaviour
|
//as myFocusEditor is always ignored - Main Menu|View always contains 2 actions with the same name and actually same behaviour
|
||||||
event.getPresentation().setVisible(target == null || myFocusEditor);
|
if(!myFocusEditor) event.getPresentation().setVisible(false);
|
||||||
String navigateActionText = myFocusEditor && target instanceof NavigatableWithText?
|
String navigateActionText = myFocusEditor && target instanceof NavigatableWithText?
|
||||||
((NavigatableWithText)target).getNavigateActionText(true) : null;
|
((NavigatableWithText)target).getNavigateActionText(true) : null;
|
||||||
event.getPresentation().setText(navigateActionText == null ? getTemplatePresentation().getText() : navigateActionText);
|
event.getPresentation().setText(navigateActionText == null ? getTemplatePresentation().getText() : navigateActionText);
|
||||||
|
|||||||
Reference in New Issue
Block a user