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


Java Messages.setTestDialog方法代码示例

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


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

示例1: tearDown

import com.intellij.openapi.ui.Messages; //导入方法依赖的package包/类
@Override
public void tearDown() throws Exception {
  if (myJdkHome == null) {
    //super.setUp() wasn't called
    return;
  }

  try {
    new WriteAction() {
      @Override
      protected void run(@NotNull Result result) throws Throwable {
        Sdk old = ProjectJdkTable.getInstance().findJdk(GRADLE_JDK_NAME);
        if (old != null) {
          SdkConfigurationUtil.removeSdk(old);
        }
      }
    }.execute();
    Messages.setTestDialog(TestDialog.DEFAULT);
    FileUtil.delete(BuildManager.getInstance().getBuildSystemDirectory());
  }
  finally {
    super.tearDown();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:GradleImportingTestCase.java

示例2: testGithubAlreadyExists

import com.intellij.openapi.ui.Messages; //导入方法依赖的package包/类
public void testGithubAlreadyExists() throws Throwable {
  final boolean[] dialogShown = new boolean[1];
  TestDialog oldTestDialog = Messages.setTestDialog(new TestDialog() {
    @Override
    public int show(String message) {
      dialogShown[0] = message.contains("Successfully connected to") && message.contains("Do you want to proceed anyway?");
      return 1;
    }
  });

  try {
    registerDefaultShareDialogHandler();
    registerDefaultUntrackedFilesDialogHandler();

    createProjectFiles();
    GithubShareAction.shareProjectOnGithub(myProject, myProjectRoot);
    assertFalse(dialogShown[0]);

    GithubShareAction.shareProjectOnGithub(myProject, myProjectRoot);
    assertTrue(dialogShown[0]);
  }
  finally {
    Messages.setTestDialog(oldTestDialog);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:GithubShareProjectTest.java

示例3: configConfirmationForYesAnswer

import com.intellij.openapi.ui.Messages; //导入方法依赖的package包/类
protected static AtomicInteger configConfirmationForYesAnswer() {
  final AtomicInteger counter = new AtomicInteger();
  Messages.setTestDialog(new TestDialog() {
    @Override
    public int show(String message) {
      counter.set(counter.get() + 1);
      return 0;
    }
  });
  return counter;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:ExternalSystemImportingTestCase.java

示例4: configConfirmationForNoAnswer

import com.intellij.openapi.ui.Messages; //导入方法依赖的package包/类
protected static AtomicInteger configConfirmationForNoAnswer() {
  final AtomicInteger counter = new AtomicInteger();
  Messages.setTestDialog(new TestDialog() {
    @Override
    public int show(String message) {
      counter.set(counter.get() + 1);
      return 1;
    }
  });
  return counter;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:ExternalSystemImportingTestCase.java

示例5: tearDown

import com.intellij.openapi.ui.Messages; //导入方法依赖的package包/类
@Override
protected void tearDown() throws Exception {
  try {
    if (myGlobalSettingsFile != null) {
      VfsRootAccess.disallowRootAccess(myGlobalSettingsFile.getAbsolutePath());
    }
    VfsRootAccess.disallowRootAccess(PathManager.getConfigPath());
    Messages.setTestDialog(TestDialog.DEFAULT);
    removeFromLocalRepository("test");
    FileUtil.delete(BuildManager.getInstance().getBuildSystemDirectory());
  }
  finally {
    super.tearDown();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:MavenImportingTestCase.java


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