use of com.intellij.packaging.elements.RenameablePackagingElement in project intellij-community by JetBrains.
the class RenamePackagingElementAction method update.
@Override
public void update(AnActionEvent e) {
final LayoutTreeSelection selection = myArtifactEditor.getLayoutTreeComponent().getSelection();
final PackagingElement<?> element = selection.getElementIfSingle();
final boolean visible = element instanceof RenameablePackagingElement && ((RenameablePackagingElement) element).canBeRenamed();
e.getPresentation().setEnabled(visible);
e.getPresentation().setVisible(visible);
}
Aggregations