Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
254,700 | boolean () { return isTextDisabled; } | isTextDisabled |
254,701 | boolean () { return isTextRaw; } | isTextRaw |
254,702 | boolean () { return isTextStrikeout; } | isTextStrikeout |
254,703 | boolean () { return isTextDisabledBeforeHighlight; } | isTextDisabledBeforeHighlight |
254,704 | Color () { return textBackground; } | getTextBackground |
254,705 | void (char c) { ApplicationManager.getApplication().invokeAndWait(() -> { EditorActionManager.getInstance(); if (c == '\b') { performEditorAction(IdeActions.ACTION_EDITOR_BACKSPACE); return; } if (c == '\n') { if (performEditorAction(IdeActions.ACTION_CHOOSE_LOOKUP_ITEM)) { return; } if (performEditorAction(IdeActions.... | type |
254,706 | void (@NotNull String s) { for (int i = 0; i < s.length(); i++) { type(s.charAt(i)); } } | type |
254,707 | boolean (@NotNull String actionId) { final DataContext dataContext = getEditorDataContext(); final ActionManagerEx managerEx = ActionManagerEx.getInstanceEx(); final AnAction action = managerEx.getAction(actionId); final AnActionEvent event = new AnActionEvent(null, dataContext, ActionPlaces.UNKNOWN, new Presentation()... | performEditorAction |
254,708 | DataContext () { return ((EditorEx)myEditor).getDataContext(); } | getEditorDataContext |
254,709 | PsiFile () { return ReadAction.compute(() -> PsiManager.getInstance(myProject).findFile(myFile)); } | getFile |
254,710 | List<HighlightInfo> () { return doHighlighting(false, false); } | doHighlighting |
254,711 | List<HighlightInfo> (boolean myAllowDirt, boolean readEditorMarkupModel) { EdtTestUtil.runInEdtAndWait(() -> PsiDocumentManager.getInstance(myProject).commitAllDocuments()); PsiFile file = getFile(); Editor editor = myEditor; if (editor instanceof EditorWindow) { editor = ((EditorWindow)editor).getDelegate(); file = In... | doHighlighting |
254,712 | Editor () { return InjectedLanguageUtil.getEditorForInjectedLanguageNoCommit(myEditor, getFile()); } | getCompletionEditor |
254,713 | LookupImpl () { return (LookupImpl)LookupManager.getActiveLookup(myEditor); } | getLookup |
254,714 | LookupElement[] (@NotNull final CompletionType type) { return complete(type, 1); } | complete |
254,715 | LookupElement[] () { return complete(CompletionType.BASIC); } | completeBasic |
254,716 | LookupElement[] (@NotNull final CompletionType type, final int invocationCount) { myEmptyLookup = false; ApplicationManager.getApplication().invokeAndWait(() -> CommandProcessor.getInstance().executeCommand(myProject, () -> { final CodeCompletionHandlerBase handler = new CodeCompletionHandlerBase(type) { @Override prot... | complete |
254,717 | void (CompletionProgressIndicator indicator, boolean hasModifiers) { myEmptyLookup = indicator.getLookup().getItems().isEmpty(); super.completionFinished(indicator, hasModifiers); } | completionFinished |
254,718 | List<String> () { final LookupElement[] elements = getLookupElements(); if (elements == null) return null; return ContainerUtil.map(elements, LookupElement::getLookupString); } | getLookupElementStrings |
254,719 | List<LookupElement> (@Nullable final Character charToTypeAfterCompletion) { final CaretModel caretModel = myEditor.getCaretModel(); final List<Caret> carets = caretModel.getAllCarets(); final List<Integer> originalOffsets = new ArrayList<>(carets.size()); for (final Caret caret : carets) { originalOffsets.add(caret.get... | completeBasicAllCarets |
254,720 | void (final int selected, final String @NotNull ... expected) { final LookupImpl lookup = getLookup(); assertNotNull("No lookup is shown", lookup); final JList<LookupElement> list = lookup.getList(); List<String> strings = getLookupElementStrings(); assertNotNull(strings); final List<String> actual = ContainerUtil.getF... | assertPreferredCompletionItems |
254,721 | void (char completionChar) { Runnable command = () -> { LookupImpl lookup = (LookupImpl)LookupManager.getActiveLookup(myEditor); assertNotNull(lookup); lookup.finishLookup(completionChar); }; CommandProcessor.getInstance().executeCommand(myProject, command, null, null, myEditor.getDocument()); } | finishLookup |
254,722 | PsiElement () { Editor editor = getCompletionEditor(); int findTargetFlags = TargetElementUtil.REFERENCED_ELEMENT_ACCEPTED | TargetElementUtil.ELEMENT_NAME_ACCEPTED; PsiElement element = TargetElementUtil.findTargetElement(editor, findTargetFlags); // if no references found in injected fragment, try outer document if (... | getElementAtCaret |
254,723 | List<IntentionAction> () { List<HighlightInfo> infos = doHighlighting(); List<IntentionAction> actions = new ArrayList<>(); for (HighlightInfo info : infos) { info.findRegisteredQuickFix((descriptor, range) -> { actions.add(descriptor.getAction()); return null; }); } return actions; } | getAllQuickFixes |
254,724 | List<Crumb> () { FileBreadcrumbsCollector breadcrumbsCollector = FileBreadcrumbsCollector.findBreadcrumbsCollector(myProject, myFile); return ContainerUtil.newArrayList(breadcrumbsCollector.computeCrumbs(myFile, myEditor.getDocument(), myEditor.getCaretModel().getOffset(), true)); } | getBreadcrumbsAtCaret |
254,725 | Editor () { return myEditor; } | getEditor |
254,726 | void (@NotNull Editor editor, @NotNull LightweightHint hint, int flags, @NotNull HintHint hintInfo) { hint.putUserData(LightweightHint.SHOWN_AT_DEBUG, Boolean.TRUE); myCurrentHint = hint; hint.addHintListener(event -> { LightweightHint source = (LightweightHint)event.getSource(); source.putUserData(LightweightHint.SHOW... | hintShown |
254,727 | String () { return myCurrentHint == null ? null : removeCurrentParameterColor(myCurrentHint.getComponent().toString()); } | getCurrentHintText |
254,728 | String (String text) { return text == null ? null : text.replace("<b color=1d1d1d>", "<b>"); } | removeCurrentParameterColor |
254,729 | Class<T> () { //noinspection unchecked,rawtypes return (Class)EmptyModuleFixtureBuilder.class; } | getModuleBuilderClass |
254,730 | void (T moduleBuilder) {} | tuneFixture |
254,731 | String () { return ""; } | getBasePath |
254,732 | String () { String path = isCommunity() ? PlatformTestUtil.getCommunityPath() : IdeaTestExecutionPolicy.getHomePathWithPolicy(); return path.replace(File.separatorChar, '/') + getBasePath(); } | getTestDataPath |
254,733 | boolean () { return false; } | isCommunity |
254,734 | Project () { return myFixture.getProject(); } | getProject |
254,735 | Editor () { return myFixture.getEditor(); } | getEditor |
254,736 | PsiFile () { return myFixture.getFile(); } | getFile |
254,737 | EditorMouseFixture (int x, int y) { return pressAt(1, new Point(x, y)); } | pressAtXY |
254,738 | EditorMouseFixture (int visualLine, int visualColumn) { return pressAt(1, getPoint(visualLine, visualColumn)); } | pressAt |
254,739 | EditorMouseFixture (int visualLine) { assert myEditor.getSettings().isLineNumbersShown(); return pressAt(myEditor.getGutterComponentEx(), 1, new Point(0, myEditor.visualLineToY(visualLine))); } | pressAtLineNumbers |
254,740 | EditorMouseFixture (int clickCount, Point p) { JComponent component = myEditor.getContentComponent(); return pressAt(component, clickCount, p); } | pressAt |
254,741 | EditorMouseFixture (Component component, int clickCount, Point p) { component.dispatchEvent(new MouseEvent(myLastComponent = component, myLastId = MouseEvent.MOUSE_PRESSED, System.currentTimeMillis(), myModifiers | getModifiersForButtonPress(myButton), myX = p.x, myY = p.y, myLastClickCount = clickCount, false, // Wind... | pressAt |
254,742 | EditorMouseFixture () { int oldLastId = myLastId; int clickCount = myLastId == MouseEvent.MOUSE_PRESSED ? myLastClickCount : 0; myLastComponent.dispatchEvent(new MouseEvent(myLastComponent, myLastId = MouseEvent.MOUSE_RELEASED, System.currentTimeMillis(), myModifiers | getModifiersForButtonRelease(myButton), myX, myY, ... | release |
254,743 | EditorMouseFixture (int x, int y) { return pressAtXY(x, y).release(); } | clickAtXY |
254,744 | EditorMouseFixture (int visualLine, int visualColumn) { return pressAt(visualLine, visualColumn).release(); } | clickAt |
254,745 | EditorMouseFixture (int visualLine, int visualColumn) { return doubleClickNoReleaseAt(visualLine, visualColumn).release(); } | doubleClickAt |
254,746 | EditorMouseFixture (int visualLine, int visualColumn) { return clickAt(visualLine, visualColumn).pressAt(2, getPoint(visualLine, visualColumn)); } | doubleClickNoReleaseAt |
254,747 | EditorMouseFixture (int visualLine, int visualColumn) { return doubleClickAt(visualLine, visualColumn).pressAt(3, getPoint(visualLine, visualColumn)).release(); } | tripleClickAt |
254,748 | EditorMouseFixture (int visualLine, int visualColumn) { Point p = getPoint(visualLine, visualColumn); return moveToXY(p.x, p.y); } | moveTo |
254,749 | EditorMouseFixture (int visualLine, int visualColumn) { Point p = getPoint(visualLine, visualColumn); return dragToXY(p.x, p.y); } | dragTo |
254,750 | EditorMouseFixture (int visualLine) { assert myEditor.getSettings().isLineNumbersShown(); return dragToXY(myEditor.getGutterComponentEx(), 0, myEditor.visualLineToY(visualLine)); } | dragToLineNumbers |
254,751 | EditorMouseFixture (int x, int y) { Component component = myEditor.getContentComponent(); component.dispatchEvent(new MouseEvent(component, myLastId = MouseEvent.MOUSE_MOVED, System.currentTimeMillis(), myModifiers, myX = x, myY = y, myLastClickCount = 0, false, 0)); return this; } | moveToXY |
254,752 | EditorMouseFixture (int x, int y) { Assert.assertFalse("Cannot test mouse dragging: editor visible size is not set. Use EditorTestUtil.setEditorVisibleSize(width, height)", myEditor.getScrollingModel().getVisibleArea().isEmpty()); JComponent component = myEditor.getContentComponent(); return dragToXY(component, x, y); ... | dragToXY |
254,753 | EditorMouseFixture (JComponent component, int x, int y) { component.dispatchEvent(new MouseEvent(component, myLastId = MouseEvent.MOUSE_DRAGGED, System.currentTimeMillis(), myModifiers | getModifiersForButtonPress(myButton), myX = x, myY = y, myLastClickCount = 1, false, 0)); return this; } | dragToXY |
254,754 | EditorMouseFixture () { myModifiers |= SystemInfo.isMac ? InputEvent.META_DOWN_MASK : InputEvent.CTRL_DOWN_MASK; return this; } | ctrl |
254,755 | EditorMouseFixture () { myModifiers |= InputEvent.ALT_DOWN_MASK; return this; } | alt |
254,756 | EditorMouseFixture () { myModifiers |= InputEvent.SHIFT_DOWN_MASK; return this; } | shift |
254,757 | EditorMouseFixture () { myModifiers = 0; return this; } | noModifiers |
254,758 | EditorMouseFixture () { myButton = MouseEvent.BUTTON2; return this; } | middle |
254,759 | EditorMouseFixture () { myButton = MouseEvent.BUTTON3; return this; } | right |
254,760 | Point (int visualLine, int visualColumn) { return myEditor.visualPositionToXY(new VisualPosition(visualLine, visualColumn)); } | getPoint |
254,761 | int (int button) { return switch (button) { case MouseEvent.BUTTON1 -> InputEvent.BUTTON1_DOWN_MASK; case MouseEvent.BUTTON2 -> InputEvent.BUTTON2_DOWN_MASK; case MouseEvent.BUTTON3 -> InputEvent.BUTTON3_DOWN_MASK; default -> 0; }; } | getModifiersForButtonPress |
254,762 | int (int button) { return switch (button) { case MouseEvent.BUTTON2 -> InputEvent.ALT_DOWN_MASK; case MouseEvent.BUTTON3 -> InputEvent.META_DOWN_MASK; default -> 0; }; } | getModifiersForButtonRelease |
254,763 | void (Project project, Disposable testRootDisposable, String testDataPath) { } | setUp |
254,764 | TempDirTestFixture () { return new LightTempDirTestFixtureImpl(true); } | createTempDirTestFixture |
254,765 | boolean () { return true; } | runInDispatchThread |
254,766 | void (@NotNull PsiFile file) { } | testFileConfigured |
254,767 | void (@NotNull PsiDirectory directory) { } | testDirectoryConfigured |
254,768 | void (@NotNull PsiFile file) { } | beforeCheckResult |
254,769 | String () { return null; } | getHomePath |
254,770 | void (@NotNull Project project, @NotNull Editor editor) { } | waitForHighlighting |
254,771 | void (@NotNull Project project, @NotNull InspectionToolWrapper<?, ?> toolWrapper, @NotNull Disposable disposable) { } | inspectionToolEnabled |
254,772 | void (@NotNull Key<?> key, @Nullable Object value) { } | testModeFlagChanged |
254,773 | IdeaTestExecutionPolicy () { if (ourCurrent != null) return ourCurrent; String policyClassName = System.getProperty(SYSTEM_PROPERTY_NAME); if (policyClassName == null) return null; try { Class<?> policyClass = Class.forName(policyClassName); ourCurrent = (IdeaTestExecutionPolicy)policyClass.getDeclaredConstructor().new... | current |
254,774 | String () { IdeaTestExecutionPolicy policy = current(); if (policy != null) { String policyHomePath = policy.getHomePath(); if (policyHomePath != null) { return policyHomePath; } } return PathManager.getHomePath(); } | getHomePathWithPolicy |
254,775 | boolean (Class<? extends UsefulTestCase> testCaseClass) { IdeaTestExecutionPolicy current = current(); if (current == null) return true; SkipWithExecutionPolicy annotation = TestCaseLoader.getAnnotationInHierarchy(testCaseClass, SkipWithExecutionPolicy.class); return annotation == null || !annotation.value().equals(cur... | canRun |
254,776 | IdeaTestFixtureFactory () { return ourInstance; } | getFixtureFactory |
254,777 | TestFixtureBuilder<IdeaProjectTestFixture> (@NotNull String name) { return createFixtureBuilder(name, false); } | createFixtureBuilder |
254,778 | String () { return "---"; } | getDelimiter |
254,779 | TestLookupElementPresentation (@NotNull LookupElement e) { TestLookupElementPresentation p = new TestLookupElementPresentation(); try { ReadAction.nonBlocking(()-> { //noinspection rawtypes LookupElementRenderer renderer = e.getExpensiveRenderer(); if (renderer == null) { e.renderElement(p); } else { //noinspection unc... | renderReal |
254,780 | String (boolean lowercaseFirstLetter) { return PlatformTestUtil.getTestName(testName.getMethodName(), lowercaseFirstLetter); } | getTestName |
254,781 | Disposable () { return testFixtureRule.getFixture().getTestRootDisposable(); } | getTestRootDisposable |
254,782 | void () { waitPhase(phase -> !(phase instanceof CompletionPhase.CommittingDocuments || phase instanceof CompletionPhase.Synchronous || phase instanceof CompletionPhase.BgCalculation)); } | joinCompletion |
254,783 | void (Predicate<? super CompletionPhase> condition) { for (int j = 1; j < 1000; j++) { // in EDT to avoid getting the phase in the middle of a complex EDT operation that changes the phase several times CompletionPhase phase = EdtTestUtil.runInEdtAndGet(() -> CompletionServiceImpl.getCompletionPhase()); if (condition.te... | waitPhase |
254,784 | void (Runnable c1) { AtomicBoolean committed = new AtomicBoolean(); AtomicBoolean run = new AtomicBoolean(); AtomicBoolean executed = new AtomicBoolean(true); EdtTestUtil.runInEdtAndWait(() -> executed.set(PsiDocumentManager.getInstance(myFixture.getProject()).performWhenAllCommitted(() -> { run.set(true); ApplicationM... | joinCommit |
254,785 | void () { joinCommit(EmptyRunnable.getInstance()); } | joinCommit |
254,786 | void () { waitPhase(phase -> !(phase instanceof CompletionPhase.CommittingDocuments)); } | joinAutopopup |
254,787 | LookupImpl () { return (LookupImpl)myFixture.getLookup(); } | getLookup |
254,788 | void (String s) { for (int i = 0; i < s.length(); i++) { myFixture.type(s.charAt(i)); joinAutopopup();// for the autopopup handler's alarm, or the restartCompletion's invokeLater joinCompletion(); } } | typeWithPauses |
254,789 | IntentionAction (@NotNull List<? extends IntentionAction> actions, @NonNls @NotNull String text) { for (IntentionAction action : actions) { final String s = action.getText(); if (s.equals(text)) { return action; } } return null; } | findIntentionByText |
254,790 | IntentionAction (@NotNull List<? extends IntentionAction> actions, @NonNls @NotNull String text) { for (IntentionAction action : actions) { final String s = action.getText(); if (s.contains(text)) { return action; } } return null; } | findIntentionByPartialText |
254,791 | void (CodeInsightTestFixture fixture, @NonNls String file, @NonNls String actionText) { String extension = FileUtilRt.getExtension(file); file = FileUtilRt.getNameWithoutExtension(file); if (extension.isEmpty()) extension = "xml"; doIntentionTest(fixture, actionText, file + "." + extension, file + "_after." + extension... | doIntentionTest |
254,792 | void (@NotNull final CodeInsightTestFixture fixture, @NonNls final String action, @NotNull final String before, @NotNull final String after) { fixture.configureByFile(before); List<IntentionAction> availableIntentions = fixture.getAvailableIntentions(); final IntentionAction intentionAction = findIntentionByText(availa... | doIntentionTest |
254,793 | void (@NotNull final CodeInsightTestFixture fixture, @TestDataFile @NotNull final String before, @TestDataFile final String... after) { EdtTestUtil.runInEdtAndWait(() -> { assert after != null && after.length > 0; fixture.configureByFile(before); for (String file : after) { fixture.performEditorAction(IdeActions.ACTION... | doWordSelectionTest |
254,794 | void (@NotNull final CodeInsightTestFixture fixture, @TestDataFile @NotNull final String directoryName, @NotNull final String filesExtension) { EdtTestUtil.runInEdtAndWait(() -> { fixture.copyDirectoryToProject(directoryName, directoryName); fixture.configureByFile(directoryName + "/before." + filesExtension); int i = ... | doWordSelectionTestOnDirectory |
254,795 | void (@NotNull final CodeInsightTestFixture fixture, @NotNull final Surrounder surrounder, @NotNull final String before, @NotNull final String after) { fixture.configureByFile(before); WriteCommandAction.writeCommandAction(fixture.getProject()) .run(() -> SurroundWithHandler.invoke(fixture.getProject(), fixture.getEdit... | doSurroundWithTest |
254,796 | void (@NotNull final CodeInsightTestFixture fixture, @NotNull final String before, @NotNull final String after) { fixture.configureByFile(before); new ListTemplatesAction().actionPerformedImpl(fixture.getProject(), fixture.getEditor()); final LookupImpl lookup = (LookupImpl)LookupManager.getActiveLookup(fixture.getEdit... | doLiveTemplateTest |
254,797 | void (@NotNull final CodeInsightTestFixture fixture, @NotNull final String before, @NotNull final String after) { fixture.configureByFile(before); final List<SmartEnterProcessor> processors = SmartEnterProcessors.INSTANCE.allForLanguage(fixture.getFile().getLanguage()); WriteCommandAction.writeCommandAction(fixture.get... | doSmartEnterTest |
254,798 | void (@NotNull final CodeInsightTestFixture fixture, @NotNull final String before, @NotNull final String after) { fixture.configureByFile(before); WriteCommandAction.writeCommandAction(fixture.getProject()).run(() -> CodeStyleManager.getInstance(fixture.getProject()).reformat(fixture.getFile())); fixture.checkResultByF... | doFormattingTest |
254,799 | void (VariableInplaceRenameHandler handler, final String newName, CodeInsightTestFixture fixture) { PsiElement elementAtCaret = fixture.getElementAtCaret(); Editor editorForElement = openEditorFor(elementAtCaret); doInlineRename(handler, newName, editorForElement, elementAtCaret); } | doInlineRename |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.