Java Code Examples for com.intellij.openapi.ui.Messages#YesNoResult

The following examples show how to use com.intellij.openapi.ui.Messages#YesNoResult . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MacMessages.java    From consulo with Apache License 2.0 5 votes vote down vote up
/**
 * @return {@link Messages#YES} if user pressed "Yes" or {@link Messages#NO} if user pressed "No" button.
 */
@Messages.YesNoResult
public abstract int showYesNoDialog(@Nonnull String title,
                                    String message,
                                    @Nonnull String yesButton,
                                    @Nonnull String noButton,
                                    @Nullable Window window,
                                    @Nullable DialogWrapper.DoNotAskOption doNotAskDialogOption);
 
Example 2
Source File: PluginManagerConfigurable.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Messages.YesNoResult
public static int showShutDownIDEADialog() {
  return showShutDownIDEADialog(IdeBundle.message("title.plugins.changed"));
}
 
Example 3
Source File: PluginManagerConfigurable.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Messages.YesNoResult
private static int showShutDownIDEADialog(final String title) {
  String message = IdeBundle.message("message.idea.shutdown.required", ApplicationNamesInfo.getInstance().getFullProductName());
  return Messages.showYesNoDialog(message, title, "Shut Down", POSTPONE, Messages.getQuestionIcon());
}
 
Example 4
Source File: PluginManagerConfigurable.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Messages.YesNoResult
public static int showRestartIDEADialog() {
  return showRestartIDEADialog(IdeBundle.message("title.plugins.changed"));
}
 
Example 5
Source File: PluginManagerConfigurable.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Messages.YesNoResult
private static int showRestartIDEADialog(final String title) {
  String message = IdeBundle.message("message.idea.restart.required", ApplicationNamesInfo.getInstance().getFullProductName());
  return Messages.showYesNoDialog(message, title, "Restart", POSTPONE, Messages.getQuestionIcon());
}
 
Example 6
Source File: MacMessagesImpl.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
@Messages.YesNoResult
public int showYesNoDialog(@Nonnull String title, String message, @Nonnull String yesButton, @Nonnull String noButton, @Nullable consulo.ui.Window window) {
  return showAlertDialog(title, yesButton, null, noButton, message, window) == Messages.YES ? Messages.YES : Messages.NO;
}
 
Example 7
Source File: MacMessagesImpl.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
@Messages.YesNoResult
public int showYesNoDialog(@Nonnull String title, String message, @Nonnull String yesButton, @Nonnull String noButton, @Nullable consulo.ui.Window window,
                           @Nullable DialogWrapper.DoNotAskOption doNotAskDialogOption) {
  return showAlertDialog(title, yesButton, null, noButton, message, window, false, doNotAskDialogOption) == Messages.YES ? Messages.YES : Messages.NO;
}
 
Example 8
Source File: MacMessages.java    From consulo with Apache License 2.0 2 votes vote down vote up
/**
 * @return {@link Messages#YES} if user pressed "Yes" or {@link Messages#NO} if user pressed "No" button.
 */
@Messages.YesNoResult
public abstract int showYesNoDialog(@Nonnull String title, String message, @Nonnull String yesButton, @Nonnull String noButton, @Nullable Window window);