Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
269,400
boolean (@NotNull Project project, @NotNull String line) { return line.contains("FOO"); }
shouldFoldLine
269,401
String (@NotNull Project project, @NotNull List<String> lines) { return "folded"; }
getPlaceholderText
269,402
boolean () { return false; }
shouldBeAttachedToThePreviousLine
269,403
void () { ServiceContainerUtil.registerExtension(ApplicationManager.getApplication(), ConsoleFolding.EP_NAME, new ConsoleFolding() { @Override public boolean shouldFoldLine(@NotNull Project project, @NotNull String line) { return line.contains("FOO"); } @NotNull @Override public String getPlaceholderText(@NotNull Proje...
testSubsequentExpandedFoldsAreCombined
269,404
boolean (@NotNull Project project, @NotNull String line) { return line.contains("FOO"); }
shouldFoldLine
269,405
String (@NotNull Project project, @NotNull List<String> lines) { return "folded"; }
getPlaceholderText
269,406
void () { withCycleConsoleNoFolding(1000, consoleView -> { String text = "long text"; consoleView.print(text, ConsoleViewContentType.SYSTEM_OUTPUT); consoleView.waitAllRequests(); //editor contains `text` assertEquals(text.length(), consoleView.getEditor().getDocument().getTextLength()); consoleView.clear(); consoleVie...
testClearPrintConsoleSizeConsistency
269,407
void () { ServiceContainerUtil.registerExtension(ApplicationManager.getApplication(), ConsoleFolding.EP_NAME, new ConsoleFolding() { @Override public boolean shouldFoldLine(@NotNull Project project, @NotNull String line) { return line.contains("FOO"); } @NotNull @Override public String getPlaceholderText(@NotNull Proje...
testSubsequentExpandedNonAttachedFoldsAreCombined
269,408
boolean (@NotNull Project project, @NotNull String line) { return line.contains("FOO"); }
shouldFoldLine
269,409
String (@NotNull Project project, @NotNull List<String> lines) { return "folded"; }
getPlaceholderText
269,410
boolean () { return false; }
shouldBeAttachedToThePreviousLine
269,411
List<RangeHighlighter> () { MarkupModel model = DocumentMarkupModel.forDocument(myConsole.getEditor().getDocument(), getProject(), true); RangeHighlighter[] highlighters = model.getAllHighlighters(); Arrays.sort(highlighters, Comparator.comparingInt(RangeMarker::getStartOffset).thenComparingInt(RangeMarker::getEndOffse...
getAllRangeHighlighters
269,412
void (@NotNull List<? extends RangeHighlighter> actual, @NotNull ExpectedHighlighter @NotNull ... expected) { assertEquals(expected.length, actual.size()); for (int i = 0; i < expected.length; i++) { assertMarkerEquals(expected[i], actual.get(i)); } }
assertMarkersEqual
269,413
void (@NotNull ExpectedHighlighter expected, @NotNull RangeHighlighter actual) { assertEquals(expected.myStartOffset, actual.getStartOffset()); assertEquals(expected.myEndOffset, actual.getEndOffset()); assertEquals(expected.myContentType.getAttributes(), actual.getTextAttributes(null)); assertEquals(expected.myContent...
assertMarkerEquals
269,414
void () { myConsole.type(myConsole.getEditor(), "/"); myConsole.flushDeferredText(); assertEquals("/", myConsole.getText()); assertMarkersEqual(getAllRangeHighlighters(), new ExpectedHighlighter(0, 1, ConsoleViewContentType.USER_INPUT) ); myConsole.type(myConsole.getEditor(), "/"); myConsole.flushDeferredText(); assert...
testTypingMustLeadToMergedUserInputTokensAtTheDocumentEnd
269,415
void () { myConsole.type(myConsole.getEditor(), "2"); myConsole.flushDeferredText(); assertEquals("2", myConsole.getText()); assertMarkersEqual(getAllRangeHighlighters(), new ExpectedHighlighter(0, 1, ConsoleViewContentType.USER_INPUT) ); myConsole.type(myConsole.getEditor(), "\n"); myConsole.flushDeferredText(); myCon...
testEnterDuringTypingMustSeparateUserInputTokens
269,416
void () { mySynchronizer = new MockProcessStreamsSynchronizer(getTestRootDisposable()); mySynchronizer.doWhenStreamsSynchronized("Hello stdout 1\n", ProcessOutputType.STDOUT, 0); mySynchronizer.doWhenStreamsSynchronized("Hello stdout 2\n", ProcessOutputType.STDOUT, 1); mySynchronizer.doWhenStreamsSynchronized("Hello st...
testBasic
269,417
void () { mySynchronizer = new MockProcessStreamsSynchronizer(getTestRootDisposable()); mySynchronizer.doWhenStreamsSynchronized("java HelloWorld\n", ProcessOutputType.SYSTEM, 10); mySynchronizer.doWhenStreamsSynchronized("info:", ProcessOutputType.STDOUT, 10); mySynchronizer.doWhenStreamsSynchronized("warn:", ProcessO...
testSimpleRun
269,418
void () { mySynchronizer = new MockProcessStreamsSynchronizer(getTestRootDisposable()); long startTime = 10; Assert.assertTrue(AWAIT_SAME_STREAM_TEXT_MILLIS >= 3); mySynchronizer.doWhenStreamsSynchronized("info:", ProcessOutputType.STDOUT, startTime); mySynchronizer.doWhenStreamsSynchronized("error\n", ProcessOutputTyp...
testNewlineArrivedLater
269,419
void () { mySynchronizer = new MockProcessStreamsSynchronizer(getTestRootDisposable()); long startTime = 10; Assert.assertTrue(AWAIT_SAME_STREAM_TEXT_MILLIS >= 3); mySynchronizer.doWhenStreamsSynchronized("info:", ProcessOutputType.STDOUT, startTime); mySynchronizer.doWhenStreamsSynchronized("error\n", ProcessOutputTyp...
testNewlineArrivedAfterFirstScheduledProcessing
269,420
void () { PlatformTestUtil.startPerformanceTest("single stream", 30000, () -> { mySynchronizer = new MockProcessStreamsSynchronizer(getTestRootDisposable()); long nowTimeMillis = 10; for (int i = 0; i < 10_000_000; i++) { mySynchronizer.doWhenStreamsSynchronized("Std", ProcessOutputType.STDOUT, nowTimeMillis); mySynchr...
testPerformanceSingleStream
269,421
void () { PlatformTestUtil.startPerformanceTest("two streams", 30000, () -> { mySynchronizer = new MockProcessStreamsSynchronizer(getTestRootDisposable()); long nowTimeMillis = 10; for (int i = 0; i < 10_000_000; i++) { mySynchronizer.doWhenStreamsSynchronized("Std", ProcessOutputType.STDOUT, nowTimeMillis); mySynchron...
testPerformanceTwoStreams
269,422
void (FlushedChunk @NotNull ... expectedFlushedChunks) { Assert.assertEquals(List.of(expectedFlushedChunks), mySynchronizer.getFlushedChunksAndClear()); }
assertFlushedChunks
269,423
void () { Assert.assertEquals(0, mySynchronizer.myFlushedChunkCount - mySynchronizer.myRequestedChunkCount); }
assertNoPendingChunks
269,424
void (long timeMillis) { long nowTimeNano = TimeUnit.MILLISECONDS.toNanos(timeMillis); assert nowTimeNano >= myNowTimeNano; tryAdvanceTimeToNextScheduledProcessing(nowTimeNano); myNowTimeNano = nowTimeNano; }
advanceTimeTo
269,425
void (long nextDataTimeNano) { if (myNextScheduledProcessingTimeNano != -1 && nextDataTimeNano >= myNextScheduledProcessingTimeNano) { myNowTimeNano = myNextScheduledProcessingTimeNano; myNextScheduledProcessingTimeNano = -1; super.processPendingChunks(myNowTimeNano); } }
tryAdvanceTimeToNextScheduledProcessing
269,426
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FlushedChunk chunk = (FlushedChunk)o; return myFlushTimeMillis == chunk.myFlushTimeMillis && myText.equals(chunk.myText) && myOutputType.equals(chunk.myOutputType); }
equals
269,427
int () { return Objects.hash(myText, myOutputType, myFlushTimeMillis); }
hashCode
269,428
String () { return "(text='" + myText + '\'' + ", outputType=" + myOutputType + ", flushTimeMillis=" + myFlushTimeMillis + ")"; }
toString
269,429
void () { check(new ColoredText("", ProcessOutputTypes.STDOUT)); check(new ColoredText("simple text", ProcessOutputTypes.STDOUT).addExpected("simple text", STDOUT_KEY)); }
testTextWithoutColors
269,430
void () { check(new ColoredText("This is \u001B[1;3mItalic Bold", ProcessOutputTypes.STDOUT) .addExpected("This is ", STDOUT_KEY) .addExpected("Italic Bold", "1;3m") ); }
testSequentialSgr
269,431
void () { check(new ColoredText("This is \u001B[1m\u001B[3mItalic Bold", ProcessOutputTypes.STDOUT) .addExpected("This is ", STDOUT_KEY) .addExpected("Italic Bold", "1;3m") ); }
testSequentialSgrOneByOne
269,432
void () { check(new ColoredText("Chrome 35.0.1916 (Linux): Executed 0 of 1\u001B[32m SUCCESS\u001B[39m (0 secs / 0 secs)\n", ProcessOutputTypes.STDOUT) .addExpected("Chrome 35.0.1916 (Linux): Executed 0 of 1", STDOUT_KEY) .addExpected(" SUCCESS", "38;5;2m") .addExpected(" (0 secs / 0 secs)\n", STDOUT_KEY)); }
testSingleColoredChunk
269,433
void () { check(new ColoredText("E\u001B[41m\u001B[37mE\u001B[0mE", ProcessOutputTypes.STDOUT) .addExpected("E", STDOUT_KEY) .addExpected("E", "48;5;1;38;5;7m") .addExpected("E", STDOUT_KEY)); }
testCompoundEscSeq
269,434
void () { check(new ColoredText("Plain\u001B[32mGreen\u001B[39mNormal\u001B[1A\u001B[2K\u001B[31mRed\u001B[39m", ProcessOutputTypes.STDOUT) .addExpected("Plain", STDOUT_KEY) .addExpected("Green", "38;5;2m") .addExpected("Normal", STDOUT_KEY) .addExpected("Red", "38;5;1m")); }
testOtherEscSeq
269,435
void () { check(new ColoredText("\u001B[0m\u001B[32mgreen\u001B[0m\u001B[0K\u001B[?25l\n", ProcessOutputTypes.STDOUT) .addExpected("green", "38;5;2m") .addExpected("\n", STDOUT_KEY) ); }
testPrivateSequence
269,436
void () { check(false, Collections.singletonList(new ColoredText("\u001B[32mGreen\u001B[\1World\n", ProcessOutputTypes.STDOUT) .addExpected("Green", "38;5;2m") .addExpected("\u001B[\1World\n", "38;5;2m") )); }
testMalformedSequence1
269,437
void () { check(false, Collections.singletonList(new ColoredText("\u001B\n", ProcessOutputTypes.STDOUT) .addExpected("\u001B\n", ProcessOutputTypes.STDOUT.toString()) )); }
testMalformedSequence2
269,438
void () { check(false, Collections.singletonList(new ColoredText("\u001B[\n", ProcessOutputTypes.STDOUT) .addExpected("\u001B[\n", ProcessOutputTypes.STDOUT.toString()) )); }
testMalformedSequence3
269,439
void () { check(false, List.of(new ColoredText("\u001B\nHello,", ProcessOutputTypes.STDOUT) .addExpected("\u001B\nHello,", STDOUT_KEY), new ColoredText("\u001B[31mWorld", ProcessOutputTypes.STDOUT) .addExpected("World", "38;5;1m"))); }
testMalformedSequence4
269,440
void () { check(false, List.of(new ColoredText("\u001BHello,", ProcessOutputTypes.STDOUT) .addExpected("\u001BHello,", STDOUT_KEY))); }
testMalformedSequence5
269,441
void () { check(false, List.of(new ColoredText("\u001B[Hello,", ProcessOutputTypes.STDOUT) .addExpected("ello,", STDOUT_KEY))); }
testMalformedSequence6
269,442
void () { check(false, List.of(new ColoredText("something[\u001B]asdf[\u001B[]", ProcessOutputTypes.STDOUT) .addExpected("something[", STDOUT_KEY) .addExpected("\u001B]asdf[", STDOUT_KEY))); }
testMalformedSequence7
269,443
void () { check(true, List.of(new ColoredText("\u001B", ProcessOutputTypes.STDOUT), new ColoredText("[33m Hello\u001B[3", ProcessOutputTypes.STDOUT) .addExpected(" Hello", "38;5;3m"), new ColoredText("4m, Work!", ProcessOutputTypes.STDOUT) .addExpected(", Work!", "38;5;4m"))); }
testIncompleteEscapeSequence1
269,444
void () { check(true, List.of(new ColoredText("\u001B[1m\u001B[33m<" + "\u001B[34mnamespace" + "\u001B[1m", ProcessOutputTypes.STDOUT) .addExpected("<", "1;38;5;3m") .addExpected("namespace", "1;38;5;4m"), new ColoredText("\u001B[33m:abcd" + "\u001B[0m" + "\u001B[1;33m>" + "\u001B[0m0" + "\u001B[1;33m</" + "\u001B[34mn...
testIncompleteEscapeSequence2
269,445
void () { check(false, List.of(new ColoredText("\u001B[1m\u001B[31m red" + "\u001B[0m normal" + "\u001B[1m\u001B[32m green" + "\u001B", ProcessOutputTypes.STDOUT) .addExpected(" red", "1;38;5;1m") .addExpected(" normal", STDOUT_KEY) .addExpected(" green", "1;38;5;2m"), new ColoredText("[0m\n", ProcessOutputTypes.STDOUT...
testIncompleteEscapeSequence3
269,446
void () { check(true, List.of(new ColoredText("\u001B[33m Hello,", ProcessOutputTypes.STDOUT) .addExpected(" Hello,", "38;5;3m"), new ColoredText("World!\n", ProcessOutputTypes.STDERR) .addExpected("World!\n", STDERR_KEY), new ColoredText("\u001B[41m Changed stderr background", ProcessOutputTypes.STDERR) .addExpected("...
testStderr
269,447
void () { check(true, List.of(new ColoredText("Hello \u001B[33m Colored \u001B[0m Normal", ProcessOutputTypes.STDOUT) .addExpected("Hello ", STDOUT_KEY) .addExpected(" Colored ", "38;5;3m") .addExpected(" Normal", STDOUT_KEY))); check(true, List.of(new ColoredText("Hello \u001B[33;41m Colored \u001B[m Normal", ProcessO...
testReset
269,448
void () { check(false, List.of(new ColoredText("\u001B=Hello", ProcessOutputTypes.STDOUT) .addExpected("Hello", STDOUT_KEY))); }
testDECKPAM
269,449
void (@NotNull ColoredText text) { check(true, Collections.singletonList(text)); }
check
269,450
void (boolean testCharByCharProcessing, @NotNull List<ColoredText> texts) { AnsiEscapeDecoder decoder = new AnsiEscapeDecoder(); List<Pair<String, String>> actualColoredChunks = new ArrayList<>(); AnsiEscapeDecoder.ColoredTextAcceptor acceptor = (text, attributes) -> { ProcessOutputType processOutputType = (ProcessOutp...
check
269,451
Process () { // have to be synchronised because used from pooled thread ByteArrayOutputStream outputStream = new ByteArrayOutputStream(10000); Semaphore finished = new Semaphore(1); return new Process() { @Override public OutputStream getOutputStream() { return outputStream; } @Override public InputStream getInputStrea...
createTestProcess
269,452
OutputStream () { return outputStream; }
getOutputStream
269,453
InputStream () { return new ByteArrayInputStream(new byte[0]); }
getInputStream
269,454
InputStream () { return new ByteArrayInputStream(new byte[0]); }
getErrorStream
269,455
int () { finished.waitFor(); return 0; }
waitFor
269,456
int () { return 0; }
exitValue
269,457
void () { finished.up(); }
destroy
269,458
void () { Process testProcess = createTestProcess(); //noinspection CodeBlock2Expr withProcessHandlerFrom(testProcess, handler -> { PlatformTestUtil.startPerformanceTest("ansi color", 8_500, () -> { for (int i = 0; i < 2_000_000; i++) { handler.notifyTextAvailable(i + "Chrome 35.0.1916 (Linux): Executed 0 of 1\u001B[32...
testPerformance
269,459
void (@NotNull Process testProcess, @NotNull Consumer<? super ProcessHandler> actionToTest) { KillableColoredProcessHandler handler = new KillableColoredProcessHandler(testProcess, "testProcess"); handler.setShouldDestroyProcessRecursively(false); handler.setShouldKillProcessSoftly(false); handler.startNotify(); handle...
withProcessHandlerFrom
269,460
ColoredText (@NotNull String text, @NotNull String colorKey) { myExpectedColoredChunks.add(Pair.create(text, colorKey)); return this; }
addExpected
269,461
void () { assertEquals("foo", new ProcessInfo(1, "", "foo", "").getExecutableDisplayName()); assertEquals("foo", new ProcessInfo(1, "", "foo.exe", "").getExecutableDisplayName()); assertEquals("foo", new ProcessInfo(1, "", "foo.EXE", "").getExecutableDisplayName()); assertEquals("foo.bar", new ProcessInfo(1, "", "foo.b...
testExecutableName
269,462
void (boolean blocking) { try { TestBinaryOSProcessHandler handler = new TestBinaryOSProcessHandler(launchTest(), blocking); handler.startNotify(); assertTrue(handler.waitFor(60 * 1000)); assertEquals(0, handler.exitCode); assertThat(handler.stdErr.toString()).isEqualTo(Runner.TEXT); assertThat(handler.getOutput()).con...
doTest
269,463
void (@NotNull String text, @NotNull Key outputType) { if (outputType != ProcessOutputTypes.SYSTEM) { stdErr.append(text); } }
notifyTextAvailable
269,464
void (int exitCode) { super.notifyProcessTerminated(exitCode); this.exitCode = exitCode; }
notifyProcessTerminated
269,465
void () { IoTestUtil.assumeWindows(); }
ensureRightOS
269,466
void () { }
passingArgumentsToJavaAppThroughWinShell
269,467
void () { }
passingArgumentsToJavaAppThroughNestedWinShell
269,468
void () { }
passingArgumentsToJavaAppThroughCmdScriptAndWinShell
269,469
void () { }
passingArgumentsToJavaAppThroughCmdScriptAndNestedWinShell
269,470
void () { }
passingArgumentsToEchoThroughWinShell
269,471
void () { }
winShellCommand
269,472
void () { }
winShellScriptQuoting
269,473
void () { }
winShellQuotingWithExtraSwitch
269,474
void () { assertNotEmpty(Arrays.asList(OSProcessUtil.getProcessList())); if (SystemInfo.isWindows) { assertNotEmpty(Arrays.asList(ProcessListUtil.getProcessListUsingWindowsTaskList())); assertNotEmpty(Arrays.asList(ProcessListUtil.getProcessListUsingWindowsWMIC())); } }
testWorksOnAllPlatforms
269,475
void () { List<ProcessInfo> infos = ProcessListUtil.parseMacOutput( """ PID PPID STAT USER COMM 1 0 S user /dir/file 2 1 S user ./dir/dir/file 3 2 S user ./dir/dir/file 10000 3 S user ./dir/dir/file""", """ PID PPID STAT USER COMMAND 1 0 S user /dir/file 2 1 S user ./dir/dir/file 3 2 S user ./dir/dir/file param param 1...
testMac_Basic
269,476
void () { List<ProcessInfo> infos = ProcessListUtil.parseMacOutput( """ PID PPID STAT USER COMM 1 0 S user /dir/file 2 1 S user /dir/file """, """ PID PPID STAT USER COMMAND 1 0 S user /dir/file 5 1 S user /dir/file """ ); assertOrderedEquals(infos, new ProcessInfo(1, "/dir/file", "file", "", "/dir/file", 0, "user", Th...
testMac_DoNotIncludeProcessedMissingOnTheSecondPSRun
269,477
void () { List<ProcessInfo> infos = ProcessListUtil.parseMacOutput( """ PID PPID STAT USER COMM 1 0 S user /dir/file 2 1 S user /dir/file 3 2 S user /dir/file 4 3 S user /dir/file """, """ PID PPID STAT USER COMMAND 1 0 S user /dir/file param 2 1 S user /dir/ffff 3 2 S user /dir/file1 4 3 S user /dir/file/1 """ ); asse...
testMac_DoNotIncludeProcessedChangedOnTheSecondPSRun
269,478
void () { List<ProcessInfo> infos = ProcessListUtil.parseMacOutput( """ PID PPID STAT USER COMM 1 0 S user /dir/file 2 1 Z user /dir/file 3 1 SZ user /dir/file """, """ PID PPID STAT USER COMM 1 0 S user /dir/file 2 1 Z user /dir/file 3 1 SZ user /dir/file """ ); assertOrderedEquals(infos, new ProcessInfo(1, "/dir/file...
testMac_DoNotIncludeZombies
269,479
void () { List<ProcessInfo> infos = ProcessListUtil.parseMacOutput( """ PID PPID STAT USER COMMAND 1 0 S user /dir/file 101 1 Ss user_name /dir/file """, """ PID PPID STAT USER COMM 1 0 S user /dir/file 101 1 Ss user_name /dir/file """ ); assertOrderedEquals(infos, new ProcessInfo(1, "/dir/file", "file", "", "/dir/file...
testMac_VariousFormsPidStatUser
269,480
void () { assertNull(ProcessListUtil.parseMacOutput( """ PID STAT USER COMM 1 S user /dir/file """, "" )); assertNull(ProcessListUtil.parseMacOutput( "", """ PID STAT USER COMMAND 1 S user /dir/file """ )); assertNull(ProcessListUtil.parseMacOutput( """ PID STAT USER COMM 1 S user /dir/file """, "wrong format" )); asse...
testMac_WrongFormat
269,481
void () { List<ProcessInfo> infos = ProcessListUtil.parseWMICOutput( """ Caption CommandLine ExecutablePath ParentProcessId ProcessId \s smss.exe 0 304 \s sihost.exe sihost.exe 304 3052 \s taskhostw.exe taskhostw.exe {222A245B-E637-4AE9-A93F-A59CA119A75E} 0 3068 \s explorer.exe C:\\WINDOWS\\Explorer.EXE C:\\WINDOWS\\Ex...
testWindows_WMIC
269,482
void () { List<ProcessInfo> infos = ProcessListUtil.parseWMICOutput( """ Caption CommandLine ExecutablePath ParentProcessId ProcessId \s System Idle Process -1 0 \s System 0 4 \s smss.exe 0 304 \s """, Collections.emptyMap(), null); assertOrderedEquals(infos, new ProcessInfo(4, "System", "System", "", null, 0), new Pro...
testOnWindows_WMIC_DoNotIncludeSystemIdleProcess
269,483
void () { assertNull(ProcessListUtil.parseWMICOutput( "", Collections.emptyMap(), null)); assertNull(ProcessListUtil.parseWMICOutput( "wrong format", Collections.emptyMap(), null)); assertEmpty(ProcessListUtil.parseWMICOutput( "Caption CommandLine ExecutablePath ParentProcessId ProcessId \n", Collections.emptyMap(), nu...
testWindows_WMIC_WrongFormat
269,484
void () { List<ProcessInfo> infos = ProcessListUtil.parseListTasksOutput( """ "smss.exe","304","Services","0","224 K","Unknown","N/A","0:00:00","N/A" "sihost.exe","3052","Console","1","10,924 K","Running","VM-WINDOWS\\Anton Makeev","0:00:02","N/A" "taskhostw.exe","3068","Console","1","5,860 K","Running","VM-WINDOWS\\An...
testWindows_TaskList
269,485
void () { assertEmpty(ProcessListUtil.parseListTasksOutput("", null)); assertNull(ProcessListUtil.parseListTasksOutput("wrong format", null)); assertNull(ProcessListUtil.parseListTasksOutput("\"\"", null)); assertEmpty(ProcessListUtil.parseListTasksOutput("\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"\n", null)); }
testWindows_TaskList_WrongFormat
269,486
void () { List<ProcessInfo> infos = ProcessListUtil.parseWinProcessListHelperOutput( """ pid:19608 parentPid:0 name:SourceTree.exe cmd:"C:\\\\Users\\\\grahams\\\\AppData\\\\Local\\\\SourceTree\\\\app-3.1.3\\\\SourceTree.exe" pid:12300 parentPid:0 name:conhost.exe cmd:\\\\??\\\\C:\\\\Windows\\\\system32\\\\conhost.exe 0...
testWinProcessListHelperOutputParsing
269,487
void () { String commandOnly = """ PID PPID STAT USER COMM 1 0 S user /dir/file"""; String full = """ PID PPID STAT USER COMMAND 1 0 S user /dir/file"""; List<ProcessInfo> infos = ProcessListUtil.parseMacOutput(commandOnly, full, null); assertOrderedEquals(infos, new ProcessInfo(1, "/dir/file", "file", "", "/dir/file",...
testMacOwnership
269,488
void () { String output = """ Caption CommandLine ExecutablePath ParentProcessId ProcessId \s smss.exe 0 304 \s sihost.exe sihost.exe 304 3052 \s taskhostw.exe taskhostw.exe {222A245B-E637-4AE9-A93F-A59CA119A75E} 0 3068 \s explorer.exe C:\\WINDOWS\\Explorer.EXE C:\\WINDOWS\\Explorer.EXE 3068 3164 \s TPAutoConnect.exe T...
testWMICOwnership
269,489
void () { String output = """ pid:19608 parentPid:0 name:SourceTree.exe cmd:"C:\\\\Users\\\\grahams\\\\AppData\\\\Local\\\\SourceTree\\\\app-3.1.3\\\\SourceTree.exe" pid:12300 parentPid:0 name:conhost.exe cmd:\\\\??\\\\C:\\\\Windows\\\\system32\\\\conhost.exe 0x4 pid:26284 parentPid:0 name:Unity Hub.exe cmd:"C:\\\\Prog...
testWinProcessListHelperOwnership
269,490
void () { assertReady(null); MockProject project1 = new MockProjectEx(getTestRootDisposable()); assertReady(project1); MockProject project2 = new MockProjectEx(getTestRootDisposable()); assertReady(project2); myMonitor.initBusyObjectFor(project1); assertTrue(myMonitor.hasObjectFor(project1)); myMonitor.initBusyObjectFo...
testReady
269,491
void () { final UiActivity root = new UiActivity("root"); final UiActivity op1 = new UiActivity("root", "operation1"); final UiActivity op2 = new UiActivity("root", "operation2"); final UiActivity op12 = new UiActivity("root", "operation1", "operation12"); final UiActivity op121 = new UiActivity("root", "operation1", "...
testReadyWithWatchActivities
269,492
void () { assumeFalse("Test cannot be run in headless environment", GraphicsEnvironment.isHeadless()); assertTrue(ApplicationManager.getApplication().getClass().getName().contains("ApplicationImpl")); ThreadingAssertions.assertEventDispatchThread(); assertReady(null); myMonitor.addActivity(new UiActivity("non_modal_1")...
testModalityState
269,493
void () { assertReady(null); myMonitor.addActivity(new UiActivity("non_modal_1"), ModalityState.any()); assertBusy(null); try { LaterInvocator.enterModal("dialog"); assertBusy(null); } finally { LaterInvocator.leaveModal("dialog"); } }
testModalityStateAny
269,494
void () { assertTrue(new UiActivity("root", "folder1").isSameOrGeneralFor(new UiActivity("root", "folder1"))); assertTrue(new UiActivity("root", "folder1").isSameOrGeneralFor(new UiActivity("root", "folder1", "folder2"))); assertFalse(new UiActivity("root", "folder2").isSameOrGeneralFor(new UiActivity("root", "folder1"...
testUiActivity
269,495
void (@Nullable Project key, UiActivity @NotNull ... activities) { UIUtil.dispatchAllInvocationEvents(); BusyObject.Impl busy = (BusyObject.Impl)(key != null ? myMonitor.getBusy(key, activities) : myMonitor.getBusy(activities)); assertTrue("Must be READY, but was: BUSY", busy.isReady()); final boolean[] done = {false};...
assertReady
269,496
void (@Nullable Project key, UiActivity @NotNull ... activities) { UIUtil.dispatchAllInvocationEvents(); BusyObject.Impl busy = (BusyObject.Impl)(key != null ? myMonitor.getBusy(key, activities) : myMonitor.getBusy(activities)); assertFalse("Must be BUSY, but was: READY", busy.isReady()); }
assertBusy
269,497
void () { int N = 100000; PlatformTestUtil.startPerformanceTest("Event queue dispatch", 10000, () -> { UIUtil.dispatchAllInvocationEvents(); AtomicInteger count = new AtomicInteger(); for (int i = 0; i < N; i++) { SwingUtilities.invokeLater(count::incrementAndGet); } UIUtil.dispatchAllInvocationEvents(); assertEquals(N...
testManyEventsStress
269,498
void (AWTEvent event) { LOG.debug("posting " + event); IdeEventQueue ideEventQueue = IdeEventQueue.getInstance(); boolean posted = ideEventQueue.doPostEvent(event); assertTrue("Was not posted: "+event, posted); boolean mustBeConsumed = event.getID() == ActionEvent.ACTION_PERFORMED; assertEquals(mustBeConsumed, Reflecti...
postCarefully
269,499
boolean (InputEvent event) { return event.isConsumed(); }
isConsumed