use of com.intellij.openapi.fileChooser.FileSystemTree in project intellij-community by JetBrains.
the class FileChooserAction method update.
public final void update(AnActionEvent e) {
FileSystemTree tree = e.getData(FileSystemTree.DATA_KEY);
if (tree != null) {
e.getPresentation().setEnabled(true);
update(tree, e);
} else {
e.getPresentation().setEnabled(false);
}
}
use of com.intellij.openapi.fileChooser.FileSystemTree in project intellij-community by JetBrains.
the class FileDeleteAction method update.
@Override
public void update(AnActionEvent event) {
Presentation presentation = event.getPresentation();
FileSystemTree tree = event.getData(FileSystemTree.DATA_KEY);
if (tree == null) {
presentation.setEnabledAndVisible(false);
return;
}
final Boolean available = event.getData(FileChooserKeys.DELETE_ACTION_AVAILABLE);
if (available != null && !available) {
presentation.setEnabledAndVisible(false);
return;
}
presentation.setEnabledAndVisible(true);
super.update(event);
}
Aggregations