Search in sources :

Example 6 with TestDialog

use of com.intellij.openapi.ui.TestDialog in project intellij-community by JetBrains.

the class ExternalSystemImportingTestCase method configConfirmationForYesAnswer.

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;
}
Also used : AtomicInteger(java.util.concurrent.atomic.AtomicInteger) TestDialog(com.intellij.openapi.ui.TestDialog)

Example 7 with TestDialog

use of com.intellij.openapi.ui.TestDialog in project intellij-community by JetBrains.

the class MavenImportingTestCase method configConfirmationForYesAnswer.

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;
}
Also used : AtomicInteger(java.util.concurrent.atomic.AtomicInteger) TestDialog(com.intellij.openapi.ui.TestDialog)

Example 8 with TestDialog

use of com.intellij.openapi.ui.TestDialog in project kotlin by JetBrains.

the class MavenImportingTestCase method configConfirmationForYesAnswer.

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;
}
Also used : AtomicInteger(java.util.concurrent.atomic.AtomicInteger) TestDialog(com.intellij.openapi.ui.TestDialog)

Aggregations

TestDialog (com.intellij.openapi.ui.TestDialog)8 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)6 Application (com.intellij.openapi.application.Application)1 TestOnly (org.jetbrains.annotations.TestOnly)1