本文整理匯總了Java中com.intellij.openapi.ui.DialogWrapper.close方法的典型用法代碼示例。如果您正苦於以下問題:Java DialogWrapper.close方法的具體用法?Java DialogWrapper.close怎麽用?Java DialogWrapper.close使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.intellij.openapi.ui.DialogWrapper
的用法示例。
在下文中一共展示了DialogWrapper.close方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: showConflicts
import com.intellij.openapi.ui.DialogWrapper; //導入方法依賴的package包/類
public static boolean showConflicts(DialogWrapper dialog, MultiMap<PsiElement, String> conflicts, final Project project) {
if (!conflicts.isEmpty()) {
fireConflictsEvent(conflicts, project);
ConflictsDialog conflictsDialog = new ConflictsDialog(project, conflicts);
conflictsDialog.show();
final boolean ok = conflictsDialog.isOK();
if (!ok && conflictsDialog.isShowConflicts()) dialog.close(DialogWrapper.CANCEL_EXIT_CODE);
return ok;
}
return true;
}
示例2: run
import com.intellij.openapi.ui.DialogWrapper; //導入方法依賴的package包/類
@Override
public void run(DialogWrapper dialog) {
if (Messages.showYesNoDialog(dialog.getRootPane(),
DiffBundle.message("merge.dialog.exit.without.applying.changes.confirmation.message"),
DiffBundle.message("cancel.visual.merge.dialog.title"),
Messages.getQuestionIcon()) == Messages.YES) {
dialog.close(DialogWrapper.CANCEL_EXIT_CODE);
}
}