Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
269,300 | List<String> () { return List.of(ubuntuName, debianName); } | loadInstalledDistributionMsIds |
269,301 | List<WslDistributionAndVersion> () { return ContainerUtil.map(loadInstalledDistributionMsIds(), s -> new WslDistributionAndVersion(s, 2)); } | loadInstalledDistributionsWithVersions |
269,302 | boolean () { return true; } | isAvailable |
269,303 | boolean () { return true; } | isWslExeSupported |
269,304 | void () { var result = WslDistributionManagerImpl.parseWslVerboseListOutput(List.of( " NAME STATE VERSION", "* Ubuntu-20.04 Stopped 2", " docker-desktop Stopped 2", " docker-desktop-data Stopped 2", " Ubuntu-18.04 Stopped 1")); assertEquals(List.of(new WslDistributionAndVersion("Ubuntu-20.04", 2), new WslDistributionAn... | parseWslVerboseListOutput |
269,305 | void () { try { WslDistributionManagerImpl.parseWslVerboseListOutput(List.of( " NAME STATE VERSION", "", "* Ubuntu-20.04 Has to be stopped 2", " Ubuntu-18.04 Almost stopped 1 ")); fail(); } catch (IllegalStateException e) { assertTrue(e.getMessage().contains("malformed distribution name")); } try { WslDistributionManag... | parseWslVerboseListOutputWithIncorrectDistributionName |
269,306 | void () { try { WslDistributionManagerImpl.parseWslVerboseListOutput(List.of( " NAME STATE VERSION", "* Ubuntu-20.04 Has to be stopped second", " Ubuntu-18.04 Almost stopped 1 ")); fail(); } catch (IllegalStateException e) { assertTrue(e.getMessage().contains("malformed version")); } try { WslDistributionManagerImpl.pa... | parseWslVerboseListOutputWithIncorrectVersion |
269,307 | int () { return Math.max(1, Math.min(10, Runtime.getRuntime().availableProcessors() - 1)); } | getThreadCount |
269,308 | void () { Assertions.assertThat(WSLUtil.getUncPrefix()).isIn(WslConstants.UNC_PREFIX, "\\\\wsl.localhost\\"); } | testUncPrefix |
269,309 | void () { var wsl = wslRule.getWsl(); assertEquals(WSLUtil.getUncPrefix() + wsl.getMsId() + "\\mnt\\cd", wsl.getWindowsPath("/mnt/cd")); assertEquals(WSLUtil.getUncPrefix() + wsl.getMsId()+ "\\mnt", wsl.getWindowsPath("/mnt")); assertEquals(WSLUtil.getUncPrefix() + wsl.getMsId(), wsl.getWindowsPath("")); assertEquals(W... | testWslToWinPath |
269,310 | void () { var wsl = wslRule.getWsl(); assertEquals("/mnt/c/foo", wsl.getWslPath("C:\\foo")); assertEquals("/mnt/c/temp/KeepCase", wsl.getWslPath("C:\\temp\\KeepCase")); assertNull(wsl.getWslPath("?:\\temp\\KeepCase")); assertNull(wsl.getWslPath("c:c")); } | testWinToWslPath |
269,311 | void () { var wsl = wslRule.getWsl(); String originalWinPath = "C:\\usr\\something\\bin\\gcc"; assertEquals(originalWinPath, wsl.getWindowsPath(wsl.getWslPath(originalWinPath))); String originalWslPath = "/mnt/c/usr/bin/gcc"; assertEquals(originalWslPath, wsl.getWslPath(wsl.getWindowsPath(originalWslPath))); } | testPaths |
269,312 | List<Character> () { List<Character> result = new ArrayList<>(); Collections.addAll(result, 'A', 'z', '0'); for (char ch = ' '; ch < 128; ch++) { if (!Character.isLetterOrDigit(ch)) { result.add(ch); } } return result; } | getRepresentativeCharacters |
269,313 | void () { Assert.assertNotEquals("/bin/sh", wslRule.getWsl().getShellPath()); } | testReadShellPath |
269,314 | String (String executableName) { File file = myTempDirectory.newFile(executableName + ".sh", "#!/bin/sh\necho \"$@\"".getBytes(StandardCharsets.UTF_8)); String wslPath = wslRule.getWsl().getWslPath(file.toPath()); assertNotNull("local path: " + file, wslPath); return wslPath; } | createEchoScriptAndGetLinuxPath |
269,315 | String (boolean timeout, String stderr, int exitCode, String stdout) { return "timeout: " + timeout + "\nstderr: " + stderr + "\nexitCode: " + exitCode + "\nstdout: " + stdout; } | stringify |
269,316 | void () { assumeTrue(WSLUtil.isSystemCompatible()); } | compatibilityCheck |
269,317 | Iterable<Object[]> () { return List.of(new Object[]{"\\\\wsl$\\"}, new Object[]{"\\\\wsl.localhost\\"}); } | prefixes |
269,318 | void () { checkParse("", null); checkParse("/mnt/c/usr/bin", null); checkParse("C:\\Users\\user", null); checkParse(prefix.substring(0, prefix.length() - 1), null); checkParse(prefix, null); checkParse(prefix + "Ubuntu", null); checkParse(prefix + "\\etc", null); checkParse(prefix + "Ubuntu\\", new WslPath(prefix, "Ubu... | parsing |
269,319 | void (@NotNull String windowsPath, @Nullable WslPath expectedWslPath) { WslPath actualWslPath = WslPath.parseWindowsUncPath(windowsPath); assertEquals(expectedWslPath, actualWslPath); if (actualWslPath != null) { assertEquals(FileUtil.toSystemDependentName(windowsPath), actualWslPath.toWindowsUncPath()); } } | checkParse |
269,320 | void () { createFilter(FILE); String line = "C:\\Work\\SampleProjects\\makeOutput.cmd"; Filter.Result result = applyFilter(line); assertEquals(0, result.getResultItems().get(0).getHighlightStartOffset()); assertEquals(line.length(), result.getResultItems().get(0).getHighlightEndOffset()); HLInfo info = (HLInfo)result.g... | test |
269,321 | void () { createFilter(FILE + "x" + LINE + "y" + COLUMN); String fileName = "C:\\file"; Filter.Result result = applyFilter(fileName + "x12y34"); assertEquals(0, result.getResultItems().get(0).getHighlightStartOffset()); assertEquals(fileName.length(), result.getResultItems().get(0).getHighlightEndOffset()); HLInfo info... | testFileLineColumn |
269,322 | void () { createFilter(FILE + ":" + LINE + ":" + COLUMN + ".*"); String fileName = "C:/file"; Filter.Result result = applyFilter(fileName + ":12:34.1tail2"); assertEquals(0, result.getResultItems().get(0).getHighlightStartOffset()); assertEquals(fileName.length(), result.getResultItems().get(0).getHighlightEndOffset())... | testFileLineColumnWithTail |
269,323 | void () { createFilter(FILE + ":" + LINE + ":" + COLUMN + ".*"); String fileName = "C:/work/dev/C3C/V9_9_9_9/src/java/strata/p_switch/ss5e/dataSync/BFGParser.java"; String line = fileName + ":544:13:544:13:"; Filter.Result result = applyFilter(line); HLInfo info = (HLInfo) result.getResultItems().get(0).getHyperlinkInf... | test4814 |
269,324 | void () { createFilter("$FILE_PATH$\\s+\\($LINE$\\:$COLUMN$\\)"); String line = "C:\\d ir\\file.ext (1:2)message"; Filter.Result result = applyFilter(line); HLInfo info = (HLInfo)result.getResultItems().get(0).getHyperlinkInfo(); info.checkInfo("C:\\d ir\\file.ext", 0, 1); } | testWithSpaces |
269,325 | void () { createFilter("$FILE_PATH$ def"); String line = "abc def"; assertNull(applyFilter(line)); } | testNonAbsolutePath |
269,326 | void () { createFilter("$FILE_PATH$"); HLInfo info = (HLInfo)applyFilter("error:/usr/local/bar").getResultItems().get(0).getHyperlinkInfo(); info.checkInfo("/usr/local/bar", 0, 0); } | testUnixPathWithSemicolonPrefix |
269,327 | void (String string) { myFilter = new RegexpFilter(null, string){ @Override protected HyperlinkInfo createOpenFileHyperlink(String filePath, int line, int column) { return createOpenFile(filePath, line, column); } }; } | createFilter |
269,328 | HyperlinkInfo (String filePath, int line, int column) { return createOpenFile(filePath, line, column); } | createOpenFileHyperlink |
269,329 | HyperlinkInfo (String fileName, int line, int column) { return new HLInfo(fileName, line, column); } | createOpenFile |
269,330 | void (@NotNull Project project) { } | navigate |
269,331 | void (String fileName, int line, int column) { assertEquals(fileName, myFileName); assertEquals(line, myLine); assertEquals(column, myColumn); } | checkInfo |
269,332 | void () { Assert.assertNull(applyFilter()); myCompositeFilter.addFilter(returnNullFilter()); Assert.assertNull(applyFilter()); myCompositeFilter.addFilter(returnContinuingResultFilter()); notNullResultOfSize(applyFilter(), 1); myCompositeFilter.addFilter(returnNullFilter()); myCompositeFilter.addFilter(returnContinuing... | testApplyNextFilter |
269,333 | void () { myCompositeFilter.addFilter(throwSOEFilter()); try { Assert.assertNull(applyFilter()); Assert.fail("Exception expected"); } catch (Exception e) { Assert.assertTrue(e.getMessage().contains("Error while applying com.intellij.execution.filters.CompositeFilterTest$")); } } | testApplyBadFilter |
269,334 | void (Filter.Result object, int expected) { Assert.assertNotNull(object); List<Filter.ResultItem> resultItems = object.getResultItems(); Assert.assertEquals(expected, resultItems.size()); for (Filter.ResultItem resultItem : resultItems) { Assert.assertNotNull(resultItem); } } | notNullResultOfSize |
269,335 | Filter () { //noinspection InfiniteRecursion return new Filter() { @Nullable @Override public Result applyFilter(@NotNull String line, int entireLength) { return applyFilter(line, entireLength); } }; } | throwSOEFilter |
269,336 | Result (@NotNull String line, int entireLength) { return applyFilter(line, entireLength); } | applyFilter |
269,337 | Filter () { return (__1, __2) -> null; } | returnNullFilter |
269,338 | Filter () { return (__1, __2) -> createFilterResult(); } | returnResultFilter |
269,339 | Filter () { return (__1, __2) -> { Filter.Result result = createFilterResult(); result.setNextAction(Filter.NextAction.CONTINUE_FILTERING); return result; }; } | returnContinuingResultFilter |
269,340 | void () { assertFileHyperlink(" at file:///home/file.txt", 4, 25, "/home/file.txt", 1, 1); assertFileHyperlink("file:///home/file.txt", 0, 21, "/home/file.txt", 1, 1); assertFileHyperlink("text before file:///home/file.txt:3 some test after", 12, 35, "/home/file.txt", 3, 1); assertFileHyperlink("text before file:///hom... | testSingleFileHyperlink |
269,341 | void () { assertBrowserHyperlink("http://test.com", 0, 15); assertBrowserHyperlink(" at http://test.com", 4, 19); assertBrowserHyperlink("http://test.com?q=text&", 0, 23); } | testSingleBrowserHyperlink |
269,342 | void () { assertHyperlinks(applyFilter("file:///home/file1.txt -> file:///home/file2.txt"), List.of( new FileLinkInfo(0, 22, "/home/file1.txt", 1, 1), new FileLinkInfo(26, 48, "/home/file2.txt", 1, 1) )); } | testMultipleHyperlinks |
269,343 | void () { List<LinkInfo> expected = List.of(new FileLinkInfo(7, 30, "/home/file.txt", 3, 1), new FileLinkInfo(34, 62, "/home/result.txt", 3, 30)); PlatformTestUtil.startPerformanceTest("Find file hyperlinks", 3000, () -> { for (int i = 0; i < 100_000; i++) { Filter.Result result = applyFilter("before file:///home/file.... | testPerformanceSimple |
269,344 | void () { assertFileHyperlink("e file:///home/path%20with%20space/file.kt:3 Expecting an expression", 2, 44, "/home/path with space/file.kt", 3, 1); assertFileHyperlink("w file:///home/wrongly%EncodedPath/file.kt:3:10 Variable 'q' is never used", 2, 47, "/home/wrongly%EncodedPath/file.kt", 3, 10); assertFileHyperlink("... | testUrlEncodedFileLinks |
269,345 | void (@NotNull String text, int highlightStartOffset, int highlightEndOffset, @NotNull String filePath, int line, int column) { assertHyperlinks(applyFilter(text), List.of(new FileLinkInfo(highlightStartOffset, highlightEndOffset, filePath, line, column))); } | assertFileHyperlink |
269,346 | void (@NotNull String text, int highlightStartOffset, int highlightEndOffset) { assertHyperlinks(applyFilter(text), List.of(new LinkInfo(highlightStartOffset, highlightEndOffset))); } | assertBrowserHyperlink |
269,347 | void (@NotNull Filter.Result result, List<LinkInfo> infos) { List<Filter.ResultItem> items = result.getResultItems(); assertEquals(infos.size(), items.size()); for (int i = 0; i < infos.size(); i++) { assertHyperlink(items.get(i), infos.get(i)); } } | assertHyperlinks |
269,348 | void (@NotNull Filter.ResultItem actualItem, @NotNull UrlFilterTest.LinkInfo expectedLinkInfo) { assertEquals(expectedLinkInfo.myHighlightStartOffset, actualItem.getHighlightStartOffset()); assertEquals(expectedLinkInfo.myHighlightEndOffset, actualItem.getHighlightEndOffset()); if (expectedLinkInfo instanceof FileLinkI... | assertHyperlink |
269,349 | void (@NotNull FileLinkInfo expected, @NotNull UrlFilter.FileUrlHyperlinkInfo actual) { assertEquals(expected.myFilePath, actual.myFilePath); assertEquals(expected.myLine, actual.myDocumentLine + 1); assertEquals(expected.myColumn, actual.myDocumentColumn + 1); } | assertFileLink |
269,350 | String (@NotNull String output) { if (SystemInfo.isWindows) { output = StringUtil.trimTrailing(expandTabs(output, 8)); } return output; } | filterExpectedOutput |
269,351 | GeneralCommandLine (String... command) { return new PtyCommandLine(Arrays.asList(command)).withWindowsAnsiColorDisabled(); } | createCommandLine |
269,352 | void () { } | redirectInput |
269,353 | void () { final ConsoleViewImpl console1 = ConsoleViewImplTest.createConsole(false, getProject()); final ConsoleViewImpl console2 = ConsoleViewImplTest.createConsole(false, getProject()); final DuplexConsoleView<ConsoleViewImpl, ConsoleViewImpl> duplexConsoleView = new DuplexConsoleView<>(console1, console2); Disposer.... | testMergeSameConsoles |
269,354 | void () { final ConsoleViewImpl console1 = ConsoleViewImplTest.createConsole(false, getProject()); final ConsoleViewImpl console2 = createConsoleWithReversedActions(); final DuplexConsoleView<ConsoleViewImpl, ConsoleViewImpl> duplexConsoleView = new DuplexConsoleView<>(console1, console2); Disposer.register(myDisposabl... | testMergeReversedConsoles |
269,355 | void () { final ConsoleViewImpl console1 = ConsoleViewImplTest.createConsole(false, getProject()); final ConsoleViewImpl console2 = ConsoleViewImplTest.createConsole(false, getProject()); final DuplexConsoleView<ConsoleViewImpl, ConsoleViewImpl> duplexConsoleView = new DuplexConsoleView<>(console1, console2); Disposer.... | testMergedClear |
269,356 | void (AnAction[] mergedActions, String... actionNames) { for (String name : actionNames) { assertNotNull(name + " in " + Arrays.toString(mergedActions), findAction(mergedActions, name)); } } | assertHasActions |
269,357 | AnAction (AnAction @NotNull [] actions, @NotNull String name) { return ContainerUtil.find(actions, action -> action.getTemplatePresentation().toString().contains(name)); } | findAction |
269,358 | ConsoleViewImpl () { Project project = getProject(); ConsoleViewImpl console = new ConsoleViewImpl(project, GlobalSearchScope.allScope(project), false, false) { @Override public AnAction @NotNull [] createConsoleActions() { return ContainerUtil.reverse(Arrays.asList(super.createConsoleActions())).toArray(AnAction.EMPTY... | createConsoleWithReversedActions |
269,359 | void () { ConsoleViewImpl console = myConsole; console.print("Initial", ConsoleViewContentType.NORMAL_OUTPUT); console.flushDeferredText(); console.clear(); console.print("Hi", ConsoleViewContentType.NORMAL_OUTPUT); console.waitAllRequests(); UIUtil.dispatchAllInvocationEvents(); assertEquals(2, console.getContentSize(... | testTypeText |
269,360 | void () { ConsoleViewImpl console = myConsole; console.print("Initial", ConsoleViewContentType.USER_INPUT); console.flushDeferredText(); console.clear(); console.print("Hi", ConsoleViewContentType.USER_INPUT); console.waitAllRequests(); UIUtil.dispatchAllInvocationEvents(); assertEquals(2, console.getContentSize()); as... | testTypeBeforeSelectionMustNotLeadToInvalidOffset |
269,361 | void () { ConsoleViewImpl console = myConsole; Alarm alarm = new Alarm(getTestRootDisposable()); for (int i=0; i<1000/*000*/; i++) { CountDownLatch latch = new CountDownLatch(1); alarm.addRequest(() -> { console.clear(); console.print("Test", ConsoleViewContentType.NORMAL_OUTPUT); console.scrollTo(0); latch.countDown()... | testConsolePrintsSomethingAfterClearPrintScroll |
269,362 | void () { ConsoleViewImpl console = myConsole; console.clear(); EditorActionManager.getInstance(); DataContext dataContext = DataManager.getInstance().getDataContext(console.getComponent()); TypedAction action = TypedAction.getInstance(); action.actionPerformed(console.getEditor(), 'h', dataContext); assertEquals(1, co... | testTypeInEmptyConsole |
269,363 | void () { final TypedAction typedAction = TypedAction.getInstance(); final ConsoleViewImpl console = myConsole; final Editor editor = console.getEditor(); final DataContext dataContext = ((EditorEx)editor).getDataContext(); console.print("System output\n", ConsoleViewContentType.SYSTEM_OUTPUT); console.print("\r\r\r\r\... | testTypingAfterMultipleCR |
269,364 | void () { ConsoleViewImpl console = myConsole; console.clear(); console.print("Hello\r", ConsoleViewContentType.NORMAL_OUTPUT); console.print("\nWorld", ConsoleViewContentType.NORMAL_OUTPUT); console.flushDeferredText(); assertEquals("Hello\nWorld", console.getText()); } | testCRLF |
269,365 | void () { myConsole.print("\rHi\rMr\rSmith", ConsoleViewContentType.NORMAL_OUTPUT); myConsole.flushDeferredText(); assertEquals("Smith", myConsole.getText()); } | testCRTypeCR |
269,366 | void () { myConsole.print("Hi", ConsoleViewContentType.NORMAL_OUTPUT); myConsole.print("\rMr\rSmith", ConsoleViewContentType.NORMAL_OUTPUT); myConsole.flushDeferredText(); assertEquals("Smith", myConsole.getText()); } | testCRTypeTearCR |
269,367 | void () { myConsole.print("Hi", ConsoleViewContentType.NORMAL_OUTPUT); myConsole.flushDeferredText(); assertEquals("Hi", myConsole.getText()); myConsole.print("\rMr\rSmith", ConsoleViewContentType.NORMAL_OUTPUT); myConsole.flushDeferredText(); assertEquals("Smith", myConsole.getText()); } | testCRTypeFlushCR |
269,368 | void () { assertCaretAt(0, 0); myConsole.print("Hi", ConsoleViewContentType.NORMAL_OUTPUT); myConsole.flushDeferredText(); assertCaretAt(0, 2); myConsole.print("\nprompt:", ConsoleViewContentType.NORMAL_OUTPUT); myConsole.flushDeferredText(); assertCaretAt(1, 7); } | testCaretAfterMultilineOutput |
269,369 | void (int line, int column) { LogicalPosition position = myConsole.getEditor().getCaretModel().getLogicalPosition(); assertEquals(line, position.line); assertEquals(column, position.column); } | assertCaretAt |
269,370 | ConsoleViewImpl () { return createConsole(false, getProject()); } | createConsole |
269,371 | ConsoleViewImpl (boolean usePredefinedMessageFilter, Project project) { ConsoleViewImpl console = new ConsoleViewImpl(project, GlobalSearchScope.allScope(project), false, usePredefinedMessageFilter); console.getComponent(); // initConsoleEditor() ProcessHandler processHandler = new NopProcessHandler(); processHandler.s... | createConsole |
269,372 | void () { withCycleConsoleNoFolding(1, console -> { console.print(StringUtil.repeat("a", 5000), ConsoleViewContentType.NORMAL_OUTPUT); console.print("\n", ConsoleViewContentType.NORMAL_OUTPUT); console.waitAllRequests(); assertEquals(StringUtil.repeat("a", 1023) + "\n", console.getText()); }); } | testDoNotRemoveEverythingWhenOneCharIsPrintedAfterLargeText |
269,373 | void () { withCycleConsoleNoFolding(100, console -> PlatformTestUtil.startPerformanceTest("console print", 15000, () -> { console.clear(); for (int i=0; i<10_000_000; i++) { console.print("xxx\n", ConsoleViewContentType.NORMAL_OUTPUT); console.print("yyy\n", ConsoleViewContentType.SYSTEM_OUTPUT); PlatformTestUtil.dispa... | testPerformance |
269,374 | void () { withCycleConsoleNoFolding(UISettings.getInstance().getConsoleCycleBufferSizeKb(), console -> PlatformTestUtil.startPerformanceTest("console print", 15_000, () -> { console.clear(); for (int i=0; i<20_000_000; i++) { console.print("hello\n", ConsoleViewContentType.NORMAL_OUTPUT); } PlatformTestUtil.dispatchAll... | testLargeConsolePerformance |
269,375 | void () { withCycleConsoleNoFolding(1000, console -> PlatformTestUtil.startPerformanceTest("console print with mergeable tokens", 3500, () -> { console.clear(); for (int i=0; i<10_000_000; i++) { console.print("xxx\n", ConsoleViewContentType.NORMAL_OUTPUT); } UIUtil.dispatchAllInvocationEvents(); console.waitAllRequest... | testPerformanceOfMergeableTokens |
269,376 | void (int capacityKB, Consumer<? super ConsoleViewImpl> runnable) { UISettings uiSettings = UISettings.getInstance(); boolean oldUse = uiSettings.getOverrideConsoleCycleBufferSize(); int oldSize = uiSettings.getConsoleCycleBufferSizeKb(); uiSettings.setOverrideConsoleCycleBufferSize(true); uiSettings.setConsoleCycleBuf... | withCycleConsoleNoFolding |
269,377 | void () { withCycleConsoleNoFolding(100, console -> { for (int i=0;i<10_000_000; i++) { console.print("---- "+i+"----", ConsoleViewContentType.NORMAL_OUTPUT); } }); } | testBigOutputDoesntMemoryOverflow |
269,378 | void () { Process testProcess = AnsiEscapeDecoderTest.createTestProcess(); ByteArrayOutputStream outputStream = (ByteArrayOutputStream)testProcess.getOutputStream(); AnsiEscapeDecoderTest.withProcessHandlerFrom(testProcess, handler -> withCycleConsoleNoFolding(100, console -> { console.attachToProcess(handler); outputS... | testUserInputIsSentToProcessAfterNewLinePressed |
269,379 | void () { Process testProcess = AnsiEscapeDecoderTest.createTestProcess(); ByteArrayOutputStream outputStream = (ByteArrayOutputStream)testProcess.getOutputStream(); AnsiEscapeDecoderTest.withProcessHandlerFrom(testProcess, handler -> withCycleConsoleNoFolding(100, console -> { console.attachToProcess(handler); outputS... | testUserTypingIsSentToProcessAfterNewLinePressed |
269,380 | void (Editor editor, char c) { EditorActionManager.getInstance(); TypedAction action = TypedAction.getInstance(); DataContext dataContext = ((EditorEx)editor).getDataContext(); action.actionPerformed(editor, c, dataContext); } | typeIn |
269,381 | void () { final ConsoleViewImpl console = myConsole; final Editor editor = console.getEditor(); console.print("xxxx", ConsoleViewContentType.NORMAL_OUTPUT); console.print("a", ConsoleViewContentType.USER_INPUT); console.print("b", ConsoleViewContentType.USER_INPUT); console.print("c", ConsoleViewContentType.USER_INPUT)... | testBackspaceDoesDeleteTheLastTypedChar |
269,382 | void (ConsoleViewImpl consoleView) { Editor editor = consoleView.getEditor(); Set<Shortcut> backShortcuts = Set.of(ActionManager.getInstance().getAction(IdeActions.ACTION_EDITOR_BACKSPACE).getShortcutSet().getShortcuts()); List<AnAction> actions = ActionUtil.getActions(consoleView.getEditor().getContentComponent()); An... | backspace |
269,383 | void () { Disposer.dispose(myConsole); // have to re-init extensions List<Pair<String, ConsoleViewContentType>> registered = new ArrayList<>(); ConsoleInputFilterProvider crazyProvider = project -> new InputFilter[]{ (text, contentType) -> { registered.add(Pair.create(text, contentType)); return Collections.singletonLi... | testInputFilter |
269,384 | void () { Disposer.dispose(myConsole); // have to re-init extensions ConsoleDependentInputFilterProvider filterProvider = new ConsoleDependentInputFilterProvider() { @Override public @NotNull List<InputFilter> getDefaultFilters(@NotNull ConsoleView consoleView, @NotNull Project project, @NotNull GlobalSearchScope scope... | testConsoleDependentInputFilter |
269,385 | List<InputFilter> (@NotNull ConsoleView consoleView, @NotNull Project project, @NotNull GlobalSearchScope scope) { return List.of((text, contentType) -> Collections.singletonList(Pair.create("!" + text + "!", contentType))); } | getDefaultFilters |
269,386 | void () { HyperlinkInfo predefinedHyperlink = project -> {}; Filter predefinedFilter = (line, entireLength) -> new Filter.Result(0, 1, predefinedHyperlink); HyperlinkInfo customHyperlink = project -> {}; Filter customFilter = (line, entireLength) -> new Filter.Result(0, 10, customHyperlink); Disposer.dispose(myConsole)... | testCustomFiltersPrecedence |
269,387 | void () { HyperlinkInfo customHyperlink = project -> { }; Filter customFilter = (line, entireLength) -> { try { TimeUnit.MILLISECONDS.sleep(100); } catch (InterruptedException ignored) { } return new Filter.Result(0, 10, customHyperlink); }; myConsole.addMessageFilter(customFilter); myConsole.print("the only line", Con... | testSeveralUpdatesDoNotProduceDuplicateHyperlinks |
269,388 | void () { ExpirableTokenProvider tokenProvider = new ExpirableTokenProvider(); Expirable token1 = tokenProvider.createExpirable(); assertFalse(token1.isExpired()); tokenProvider.invalidateAll(); assertTrue(token1.isExpired()); Expirable token2 = tokenProvider.createExpirable(); assertFalse(token2.isExpired()); } | testExpirableTokenProvider |
269,389 | void () { HyperlinkInfo customHyperlink = project -> { }; Filter customFilter = (line, entireLength) -> { try { TimeUnit.MILLISECONDS.sleep(500); } catch (InterruptedException ignored) { } return new Filter.Result(0, 10, customHyperlink); }; myConsole.addMessageFilter(customFilter); myConsole.print("the only line", Con... | testNotHighlightedWhenExpired |
269,390 | void () { assertPrintedText(new String[]{"Test", "\b"}, "Tes"); assertPrintedText(new String[]{"Test", "\b", "\b"}, "Te"); assertPrintedText(new String[]{"Hello", "\b\b\b\b", "allo"}, "Hallo"); assertPrintedText(new String[]{"A\b\b\bha\bop", "\bul\bpp", "\b\bsl\be"}, "house"); assertPrintedText(new String[]{"\b\bTest\b... | testBackspaceDeletesPreviousOutput |
269,391 | void (String @NotNull [] textToPrint, @NotNull String expectedText) { myConsole.clear(); myConsole.waitAllRequests(); assertEquals("", myConsole.getText()); for (String text : textToPrint) { myConsole.print(text, ConsoleViewContentType.NORMAL_OUTPUT); } myConsole.flushDeferredText(); assertEquals(expectedText, myConsol... | assertPrintedText |
269,392 | void () { int nCopies = 10000; String in = StringUtil.repeat("\na\nb\bc", nCopies); PlatformTestUtil.startPerformanceTest("print newlines with backspace", 5000, () -> { for (int i = 0; i < 2; i++) { myConsole.clear(); int printCount = ConsoleBuffer.getCycleBufferSize() / in.length(); for (int j = 0; j < printCount; j++... | testBackspacePerformance |
269,393 | void () { myConsole.print("Starting\n", ConsoleViewContentType.NORMAL_OUTPUT); myConsole.print("Hello", ConsoleViewContentType.ERROR_OUTPUT); myConsole.print("\b\b\b\bDone", ConsoleViewContentType.SYSTEM_OUTPUT); myConsole.flushDeferredText(); assertEquals("Starting\nHDone", myConsole.getText()); List<RangeHighlighter>... | testBackspaceChangesHighlightingRanges1 |
269,394 | void () { myConsole.print("Ready\n\bSet\b\b\b\b\bSteady\n", ConsoleViewContentType.NORMAL_OUTPUT); myConsole.print("\b\b\bGo", ConsoleViewContentType.ERROR_OUTPUT); myConsole.print("token1", ConsoleViewContentType.SYSTEM_OUTPUT); myConsole.print("\b\b\b\btoken2\bX\n", ConsoleViewContentType.NORMAL_OUTPUT); myConsole.pr... | testBackspaceChangesHighlightingRanges2 |
269,395 | void () { myConsole.print("Test1\n", ConsoleViewContentType.NORMAL_OUTPUT); myConsole.print("Test2", ConsoleViewContentType.SYSTEM_OUTPUT); myConsole.print("\b\b\b\b\b\b", ConsoleViewContentType.ERROR_OUTPUT); myConsole.flushDeferredText(); assertEquals("Test1\n", myConsole.getText()); assertMarkersEqual(getAllRangeHig... | testBackspaceChangesHighlightingRanges3 |
269,396 | 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... | testSubsequentFoldsAreCombined |
269,397 | boolean (@NotNull Project project, @NotNull String line) { return line.contains("FOO"); } | shouldFoldLine |
269,398 | String (@NotNull Project project, @NotNull List<String> lines) { return "folded"; } | getPlaceholderText |
269,399 | 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... | testSubsequentNonAttachedFoldsAreCombined |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.