当前位置: 首页>>代码示例>>Java>>正文


Java Messages.YesNoResult方法代码示例

本文整理汇总了Java中com.intellij.openapi.ui.Messages.YesNoResult方法的典型用法代码示例。如果您正苦于以下问题:Java Messages.YesNoResult方法的具体用法?Java Messages.YesNoResult怎么用?Java Messages.YesNoResult使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.openapi.ui.Messages的用法示例。


在下文中一共展示了Messages.YesNoResult方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: showYesNoDialog

import com.intellij.openapi.ui.Messages; //导入方法依赖的package包/类
@Messages.YesNoResult
private static int showYesNoDialog(Component parentComponent, Project project, String message, String title, Icon icon) {
  if (parentComponent.isShowing()) {
    return Messages.showYesNoDialog(parentComponent, message, title, icon);
  }
  else {
    return Messages.showYesNoDialog(project, message, title, icon);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:ITNReporter.java

示例2: navigateToStarted

import com.intellij.openapi.ui.Messages; //导入方法依赖的package包/类
private static void navigateToStarted(final Document oldDocument, final Project project, @Messages.YesNoResult final int exitCode) {
  final PsiFile file = PsiDocumentManager.getInstance(project).getPsiFile(oldDocument);
  if (file != null) {
    final VirtualFile virtualFile = file.getVirtualFile();
    if (virtualFile != null) {
      final FileEditor[] editors = FileEditorManager.getInstance(project).getEditors(virtualFile);
      for (FileEditor editor : editors) {
        if (editor instanceof TextEditor) {
          final Editor textEditor = ((TextEditor)editor).getEditor();
          final TemplateState templateState = TemplateManagerImpl.getTemplateState(textEditor);
          if (templateState != null) {
            if (exitCode == Messages.YES) {
              final TextRange range = templateState.getVariableRange(PRIMARY_VARIABLE_NAME);
              if (range != null) {
                new OpenFileDescriptor(project, virtualFile, range.getStartOffset()).navigate(true);
                return;
              }
            }
            else if (exitCode > 0){
              templateState.gotoEnd();
              return;
            }
          }
        }
      }
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:InplaceRefactoring.java

示例3: showYesNoDialog

import com.intellij.openapi.ui.Messages; //导入方法依赖的package包/类
@Messages.YesNoResult
public static boolean showYesNoDialog(@Nullable Project project,
                                      @NotNull String title,
                                      @NotNull String message,
                                      @NotNull DialogWrapper.DoNotAskOption doNotAskOption) {
  return Messages.YES == Messages.showYesNoDialog(project, message, title, Messages.getQuestionIcon(), doNotAskOption);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:GithubNotifications.java

示例4: showYesNoDialog

import com.intellij.openapi.ui.Messages; //导入方法依赖的package包/类
/**
 * @return {@link Messages#YES} if user pressed "Yes" or {@link Messages#NO} if user pressed "No" button.
 */
@Messages.YesNoResult
public abstract int showYesNoDialog(@NotNull String title, String message, @NotNull String yesButton, @NotNull String noButton, @Nullable Window window,
                                    @Nullable DialogWrapper.DoNotAskOption doNotAskDialogOption);
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:MacMessages.java

示例5: showRestartDialog

import com.intellij.openapi.ui.Messages; //导入方法依赖的package包/类
@Messages.YesNoResult
public static int showRestartDialog() {
  return showRestartDialog(IdeBundle.message("update.notifications.title"));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:PluginManagerConfigurable.java

示例6: navigateToAlreadyStarted

import com.intellij.openapi.ui.Messages; //导入方法依赖的package包/类
protected void navigateToAlreadyStarted(Document oldDocument, @Messages.YesNoResult int exitCode) {
  navigateToStarted(oldDocument, myProject, exitCode);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:InplaceRefactoring.java


注:本文中的com.intellij.openapi.ui.Messages.YesNoResult方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。