/** {@inheritDoc} */ @Override public void updateInPerspective(@NotNull ActionEvent e) { if (workspaceAgent.getActivePart() == null || workspaceAgent.getActivePart() instanceof EditorPartPresenter) { e.getPresentation().setEnabledAndVisible(false); return; } final Resource[] resources = appContext.getResources(); e.getPresentation().setVisible(true); if (resources == null || resources.length != 1) { e.getPresentation().setEnabled(false); return; } for (RenamingSupport validator : renamingSupport) { if (!validator.isRenameAllowed(resources[0])) { e.getPresentation().setEnabled(false); return; } } e.getPresentation().setEnabled(true); }