use of com.intellij.openapi.vcs.changes.ui.NewChangelistDialog in project intellij-community by JetBrains.
the class AddChangeListAction method actionPerformed.
public void actionPerformed(AnActionEvent e) {
Project project = e.getData(CommonDataKeys.PROJECT);
NewChangelistDialog dlg = new NewChangelistDialog(project);
dlg.show();
if (dlg.getExitCode() == DialogWrapper.OK_EXIT_CODE) {
String name = dlg.getName();
if (name.length() == 0) {
name = getUniqueName(project);
}
final LocalChangeList list = ChangeListManager.getInstance(project).addChangeList(name, dlg.getDescription());
if (dlg.isNewChangelistActive()) {
ChangeListManager.getInstance(project).setDefaultChangeList(list);
}
dlg.getPanel().changelistCreatedOrChanged(list);
}
}
Aggregations