Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
296,700 | void () { reload(); final XBreakpoint<MyBreakpointProperties> breakpoint = getSingleBreakpoint(); breakpoint.setEnabled(false); assertFalse(save().getContent().isEmpty()); reload(); assertFalse(getSingleBreakpoint().isEnabled()); } | testSaveChangedDefaultBreakpoint |
296,701 | void () { reload(); getSingleBreakpoint().getProperties().myOption = "changed"; assertFalse(save().getContent().isEmpty()); reload(); assertEquals("changed", getSingleBreakpoint().getProperties().myOption); } | testSaveDefaultBreakpointWithModifiedProperties |
296,702 | void () { final StringBuilder out = new StringBuilder(); XBreakpointListener<XLineBreakpoint<MyBreakpointProperties>> listener = new XBreakpointListener<>() { @Override public void breakpointAdded(@NotNull final XLineBreakpoint<MyBreakpointProperties> breakpoint) { out.append("added[").append(breakpoint.getProperties()... | testListener |
296,703 | void (@NotNull final XLineBreakpoint<MyBreakpointProperties> breakpoint) { out.append("added[").append(breakpoint.getProperties().myOption).append("];"); } | breakpointAdded |
296,704 | void (@NotNull final XLineBreakpoint<MyBreakpointProperties> breakpoint) { out.append("removed[").append(breakpoint.getProperties().myOption).append("];"); } | breakpointRemoved |
296,705 | void (@NotNull final XLineBreakpoint<MyBreakpointProperties> breakpoint) { out.append("changed[").append(breakpoint.getProperties().myOption).append("];"); } | breakpointChanged |
296,706 | void () { VirtualFile file = getTempDir().createVirtualFile("breakpoint.txt"); addLineBreakpoint(myBreakpointManager, file.getUrl(), 0, null); assertOneElement(myBreakpointManager.getBreakpoints(MY_LINE_BREAKPOINT_TYPE)); delete(file); assertEmpty(myBreakpointManager.getBreakpoints(MY_LINE_BREAKPOINT_TYPE)); } | testRemoveFile |
296,707 | XBreakpoint<MyBreakpointProperties> () { return assertOneElement(myBreakpointManager.getBreakpoints(MY_SIMPLE_BREAKPOINT_TYPE)); } | getSingleBreakpoint |
296,708 | void () { Element element = save(); load(element); } | reload |
296,709 | void () { XLineBreakpoint<?> master = createMaster(); XLineBreakpoint<?> slave = createSlave(); myDependentBreakpointManager.setMasterBreakpoint(slave, master, true); assertSame(master, myDependentBreakpointManager.getMasterBreakpoint(slave)); assertTrue(myDependentBreakpointManager.isLeaveEnabled(slave)); assertSame(s... | testDelete |
296,710 | void () { XLineBreakpoint<?> master = createMaster(); XLineBreakpoint<?> slave = createSlave(); myDependentBreakpointManager.setMasterBreakpoint(slave, master, true); Element element = save(); myDependentBreakpointManager.clearMasterBreakpoint(slave); //System.out.println(JDOMUtil.writeElement(element, SystemProperties... | testSerialize |
296,711 | XLineBreakpoint<MyBreakpointProperties> () { return addLineBreakpoint(myBreakpointManager, "file://slave", 2, new MyBreakpointProperties("z-slave")); } | createSlave |
296,712 | XLineBreakpoint<MyBreakpointProperties> () { return addLineBreakpoint(myBreakpointManager, "file://master", 1, new MyBreakpointProperties("z-master")); } | createMaster |
296,713 | void () { XDebuggerHistoryManager manager = XDebuggerHistoryManager.getInstance(getProject()); assertNotNull(manager); manager.addRecentExpression("id1", new XExpressionImpl("0", null, "custom info", EvaluationMode.EXPRESSION)); manager.addRecentExpression("id1", new XExpressionImpl("1", Language.ANY, null, EvaluationM... | testSerialize |
296,714 | void (@NotNull XExpression expression, String expressionString, Language language, String customInfo, EvaluationMode mode) { assertEquals(expressionString, expression.getExpression()); assertEquals(language, expression.getLanguage()); assertEquals(customInfo, expression.getCustomInfo()); assertEquals(mode, expression.g... | checkExpression |
296,715 | void () { XDebuggerSettingManagerImpl settingsManager = XDebuggerSettingManagerImpl.getInstanceImpl(); MyDebuggerSettings settings = MyDebuggerSettings.getInstance(); assertNotNull(settings); settings.myOption = "239"; Element element = XmlSerializer.serialize(settingsManager.getState()); //System.out.println(JDOMUtil.... | testSerialize |
296,716 | MyDebuggerSettings () { return getInstance(MyDebuggerSettings.class); } | getInstance |
296,717 | MyDebuggerSettings () { return this; } | getState |
296,718 | void (@NotNull final MyDebuggerSettings state) { myOption = state.myOption; } | loadState |
296,719 | AttachToProcessItem (@NotNull XAttachPresentationGroup<ProcessInfo> group, boolean firstInGroup, @NotNull ProcessInfo info, @NotNull List<XAttachDebugger> debuggers, @NotNull UserDataHolder dataHolder) { List<XAttachDebugger> attachDebuggers = new ArrayList<>(debuggers); return new AttachToProcessItem(group, firstInGro... | fixtureCreateAttachToProcessItem |
296,720 | RecentItem (@NotNull ProcessInfo info, @NotNull XAttachPresentationGroup group, @NotNull String debuggerName) { return RecentItem.createRecentItem(LocalAttachHost.INSTANCE, info, group, debuggerName); } | fixtureCreateHistoryItem |
296,721 | List<AttachToProcessItem> (ProcessInfo[] infos, XAttachDebuggerProvider @NotNull ... providers) { List<ProcessInfo> infoList = List.of(infos); return doCollectAttachProcessItems(getProject(), LocalAttachHost.INSTANCE, infoList, DumbProgressIndicator.INSTANCE, Arrays.asList(providers)); } | fixtureCollectAttachItems |
296,722 | void () { // no providers assertItems(""); // no provided debuggers assertItems("", new TestDebuggerProvider(), new TestDebuggerProvider()); } | testCollectingAttachItems_Empty |
296,723 | void () { assertItems(""" -------- 1 exec1: dbg 2 exec2: dbg """, new TestDebuggerProvider("dbg")); } | testCollectingAttachItems_OneDebugger |
296,724 | void () { // from one provider assertItems(""" -------- 1 exec1: dbg1 2 exec2: dbg2 """, new TestDebuggerProvider(1, TEST_GROUP, "dbg1"), new TestDebuggerProvider(2, TEST_GROUP, "dbg2")); } | testCollectingAttachItems_DebuggerPerProcess |
296,725 | void () { // from one provider assertItems(""" -------- 1 exec1: dbg1 dbg1 dbg2 dbg3 2 exec2: dbg1 dbg1 dbg2 dbg3 """, new TestDebuggerProvider("dbg1", "dbg2", "dbg3")); // from several providers assertItems(""" -------- 1 exec1: dbg1 dbg1 dbg2 dbg3 2 exec2: dbg1 dbg1 dbg2 dbg3 """, new TestDebuggerProvider("dbg1"), ne... | testCollectingAttachItems_SeveralDebuggers |
296,726 | void () { // one group assertItems(""" ----group---- 1 exec1: dbg1 dbg1 dbg2 2 exec2: dbg1 dbg1 dbg2 """, new TestDebuggerProvider(new TestAttachGroup("group", 0), "dbg1", "dbg2")); // merging same group TestAttachGroup group = new TestAttachGroup("group", 0); assertItems(""" ----group---- 1 exec1: dbg1 dbg1 dbg2 2 exe... | testCollectingAttachItems_Groups |
296,727 | void () { assertItems(""" ----group1---- 1 exec1: dbg1 dbg1 dbg2 2 exec2: dbg1 dbg1 dbg2 ----group2---- 1 exec1: dbg1 dbg1 dbg2 2 exec2: dbg1 dbg1 dbg2 """, new TestDebuggerProvider(new TestAttachGroup("group1", 1), "dbg1", "dbg2"), new TestDebuggerProvider(new TestAttachGroup("group2", 2), "dbg1", "dbg2")); assertItem... | testCollectingAttachItems_Groups_SortingGroups |
296,728 | void () { assertItems(""" ----group---- 1 exec1: dbg1 2 exec2: dbg1 """, new TestDebuggerProvider(new TestAttachGroup("group", 0), "dbg1")); assertItems(""" ----group---- 2 exec2: dbg1 1 exec1: dbg1 """, new TestDebuggerProvider(new TestAttachGroup("group", 0) { @Override public int compare(@NotNull ProcessInfo a, @Not... | testCollectingAttachItems_Groups_SortingItems |
296,729 | int (@NotNull ProcessInfo a, @NotNull ProcessInfo b) { return b.getPid() - a.getPid(); } | compare |
296,730 | void () { assertItems(""" ----group---- 1 custom: dbg1 2 custom: dbg1 """, new TestDebuggerProvider(new TestAttachGroup("group", 0) { @Nls @Override public @NotNull String getItemDisplayText(@NotNull Project project, @NotNull ProcessInfo info, @NotNull UserDataHolder dataHolder) { return "custom"; } }, "dbg1")); } | testCollectingAttachItems_Groups_CustomItemTitles |
296,731 | String (@NotNull Project project, @NotNull ProcessInfo info, @NotNull UserDataHolder dataHolder) { return "custom"; } | getItemDisplayText |
296,732 | void () { ProcessInfo info1 = new ProcessInfo(1, "command line 1", "exec1", "args1"); ProcessInfo info2 = new ProcessInfo(1, "command line 2", "exec1", "args1"); ProcessInfo info3 = new ProcessInfo(1, "command line 3", "exec1", "args1"); ProcessInfo info4 = new ProcessInfo(1, "command line 4", "exec1", "args1"); Proces... | testHistory |
296,733 | void () { TestAttachGroup group1 = new TestAttachGroup("group1", 1); TestAttachGroup group2 = new TestAttachGroup("group2", 2); ProcessInfo info1 = new ProcessInfo(1, "same command line", "exec1", "args1"); ProcessInfo info2 = new ProcessInfo(2, "same command line", "exec2", "args2"); UserDataHolderBase dataHolder = ne... | testHistory_UpdatingPreviousItems |
296,734 | void () { TestAttachGroup group1 = new TestAttachGroup("group1", 1); TestAttachGroup group2 = new TestAttachGroup("group2", 2); List<XAttachDebugger> debuggers1 = createDebuggers("gdb1", "lldb1"); List<XAttachDebugger> debuggers2 = createDebuggers("gdb2", "lldb2"); List<AttachToProcessItem> originalItems = fixtureColle... | testHistoryGroup |
296,735 | void (String expected, XAttachDebuggerProvider @NotNull ... providers) { ProcessInfo[] infos = { new ProcessInfo(1, "command line 1", "exec1", "args1"), new ProcessInfo(2, "command line 2", "exec2", "args2"), }; assertItems(expected, infos, providers); } | assertItems |
296,736 | void (String expected, ProcessInfo[] infos, XAttachDebuggerProvider @NotNull ... providers) { assertEquals(expected, printItems(fixtureCollectAttachItems(infos, providers))); } | assertItems |
296,737 | String (List<AttachToProcessItem> items) { StringBuilder builder = new StringBuilder(); for (AttachToProcessItem each : items) { String title = each.getSeparatorTitle(); if (title != null) builder.append("----").append(title).append("----\n"); builder.append(each.getText(getProject())).append(": ").append(each.getSelec... | printItems |
296,738 | List<XAttachDebugger> (String... names) { return ContainerUtil.map(names, s -> new XAttachDebugger() { @NotNull @Override public String getDebuggerDisplayName() { return s; } @Override public void attachDebugSession(@NotNull Project project, @NotNull XAttachHost attachHost, @NotNull ProcessInfo processInfo) throws Exec... | createDebuggers |
296,739 | String () { return s; } | getDebuggerDisplayName |
296,740 | int () { return myOrder != null ? myOrder : 0; } | getOrder |
296,741 | String () { return myName != null ? myName : ""; } | getGroupName |
296,742 | Icon (@NotNull Project project, @NotNull ProcessInfo info, @NotNull UserDataHolder dataHolder) { return AllIcons.RunConfigurations.Application; } | getItemIcon |
296,743 | String (@NotNull Project project, @NotNull ProcessInfo info, @NotNull UserDataHolder dataHolder) { return info.getExecutableDisplayName(); } | getItemDisplayText |
296,744 | XAttachPresentationGroup<ProcessInfo> () { return myGroup; } | getPresentationGroup |
296,745 | boolean (@NotNull XAttachHost attachHost) { return attachHost instanceof LocalAttachHost; } | isAttachHostApplicable |
296,746 | ExternalProjectSettings () { throw new UnsupportedOperationException(); } | clone |
296,747 | ProjectSystemId () { return ExternalSystemTestUtil.TEST_EXTERNAL_SYSTEM_ID; } | getSystemId |
296,748 | FileChooserDescriptor () { throw new UnsupportedOperationException(); } | getExternalProjectDescriptor |
296,749 | TestExternalSystemSettings () { return systemSettings; } | getSystemSettings |
296,750 | void (TestExternalSystemSettings systemSettings) { this.systemSettings = systemSettings; } | setSystemSettings |
296,751 | TestExternalSystemLocalSettings () { return localSettings; } | getLocalSettings |
296,752 | void (TestExternalSystemLocalSettings localSettings) { this.localSettings = localSettings; } | setLocalSettings |
296,753 | TestExternalSystemExecutionSettings () { return executionSettings; } | getExecutionSettings |
296,754 | void (TestExternalSystemExecutionSettings executionSettings) { this.executionSettings = executionSettings; } | setExecutionSettings |
296,755 | void ( @NotNull ExternalSystemSettingsListener<TestExternalProjectSettings> listener, @NotNull Disposable parentDisposable ) { throw new UnsupportedOperationException(); } | subscribe |
296,756 | void (@NotNull TestExternalSystemSettings settings) { throw new UnsupportedOperationException(); } | copyExtraSettingsFrom |
296,757 | void (@NotNull TestExternalProjectSettings old, @NotNull TestExternalProjectSettings current) { } | checkSettings |
296,758 | void () { String wslMsId = System.getProperty("wsl.distribution.name"); if (wslMsId == null) return; List<WSLDistribution> distributions = WslDistributionManager.getInstance().getInstalledDistributions(); if (distributions.isEmpty()) throw new IllegalStateException("no WSL distributions configured!"); myWSLDistribution... | setupWsl |
296,759 | void (List<String> roots) { } | collectAllowedRoots |
296,760 | Collection<String> (@NotNull String root) { final List<String> roots = new SmartList<>(); roots.add(root); FileUtil.processFilesRecursively(new File(root), file -> { try { String path = file.getCanonicalPath(); if (!FileUtil.isAncestor(path, path, false)) { roots.add(path); } } catch (IOException ignore) { } return tru... | collectRootsInside |
296,761 | boolean () { return false; } | useDirectoryBasedStorageFormat |
296,762 | void (final Class<?> aClass) { if (aClass == null) return; final Field[] fields = aClass.getDeclaredFields(); for (Field field : fields) { final int modifiers = field.getModifiers(); if ((modifiers & Modifier.FINAL) == 0 && (modifiers & Modifier.STATIC) == 0 && !field.getType().isPrimitive()) { field.setAccessible(true... | resetClassFields |
296,763 | String () { if (SystemInfo.isWindows) return "c:"; return ""; } | getRoot |
296,764 | String () { return myProjectRoot.getPath(); } | getProjectPath |
296,765 | String () { return myProjectRoot.getParent().getPath(); } | getParentPath |
296,766 | String (@NotNull String relativePath) { return toSystemIndependentName(file(relativePath).getPath()); } | path |
296,767 | File (@NotNull String relativePath) { return new File(getProjectPath(), relativePath); } | file |
296,768 | Module (final String name, final ModuleType type) { try { return WriteCommandAction.writeCommandAction(myProject).compute(() -> { VirtualFile f = createProjectSubFile(name + "/" + name + ".iml"); Module module = ModuleManager.getInstance(myProject).newModule(f.getPath(), type.getId()); PsiTestUtil.addContentRoot(module... | createModule |
296,769 | VirtualFile (@NonNls String config) { return myProjectConfig = createConfigFile(myProjectRoot, config); } | createProjectConfig |
296,770 | VirtualFile (final VirtualFile dir, String config) { final String configFileName = getExternalSystemConfigFileName(); VirtualFile configFile; try { configFile = WriteAction.computeAndWait(() -> { VirtualFile file = dir.findChild(configFileName); return file == null ? dir.createChildData(null, configFileName) : file; })... | createConfigFile |
296,771 | Module (final String name) { return getModule(myProject, name); } | getModule |
296,772 | Module (Project project, String name) { Module m = ReadAction.compute(() -> ModuleManager.getInstance(project).findModuleByName(name)); assertNotNull("Module " + name + " not found", m); return m; } | getModule |
296,773 | void (final VirtualFile file, final String content, final boolean advanceStamps) { try { WriteAction.runAndWait(() -> { if (advanceStamps) { file.setBinaryContent(content.getBytes(StandardCharsets.UTF_8), -1, file.getTimeStamp() + 4000); } else { file.setBinaryContent(content.getBytes(StandardCharsets.UTF_8), file.getM... | setFileContent |
296,774 | void (Collection<String> actual, Collection<String> expected) { assertEquals(new SetWithToString<>(CollectionFactory.createFilePathSet(expected)), new SetWithToString<>(CollectionFactory.createFilePathSet(actual))); } | assertUnorderedPathsAreEqual |
296,775 | boolean () { printIgnoredMessage(null); return true; } | ignore |
296,776 | void (String message) { String toPrint = "Ignored"; if (message != null) { toPrint += ", because " + message; } toPrint += ": " + getClass().getSimpleName() + "." + getName(); System.out.println(toPrint); } | printIgnoredMessage |
296,777 | int () { return myDelegate.size(); } | size |
296,778 | boolean (Object o) { return myDelegate.contains(o); } | contains |
296,779 | Iterator<T> () { return myDelegate.iterator(); } | iterator |
296,780 | boolean (Collection<?> c) { return myDelegate.containsAll(c); } | containsAll |
296,781 | boolean (Object o) { return myDelegate.equals(o); } | equals |
296,782 | int () { return myDelegate.hashCode(); } | hashCode |
296,783 | void (@NotNull Project project, String... expectedNames) { Module[] actual = ModuleManager.getInstance(project).getModules(); List<String> actualNames = new ArrayList<>(); for (Module m : actual) { actualNames.add(m.getName()); } assertContain(actualNames, expectedNames); } | assertModulesContains |
296,784 | void (String... expectedNames) { assertModulesContains(myProject, expectedNames); } | assertModulesContains |
296,785 | void (String... expectedNames) { Module[] actualModules = ModuleManager.getInstance(myProject).getModules(); Assertions.assertThat(actualModules) .extracting("name") .containsExactlyInAnyOrder(expectedNames); } | assertModules |
296,786 | void (String moduleName, String... expectedRoots) { List<String> actual = new ArrayList<>(); for (ContentEntry e : getContentRoots(moduleName)) { actual.add(e.getUrl()); } for (int i = 0; i < expectedRoots.length; i++) { expectedRoots[i] = VfsUtilCore.pathToUrl(expectedRoots[i]); } assertUnorderedPathsAreEqual(actual, ... | assertContentRoots |
296,787 | void (String moduleName, String... expectedSources) { doAssertContentFolders(moduleName, JavaSourceRootType.SOURCE, expectedSources); } | assertSources |
296,788 | void (String moduleName, String... expectedSources) { assertGeneratedSources(moduleName, JavaSourceRootType.SOURCE, expectedSources); } | assertGeneratedSources |
296,789 | void (String moduleName, String... expectedSources) { assertGeneratedSources(moduleName, JavaSourceRootType.TEST_SOURCE, expectedSources); } | assertGeneratedTestSources |
296,790 | void (String moduleName, JavaSourceRootType type, String... expectedSources) { final ContentEntry[] contentRoots = getContentRoots(moduleName); String rootUrl = contentRoots.length > 1 ? ExternalSystemApiUtil.getExternalProjectPath(getModule(moduleName)) : null; List<String> actual = new ArrayList<>(); for (ContentEntr... | assertGeneratedSources |
296,791 | void (String moduleName, String... expectedSources) { doAssertContentFolders(moduleName, JavaResourceRootType.RESOURCE, expectedSources); } | assertResources |
296,792 | void (String moduleName, String... expectedSources) { doAssertContentFolders(moduleName, JavaSourceRootType.TEST_SOURCE, expectedSources); } | assertTestSources |
296,793 | void (String moduleName, String... expectedSources) { doAssertContentFolders(moduleName, JavaResourceRootType.TEST_RESOURCE, expectedSources); } | assertTestResources |
296,794 | void (String moduleName, String... expectedExcludes) { ContentEntry contentRoot = getContentRoot(moduleName); doAssertContentFolders(contentRoot, Arrays.asList(contentRoot.getExcludeFolders()), expectedExcludes); } | assertExcludes |
296,795 | void (String moduleName, String... expectedPatterns) { ContentEntry contentRoot = getContentRoot(moduleName); assertUnorderedElementsAreEqual(contentRoot.getExcludePatterns(), Arrays.asList(expectedPatterns)); } | assertExcludePatterns |
296,796 | void (String moduleName, String... nonExpectedPatterns) { ContentEntry contentRoot = getContentRoot(moduleName); assertDoesntContain(contentRoot.getExcludePatterns(), nonExpectedPatterns); } | assertNoExcludePatterns |
296,797 | void (String moduleName, String contentRoot, String... expectedExcudes) { ContentEntry root = getContentRoot(moduleName, contentRoot); doAssertContentFolders(root, Arrays.asList(root.getExcludeFolders()), expectedExcudes); } | assertContentRootExcludes |
296,798 | void (String moduleName, @NotNull JpsModuleSourceRootType<?> rootType, String... expected) { final ContentEntry[] contentRoots = getContentRoots(moduleName); Arrays.sort(contentRoots, Comparator.comparing(ContentEntry::getUrl)); final String rootUrl = contentRoots.length > 1 ? ExternalSystemApiUtil.getExternalProjectPa... | doAssertContentFolders |
296,799 | List<SourceFolder> (@Nullable String rootUrl, ContentEntry[] contentRoots, @NotNull JpsModuleSourceRootType<?> rootType, String... expected) { List<SourceFolder> result = new ArrayList<>(); List<String> actual = new ArrayList<>(); for (ContentEntry contentRoot : contentRoots) { for (SourceFolder f : contentRoot.getSour... | doAssertContentFolders |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.