本文整理汇总了Java中com.intellij.openapi.ui.TestDialog类的典型用法代码示例。如果您正苦于以下问题:Java TestDialog类的具体用法?Java TestDialog怎么用?Java TestDialog使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TestDialog类属于com.intellij.openapi.ui包,在下文中一共展示了TestDialog类的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: tearDown
import com.intellij.openapi.ui.TestDialog; //导入依赖的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.TestDialog; //导入依赖的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: done
import com.intellij.openapi.ui.TestDialog; //导入依赖的package包/类
@After
public void done() throws Throwable {
testApplication.waitForBackgroundActivityToFinish();
if(handler != null) {
handler.finish();
}
Assert.assertTrue("Unhandled messages: " + testMessages.asString(), testMessages.isEmpty());
Messages.setTestDialog(TestDialog.DEFAULT);
List<Exception> ex = errorService._shiftErrors();
Assert.assertTrue("Unhandled exceptions: " + ex.toString(), ex.isEmpty());
for(EntityListener listener: entityListeners) {
entityService.removeEntityListener(listener);
}
getComponent(DetailUtil.class)._restore();
if(isIsolated()) {
handler.getServer().stop();
}
}
开发者ID:janotav,项目名称:ali-idea-plugin,代码行数:19,代码来源:IntellijTest.java
示例4: configConfirmationForYesAnswer
import com.intellij.openapi.ui.TestDialog; //导入依赖的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
示例5: configConfirmationForNoAnswer
import com.intellij.openapi.ui.TestDialog; //导入依赖的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
示例6: tearDown
import com.intellij.openapi.ui.TestDialog; //导入依赖的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
示例7: undo
import com.intellij.openapi.ui.TestDialog; //导入依赖的package包/类
protected void undo() {
UIUtil.invokeAndWaitIfNeeded(new Runnable() {
@Override
public void run() {
final TestDialog oldTestDialog = Messages.setTestDialog(TestDialog.OK);
try {
UndoManager.getInstance(myProject).undo(null);
}
finally {
Messages.setTestDialog(oldTestDialog);
}
}
});
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:SvnTestCase.java
示例8: tearDown
import com.intellij.openapi.ui.TestDialog; //导入依赖的package包/类
@Override
public void tearDown() throws Exception {
// TODO thread leak either a IJ bug https://youtrack.jetbrains.com/issue/IDEA-155496
// or a pants plugin bug https://github.com/pantsbuild/intellij-pants-plugin/issues/130
// Temporarily ignore the following 'leaking' threads to pass CI.
ThreadTracker.longRunningThreadCreated(
ApplicationManager.getApplication(),
"BaseDataReader",
"ProcessWaitFor",
"Timer"
);
try {
if (myCompilerTester != null) {
myCompilerTester.tearDown();
}
// Kill nailgun after usage as memory on travis is limited, at a cost of slower later builds.
killNailgun();
cleanProjectRoot();
Messages.setTestDialog(TestDialog.DEFAULT);
// TODO(cosmicexplorer): after updating from 172.4343.14 to 173.3531.6,
// intellij's provided test class sometimes yells about a leaky jdk
// table. i don't think this indicates any problems, so for now if tests
// fail with leaky sdk errors, broaden this to include the leaked sdks.
removeJdks(jdk -> jdk.getName().contains("pants"));
super.tearDown();
}
catch (Throwable throwable) {
// Discard error containing "Already disposed".
if (!throwable.getMessage().contains("Already disposed")) {
throw throwable;
}
}
}
开发者ID:pantsbuild,项目名称:intellij-pants-plugin,代码行数:36,代码来源:PantsIntegrationTestCase.java
示例9: tearDown
import com.intellij.openapi.ui.TestDialog; //导入依赖的package包/类
@Override
protected void tearDown() throws Exception {
Messages.setTestDialog(TestDialog.DEFAULT);
myProjectsManager.projectClosed();
removeFromLocalRepository("test");
if (useJps()) {
FileUtil.delete(BuildManager.getInstance().getBuildSystemDirectory());
}
super.tearDown();
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:11,代码来源:MavenImportingTestCase.java
示例10: doOverrideTest
import com.intellij.openapi.ui.TestDialog; //导入依赖的package包/类
public void doOverrideTest(String testFile, TestDialog answer) throws Throwable {
Messages.setTestDialog(answer);
myFixture.configureByFiles(testFile, "com/bar/TestSearchOverrides.hx");
myFixture.copyFileToProject(getResultsPath());
compareExpectedUsages(findUsages());
}
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:7,代码来源:HaxeFindUsagesTest.java
示例11: testLogSimple
import com.intellij.openapi.ui.TestDialog; //导入依赖的package包/类
public void testLogSimple() throws Exception {
Messages.setTestDialog(TestDialog.DEFAULT);
doTest();
}
开发者ID:mplushnikov,项目名称:lombok-intellij-plugin,代码行数:5,代码来源:LombokLoggerActionTest.java
示例12: testLogRename
import com.intellij.openapi.ui.TestDialog; //导入依赖的package包/类
public void testLogRename() throws Exception {
Messages.setTestDialog(TestDialog.OK);
doTest();
}
开发者ID:mplushnikov,项目名称:lombok-intellij-plugin,代码行数:5,代码来源:LombokLoggerActionTest.java
示例13: testLogPublic
import com.intellij.openapi.ui.TestDialog; //导入依赖的package包/类
public void testLogPublic() throws Exception {
Messages.setTestDialog(TestDialog.OK);
doTest();
}
开发者ID:mplushnikov,项目名称:lombok-intellij-plugin,代码行数:5,代码来源:LombokLoggerActionTest.java
示例14: testLogNonStatic
import com.intellij.openapi.ui.TestDialog; //导入依赖的package包/类
public void testLogNonStatic() throws Exception {
Messages.setTestDialog(TestDialog.OK);
doTest();
}
开发者ID:mplushnikov,项目名称:lombok-intellij-plugin,代码行数:5,代码来源:LombokLoggerActionTest.java
示例15: testLogNonFinal
import com.intellij.openapi.ui.TestDialog; //导入依赖的package包/类
public void testLogNonFinal() throws Exception {
Messages.setTestDialog(TestDialog.OK);
doTest();
}
开发者ID:mplushnikov,项目名称:lombok-intellij-plugin,代码行数:5,代码来源:LombokLoggerActionTest.java
示例16: main
import com.intellij.openapi.ui.TestDialog; //导入依赖的package包/类
public static void main(String[] args) throws Exception{
File t = FileUtil.createTempDirectory("consulo", "data");
System.setProperty(PathManager.PROPERTY_CONFIG_PATH, t.getAbsolutePath() + "/config");
System.setProperty(PathManager.PROPERTY_SYSTEM_PATH, t.getAbsolutePath() + "/system");
//System.setProperty(PathManager.PROPERTY_CONFIG_PATH, "C:\\Users\\VISTALL\\.ConsuloData\\config");
// System.setProperty(PathManager.PROPERTY_SYSTEM_PATH, "C:\\Users\\VISTALL\\.ConsuloData\\system");
System.setProperty(PathManager.PROPERTY_HOME_PATH, "F:\\github.com\\consulo\\consulo\\out\\artifacts\\dist");
System.setProperty("idea.filewatcher.disabled", "true");
initLogger();
ApplicationEx app = CompilerServerApplication.createApplication();
Messages.setTestDialog(new TestDialog() {
@Override
public int show(String message) {
MainTest.LOGGER.info(message);
return 0;
}
}) ;
app.load(PathManager.getOptionsPath());
System.out.println("---------------------------------------------------------------------------------------------------------");
/* File file = new File("../../../platform/compiler-server-impl/testData/zip1.zip");
VirtualFile virtualFile = LocalFileSystem.getInstance().findFileByIoFile(file);
VirtualFile jarRootForLocalFile = ArchiveVfsUtil.getJarRootForLocalFile(virtualFile);
StringBuilder builder = new StringBuilder();
printTree(jarRootForLocalFile, 0, builder);
System.out.println(builder); */
File file = new File("F:\\github.com\\consulo\\consulo\\out\\artifacts\\dist\\lib\\idea.jar");
VirtualFile virtualFile = LocalFileSystem.getInstance().findFileByIoFile(file);
VirtualFile archiveRootForLocalFile = ArchiveVfsUtil.getArchiveRootForLocalFile(virtualFile);
System.out.println(archiveRootForLocalFile.findFileByRelativePath("consulo/module/extension/ui"));
}
开发者ID:consulo,项目名称:consulo,代码行数:44,代码来源:MainTest.java
注:本文中的com.intellij.openapi.ui.TestDialog类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论