@Override protected void doOKAction() { exitCode = contentPanelWrapper.getComboBoxIndex(); super.doOKAction(); }
@Nullable @Override protected ValidationInfo doValidate() { String command = getCommand(); if (command.isEmpty()) { return new ValidationInfo("Empty Go command is not allowed", myCommandTextField); } if (command.startsWith("go ")) { return new ValidationInfo("Go command shouldn't started with `go`", myCommandTextField); } return super.doValidate(); }
@Override public void doCancelAction() { exitCode = -1; super.doCancelAction(); }
@Override protected void init() { initLabels(); super.init(); }
/** * Dispose the wrapped and releases all resources allocated be the wrapper to help * more efficient garbage collection. You should never invoke this method twice or * invoke any method of the wrapper after invocation of <code>dispose</code>. * * @throws IllegalStateException if the dialog is disposed not on the event dispatch thread */ @Override protected void dispose() { EditorFactory.getInstance().releaseEditor(preview); super.dispose(); }
@NotNull @Override protected Action[] createActions() { if (dialogType == DialogType.NOT_DIRECTORY_ERROR) { return new Action[] {getOKAction()}; } else { return super.createActions(); } } }
public TemplateCodeEditPanel(@Nullable Project project, boolean canBeParent, TemplateEdit templateEdit) { super(project, canBeParent); this.templateEdit = templateEdit; super.init(); }
/** * Dispose the wrapped and releases all resources allocated be the wrapper to help * more efficient garbage collection. You should never invoke this method twice or * invoke any method of the wrapper after invocation of <code>dispose</code>. * * @throws IllegalStateException if the dialog is disposed not on the event dispatch thread */ @Override protected void dispose() { tree.removeTreeSelectionListener(treeSelectionListener); EditorFactory.getInstance().releaseEditor(preview); super.dispose(); }
@NotNull @Override protected Action[] createActions() { List<Action> actionList = new ArrayList<>(); actionList.add(new ExportAction(tempConfiguration, project)); actionList.add(new ImportAction(tempConfiguration, this)); Collections.addAll(actionList, super.createActions()); Action[] actions = new Action[actionList.size()]; for (int i = 0; i < actionList.size(); i++) { actions[i] = actionList.get(i); } return actions; }
throwable.printStackTrace(); super.doOKAction();
public TemplateListPanel(@Nullable Project project, boolean canBeParent, TemplateListForm templateEdit) { super(project, canBeParent); this.templateEdit = templateEdit; super.init(); }
@Nullable @Override protected ValidationInfo doValidate() { if (selectedDir == null) { return new ValidationInfo("Please select a resource dir.", list); } return super.doValidate(); }
@Override public void doCancelAction() { super.doCancelAction(); } }
/** Disposes current preview {@link #commands}. */ @Override public void dispose() { super.dispose(); tree.getModel().removeTreeModelListener(treeModelListener); if (!commands.isDisposed()) { EditorFactory.getInstance().releaseEditor(commands); } } }
@NotNull @Override protected Action[] createActions() { getOKAction().putValue(Action.NAME, "Generate"); return super.createActions(); }
/** * This method is invoked by default implementation of "OK" action. It just closes dialog with * <code>OK_EXIT_CODE</code>. This is convenient place to override functionality of "OK" action. * Note that the method does nothing if "OK" action isn't enabled. */ @Override protected void doOKAction() { super.doOKAction(); HashMap<VcsRoot, ArrayList<VirtualFile>> checked = getCheckedFiles(); for (Map.Entry<VcsRoot, ArrayList<VirtualFile>> entry : checked.entrySet()) { for (VirtualFile file : entry.getValue()) { ExternalExec.removeFileFromTracking(file, entry.getKey()); } } project.getMessageBus().syncPublisher(TRACKED_IGNORED_REFRESH).refresh(); }
public DialogWrapperPanel(@Nullable Project project, boolean canBeParent, ConnectDbSetting connectDbSetting) { super(project, canBeParent); this.project = project; this.connectDbSetting = connectDbSetting; setTitle("数据库信息"); super.init(); }
@Nullable @Override protected ValidationInfo doValidate() { String filePath = documentToImportTextField.getTextField().getText(); if (StringUtils.isBlank(filePath)) { return new ValidationInfo("Data file to import should be set", rootPanel); } File file; file = new File(filePath); if (!file.exists()) { return new ValidationInfo("Data file does not exist", rootPanel); } return super.doValidate(); }
@Override public void doCancelAction() { super.doCancelAction(); }