});
final CommonActionsManager actionManager = CommonActionsManager.getInstance();
myTreePanel.add(
ToolbarDecorator.createDecorator(myTree)
.setAddAction(new AnActionButtonRunnable() {
@Override
public void run(AnActionButton button) {
final StrutsFileSet fileSet =
new StrutsFileSet(StrutsFileSet.getUniqueId(myBuffer),
StrutsFileSet.getUniqueName(StrutsBundle.message("facet.fileset.my.fileset"), myBuffer),
originalConfiguration) {
public boolean isNew() {
return true;
}
};
final FileSetEditor editor = new FileSetEditor(myPanel,
fileSet,
facetEditorContext,
myConfigsSearcher);
editor.show();
if (editor.getExitCode() == DialogWrapper.OK_EXIT_CODE) {
final StrutsFileSet editedFileSet = editor.getEditedFileSet();
Disposer.register(strutsFacetConfiguration, editedFileSet);
myBuffer.add(editedFileSet);
myModified = true;
myBuilder.updateFromRoot();
selectFileSet(fileSet);
}
myTree.requestFocus();
}
})
.setRemoveAction(new AnActionButtonRunnable() {
@Override
public void run(AnActionButton button) {
remove();
myModified = true;
myBuilder.updateFromRoot();
myTree.requestFocus();
}
})
.setEditAction(new AnActionButtonRunnable() {
@Override
public void run(AnActionButton button) {
final StrutsFileSet fileSet = getCurrentFileSet();
if (fileSet != null) {
final FileSetEditor editor = new FileSetEditor(myPanel,