Unnamed: 0
int64 0
305k
| body
stringlengths 7
52.9k
| name
stringlengths 1
185
|
---|---|---|
800 | void (@NotNull JpsEncodingProjectConfigurationImpl modified) { } | applyChanges |
801 | String (@NotNull JpsGlobal global) { JpsSimpleElement<String> encoding = global.getContainer().getChild(ENCODING_ROLE); return encoding != null ? encoding.getData() : null; } | getGlobalEncoding |
802 | void (@NotNull JpsGlobal global, @Nullable String encoding) { if (encoding != null) { global.getContainer().setChild(ENCODING_ROLE, JpsElementFactory.getInstance().createSimpleElement(encoding)); } else { global.getContainer().removeChild(ENCODING_ROLE); } } | setGlobalEncoding |
803 | String (@NotNull JpsModel model) { JpsEncodingProjectConfiguration configuration = getEncodingConfiguration(model.getProject()); if (configuration != null) { String projectEncoding = configuration.getProjectEncoding(); if (projectEncoding != null) { return projectEncoding; } } return getGlobalEncoding(model.getGlobal()); } | getProjectEncoding |
804 | JpsEncodingProjectConfiguration (@NotNull JpsProject project) { return project.getContainer().getChild(JpsEncodingProjectConfigurationImpl.ROLE); } | getEncodingConfiguration |
805 | JpsEncodingProjectConfiguration (@NotNull JpsProject project, @Nullable String projectEncoding, @NotNull Map<String, String> urlToEncoding) { JpsEncodingProjectConfigurationImpl configuration = new JpsEncodingProjectConfigurationImpl(urlToEncoding, projectEncoding); return project.getContainer().setChild(JpsEncodingProjectConfigurationImpl.ROLE, configuration); } | setEncodingConfiguration |
806 | JpsUrlListImpl () { return new JpsUrlListImpl(this); } | createCopy |
807 | List<String> () { return myUrls; } | getUrls |
808 | void (@NotNull String url) { myUrls.add(url); fireElementChanged(); } | addUrl |
809 | void (@NotNull String url) { myUrls.remove(url); fireElementChanged(); } | removeUrl |
810 | void (@NotNull JpsUrlListImpl modified) { if (!myUrls.equals(modified.myUrls)) { myUrls.clear(); myUrls.addAll(modified.myUrls); fireElementChanged(); } } | applyChanges |
811 | JpsElementContainerEx (@NotNull JpsCompositeElementBase<?> parent) { return new JpsElementContainerImpl(parent); } | createContainer |
812 | JpsElementContainerEx (@NotNull JpsElementContainerEx original, @NotNull JpsCompositeElementBase<?> parent) { return new JpsElementContainerImpl(original, parent); } | createContainerCopy |
813 | JpsUrlList () { return new JpsUrlListImpl(); } | create |
814 | JpsFileTypesConfigurationImpl () { return new JpsFileTypesConfigurationImpl(myIgnoredPatternString); } | createCopy |
815 | String () { return myIgnoredPatternString; } | getIgnoredPatternString |
816 | void (@NotNull String ignoredPatternString) { if (!myIgnoredPatternString.equals(ignoredPatternString)) { myIgnoredPatternString = ignoredPatternString; fireElementChanged(); } } | setIgnoredPatternString |
817 | void (@NotNull JpsFileTypesConfigurationImpl modified) { setIgnoredPatternString(modified.myIgnoredPatternString); } | applyChanges |
818 | JpsModel () { return new JpsModelImpl(); } | createModel |
819 | JpsModuleReference (@NotNull String moduleName) { return new JpsModuleReferenceImpl(moduleName); } | createModuleReference |
820 | JpsLibraryReference (@NotNull String libraryName, @NotNull JpsElementReference<? extends JpsCompositeElement> parentReference) { return new JpsLibraryReferenceImpl(libraryName, parentReference); } | createLibraryReference |
821 | JpsElementReference<JpsProject> () { return new JpsProjectElementReference(); } | createProjectReference |
822 | JpsElementReference<JpsGlobal> () { return new JpsGlobalElementReference(); } | createGlobalReference |
823 | JpsDummyElement () { return new JpsDummyElementImpl(); } | createDummyElement |
824 | JpsProject () { final JpsModel model = getModel(); return model != null ? model.getProject() : null; } | resolve |
825 | JpsProjectElementReference () { return new JpsProjectElementReference(); } | createCopy |
826 | void (@NotNull JpsProjectElementReference modified) { } | applyChanges |
827 | String () { return "project ref"; } | toString |
828 | JpsGlobal () { final JpsModel model = getModel(); return model != null ? model.getGlobal() : null; } | resolve |
829 | JpsGlobalElementReference () { return new JpsGlobalElementReference(); } | createCopy |
830 | void (@NotNull JpsGlobalElementReference modified) { } | applyChanges |
831 | String () { return "global ref"; } | toString |
832 | T (T element) { return element; } | resolve |
833 | String () { return myName; } | getName |
834 | void (@NotNull String name) { if (!Objects.equals(myName, name)) { myName = name; fireElementChanged(); } } | setName |
835 | void (@NotNull JpsElementReference<?> reference) { myContainer.getChild(EXTERNAL_REFERENCES_COLLECTION_ROLE).addChild(reference); } | addExternalReference |
836 | List<JpsModule> () { return myContainer.getChild(JpsModuleRole.MODULE_COLLECTION_ROLE).getElements(); } | getModules |
837 | void (@NotNull JpsModule module) { myContainer.getChild(JpsModuleRole.MODULE_COLLECTION_ROLE).addChild(module); } | addModule |
838 | void (@NotNull JpsModule module) { myContainer.getChild(JpsModuleRole.MODULE_COLLECTION_ROLE).removeChild(module); } | removeModule |
839 | JpsLibraryCollection () { return myLibraryCollection; } | getLibraryCollection |
840 | JpsSdkReferencesTable () { return myContainer.getChild(JpsSdkReferencesTableImpl.ROLE); } | getSdkReferencesTable |
841 | List<JpsRunConfiguration> () { return getRunConfigurationsCollection().getElements(); } | getRunConfigurations |
842 | JpsElementCollection<JpsRunConfiguration> () { return myContainer.getChild(RUN_CONFIGURATIONS_ROLE); } | getRunConfigurationsCollection |
843 | JpsElementReference<JpsProject> () { return new JpsProjectElementReference(); } | createReference |
844 | JpsDummyElementImpl () { return new JpsDummyElementImpl(); } | createCopy |
845 | void (@NotNull JpsDummyElementImpl modified) { } | applyChanges |
846 | List<E> () { return myElements; } | getElements |
847 | E (@NotNull JpsElementCreator<E> creator) { return addChild(creator.create()); } | addChild |
848 | void (@NotNull E element) { final boolean removed = myElements.remove(element); if (removed) { setParent(element, null); } } | removeChild |
849 | void () { List<E> elements = new ArrayList<>(myElements); for (E element : elements) { removeChild(element); } } | removeAllChildren |
850 | JpsElementCollectionImpl<E> () { return new JpsElementCollectionImpl<>(this); } | createCopy |
851 | void (@NotNull JpsElementCollectionImpl<E> modified) { Set<E> toRemove = new LinkedHashSet<>(myElements); List<E> toAdd = new ArrayList<>(); final Map<E, E> copyToOriginal = modified.myCopyToOriginal; for (E element : modified.myElements) { final E original = copyToOriginal != null ? copyToOriginal.get(element) : null; if (original != null) { //noinspection unchecked ((BulkModificationSupport<E>)original.getBulkModificationSupport()).applyChanges(element); toRemove.remove(original); } else { //noinspection unchecked final E copy = (E)element.getBulkModificationSupport().createCopy(); toAdd.add(copy); } } for (E e : toRemove) { removeChild(e); } for (E e : toAdd) { addChild(e); } } | applyChanges |
852 | Iterator<X> () { //noinspection unchecked Iterator<JpsTypedElement<?>> iterator = (Iterator<JpsTypedElement<?>>)myElements.iterator(); return new FilteringIterator<>(iterator, e -> e.getType().equals(myType)); } | iterator |
853 | JpsRunConfigurationImpl<P> () { return new JpsRunConfigurationImpl<>(this); } | createCopy |
854 | P () { return myContainer.getChild(myType.getPropertiesRole()); } | getProperties |
855 | JpsRunConfigurationType<P> () { return myType; } | getType |
856 | void (@NotNull Runnable command) { myService.execute(command); } | execute |
857 | void () { myService.shutdown(); } | shutdown |
858 | List<Runnable> () { return myService.shutdownNow(); } | shutdownNow |
859 | boolean () { return myService.isShutdown(); } | isShutdown |
860 | boolean () { return myService.isTerminated(); } | isTerminated |
861 | boolean () { synchronized (myExtensions) { JpsPluginManager manager = myPluginManager; if (manager != null) { int stamp = manager.getModificationStamp(); if (myModificationStamp.getAndSet(stamp) != stamp) { myExtensions.clear(); return true; } } return false; } } | cleanupExtensionCache |
862 | boolean () { return true; } | isFullyLoaded |
863 | int () { return 0; } | getModificationStamp |
864 | JpsTypedLibrary<JpsSdk<JpsDummyElement>> (final String mockJdkVersion) { final String mockJdkDir = "mockJDK-" + mockJdkVersion; File home = PathManagerEx.findFileUnderCommunityHome("java/" + mockJdkDir); JpsTypedLibrary<JpsSdk<JpsDummyElement>> jdk = myModel.getGlobal().addSdk(mockJdkVersion, home.getAbsolutePath(), mockJdkVersion, JpsJavaSdkType.INSTANCE); jdk.addRoot(getRtJar(mockJdkDir), JpsOrderRootType.COMPILED); return jdk; } | addJdk |
865 | void () { JpsModuleRootModificationUtil.addDependency(myModule, createJDomLibrary()); assertClassRoots(dependencies(myModule), getRtJarJdk17(), getFastUtilJar()); assertClassRoots(dependencies(myModule).withoutSdk(), getFastUtilJar()); assertClassRoots(dependencies(myModule).withoutSdk().productionOnly().runtimeOnly(), getFastUtilJar()); assertClassRoots(dependencies(myModule).withoutLibraries(), getRtJarJdk17()); assertSourceRoots(dependencies(myModule), getFastUtilSources()); } | testLibrary |
866 | String () { return IntelliJProjectConfiguration.getProjectLibrary("fastutil-min").getSourcesUrls().get(0); } | getFastUtilSources |
867 | String () { return getJarUrlFromProjectLib("fastutil-min"); } | getFastUtilJar |
868 | String () { return getJarUrlFromProjectLib("ASM"); } | getAsmJar |
869 | String (final String libraryName) { return assertOneElement(IntelliJProjectConfiguration.getProjectLibraryClassesRootUrls(libraryName)); } | getJarUrlFromProjectLib |
870 | String () { return getRtJar("mockJDK-1.7"); } | getRtJarJdk17 |
871 | String () { return getRtJar("mockJDK-1.8"); } | getRtJarJdk18 |
872 | String (final String mockJdkDir) { return JpsPathUtil.getLibraryRootUrl(PathManagerEx.findFileUnderCommunityHome("java/" + mockJdkDir + "/jre/lib/rt.jar")); } | getRtJar |
873 | JpsLibrary () { JpsLibrary library = addLibrary("jdom"); library.addRoot(getFastUtilJar(), JpsOrderRootType.COMPILED); library.addRoot(getFastUtilSources(), JpsOrderRootType.SOURCES); return library; } | createJDomLibrary |
874 | JpsLibrary () { JpsLibrary library = addLibrary("asm"); library.addRoot(getAsmJar(), JpsOrderRootType.COMPILED); return library; } | createAsmLibrary |
875 | void () { final String srcRoot = addSourceRoot(myModule, false); final String testRoot = addSourceRoot(myModule, true); final String output = setModuleOutput(myModule, false); final String testOutput = setModuleOutput(myModule, true); assertClassRoots(dependencies(myModule).withoutSdk(), testOutput, output); assertClassRoots(dependencies(myModule).withoutSdk().productionOnly(), output); assertSourceRoots(dependencies(myModule), srcRoot, testRoot); assertSourceRoots(dependencies(myModule).productionOnly(), srcRoot); assertEnumeratorRoots(dependencies(myModule).withoutSdk().classes().withoutSelfModuleOutput(), output); assertEnumeratorRoots(dependencies(myModule).withoutSdk().productionOnly().classes().withoutSelfModuleOutput()); } | testModuleSources |
876 | void () { JpsLibraryDependency dependency = myModule.getDependenciesList().addLibraryDependency(createJDomLibrary()); getJavaService().getOrCreateDependencyExtension(dependency).setScope(JpsJavaDependencyScope.RUNTIME); JpsModuleRootModificationUtil.addDependency(myModule, createJDomLibrary(), JpsJavaDependencyScope.RUNTIME, false); assertClassRoots(dependencies(myModule).withoutSdk(), getFastUtilJar()); assertClassRoots(dependencies(myModule).withoutSdk().exportedOnly()); assertClassRoots(dependencies(myModule).withoutSdk().compileOnly()); } | testLibraryScope |
877 | void () { final JpsModule dep = addModule("dep"); final String depSrcRoot = addSourceRoot(dep, false); final String depTestRoot = addSourceRoot(dep, true); final String depOutput = setModuleOutput(dep, false); final String depTestOutput = setModuleOutput(dep, true); JpsModuleRootModificationUtil.addDependency(dep, createJDomLibrary(), JpsJavaDependencyScope.COMPILE, true); JpsModuleRootModificationUtil.addDependency(myModule, dep, JpsJavaDependencyScope.COMPILE, true); final String srcRoot = addSourceRoot(myModule, false); final String testRoot = addSourceRoot(myModule, true); final String output = setModuleOutput(myModule, false); final String testOutput = setModuleOutput(myModule, true); assertClassRoots(dependencies(myModule).withoutSdk(), testOutput, output, depTestOutput, depOutput); assertClassRoots(dependencies(myModule).withoutSdk().recursively(), testOutput, output, depTestOutput, depOutput, getFastUtilJar()); assertSourceRoots(dependencies(myModule), srcRoot, testRoot, depSrcRoot, depTestRoot); assertSourceRoots(dependencies(myModule).recursively(), srcRoot, testRoot, depSrcRoot, depTestRoot, getFastUtilSources()); assertClassRoots(dependencies(myModule).withoutSdk().withoutModuleSourceEntries().recursively(), getFastUtilJar()); assertSourceRoots(dependencies(myModule).withoutSdk().withoutModuleSourceEntries().recursively(), getFastUtilSources()); assertEnumeratorRoots(dependencies(myModule).withoutSdk().withoutModuleSourceEntries().recursively().classes(), getFastUtilJar()); assertEnumeratorRoots(dependencies(myModule).withoutSdk().withoutModuleSourceEntries().recursively().sources(), getFastUtilSources()); assertEnumeratorRoots(dependencies(myModule).withoutSdk().recursively().classes().withoutSelfModuleOutput(), output, depTestOutput, depOutput, getFastUtilJar()); assertEnumeratorRoots(dependencies(myModule).productionOnly().withoutSdk().recursively().classes().withoutSelfModuleOutput(), depOutput, getFastUtilJar()); assertClassRoots(dependencies(myModule).withoutSdk().withoutDepModules().withoutModuleSourceEntries().recursively(), getFastUtilJar()); assertEnumeratorRoots( dependencies(myModule).productionOnly().withoutSdk().withoutDepModules().withoutModuleSourceEntries().recursively().classes(), getFastUtilJar()); assertClassRoots(dependencies(myModule).withoutSdk().withoutDepModules().withoutModuleSourceEntries()); assertEnumeratorRoots(dependencies(myModule).productionOnly().withoutModuleSourceEntries().withoutSdk().withoutDepModules().classes()); } | testModuleDependency |
878 | void () { final JpsModule dep = addModule("dep"); JpsModuleRootModificationUtil.addDependency(dep, createJDomLibrary(), JpsJavaDependencyScope.COMPILE, true); JpsModuleRootModificationUtil.addDependency(myModule, dep, JpsJavaDependencyScope.TEST, true); assertClassRoots(dependencies(myModule).withoutSdk()); assertClassRoots(dependencies(myModule).withoutSdk().recursively(), getFastUtilJar()); assertClassRoots(dependencies(myModule).withoutSdk().exportedOnly().recursively(), getFastUtilJar()); assertClassRoots(dependencies(myModule).withoutSdk().productionOnly().recursively()); assertClassRoots(dependencies(myProject).withoutSdk(), getFastUtilJar()); assertClassRoots(dependencies(myProject).withoutSdk().productionOnly(), getFastUtilJar()); } | testModuleJpsJavaDependencyScope |
879 | void () { final JpsModule dep = addModule("dep"); JpsModuleRootModificationUtil.addDependency(dep, createJDomLibrary(), JpsJavaDependencyScope.COMPILE, false); JpsModuleRootModificationUtil.addDependency(myModule, createAsmLibrary(), JpsJavaDependencyScope.COMPILE, false); JpsModuleRootModificationUtil.addDependency(myModule, dep, JpsJavaDependencyScope.COMPILE, false); assertClassRoots(dependencies(myModule).withoutSdk(), getAsmJar()); assertClassRoots(dependencies(myModule).withoutSdk().recursively(), getAsmJar(), getFastUtilJar()); assertClassRoots(dependencies(myModule).withoutSdk().recursivelyExportedOnly(), getAsmJar()); assertClassRoots(dependencies(myModule).withoutSdk().exportedOnly().recursively()); } | testNotExportedLibrary |
880 | void () { JpsLibrary library = addLibrary(); String libraryUrl = "temp:///library"; library.addRoot(libraryUrl, JpsAnnotationRootType.INSTANCE); JpsModuleRootModificationUtil.addDependency(myModule, library); assertEnumeratorRoots(dependencies(myModule).annotations(), libraryUrl); String moduleUrl = "temp://module"; JpsJavaExtensionService.getInstance().getOrCreateModuleExtension(myModule).getAnnotationRoots().addUrl(moduleUrl); assertEnumeratorRoots(dependencies(myModule).annotations(), moduleUrl, libraryUrl); } | testAnnotations |
881 | void () { assertClassRoots(dependencies(myModule).exportedOnly()); } | testJdkIsNotExported |
882 | void () { JpsModule dep = addModule("dep"); JpsTypedLibrary<JpsSdk<JpsDummyElement>> jdk8 = addJdk("1.8"); JpsModuleRootModificationUtil.addDependency(myModule, dep); JpsModuleRootModificationUtil.setModuleSdk(dep, jdk8.getProperties()); assertClassRoots(dependencies(myModule).recursively(), getRtJarJdk17()); assertClassRoots(dependencies(dep).recursively(), getRtJarJdk18()); } | testDoNotAddJdkRootsFromModuleDependency |
883 | void () { JpsModuleRootModificationUtil.addDependency(myModule, createJDomLibrary()); final String srcRoot = addSourceRoot(myModule, false); final String testRoot = addSourceRoot(myModule, true); final String output = setModuleOutput(myModule, false); final String testOutput = setModuleOutput(myModule, true); assertClassRoots(dependencies(myProject).withoutSdk(), testOutput, output, getFastUtilJar()); assertSourceRoots(dependencies(myProject).withoutSdk(), srcRoot, testRoot, getFastUtilSources()); } | testProject |
884 | void () { JpsModuleRootModificationUtil.addDependency(myModule, createJDomLibrary()); final String srcRoot = addSourceRoot(myModule, false); final String testRoot = addSourceRoot(myModule, true); final String output = setModuleOutput(myModule, false); final String testOutput = setModuleOutput(myModule, true); assertClassRoots(getJavaService().enumerateDependencies(Collections.singletonList(myModule)).withoutSdk(), testOutput, output, getFastUtilJar()); assertSourceRoots(getJavaService().enumerateDependencies(Collections.singletonList(myModule)).withoutSdk(), srcRoot, testRoot, getFastUtilSources()); } | testModules |
885 | String (JpsModule module, boolean tests) { try { File file = FileUtil.createTempDirectory(module.getName(), tests ? "testSrc" : "src"); JpsJavaModuleExtension extension = getJavaService().getOrCreateModuleExtension(module); String url = JpsPathUtil.getLibraryRootUrl(file); if (tests) { extension.setTestOutputUrl(url); } else { extension.setOutputUrl(url); } return url; } catch (IOException e) { throw new RuntimeException(e); } } | setModuleOutput |
886 | String (JpsModule module, boolean tests) { try { File file = FileUtil.createTempDirectory(module.getName(), tests ? "testSrc" : "src"); return module.addSourceRoot(JpsPathUtil.getLibraryRootUrl(file), tests ? JavaSourceRootType.TEST_SOURCE : JavaSourceRootType.SOURCE).getUrl(); } catch (IOException e) { throw new RuntimeException(e); } } | addSourceRoot |
887 | void (final JpsJavaDependenciesEnumerator enumerator, String... urls) { assertEnumeratorRoots(enumerator.classes(), urls); } | assertClassRoots |
888 | void (final JpsJavaDependenciesEnumerator enumerator, String... urls) { assertEnumeratorRoots(enumerator.sources(), urls); } | assertSourceRoots |
889 | void (JpsJavaDependenciesRootsEnumerator rootsEnumerator, String... urls) { assertOrderedEquals(rootsEnumerator.getUrls(), urls); } | assertEnumeratorRoots |
890 | void (JpsModule module, JpsLibrary library) { addDependency(module, library, JpsJavaDependencyScope.COMPILE, false); } | addDependency |
891 | void (JpsModule module, JpsLibrary library, final JpsJavaDependencyScope scope, final boolean exported) { setDependencyProperties(module.getDependenciesList().addLibraryDependency(library), scope, exported); } | addDependency |
892 | void (JpsDependencyElement dependency, JpsJavaDependencyScope scope, boolean exported) { JpsJavaDependencyExtension extension = JpsJavaExtensionService.getInstance().getOrCreateDependencyExtension(dependency); extension.setExported(exported); extension.setScope(scope); } | setDependencyProperties |
893 | void (JpsModule module, @Nullable JpsSdk<JpsDummyElement> sdk) { module.getSdkReferencesTable().setSdkReference(JpsJavaSdkType.INSTANCE, sdk != null ? sdk.createReference() : null); addSdkDependencyIfNeeded(module); } | setModuleSdk |
894 | void (JpsModule module) { for (JpsDependencyElement element : module.getDependenciesList().getDependencies()) { if (element instanceof JpsSdkDependency) return; } module.getDependenciesList().addSdkDependency(JpsJavaSdkType.INSTANCE); } | addSdkDependencyIfNeeded |
895 | void (JpsModule module) { module.getSdkReferencesTable().setSdkReference(JpsJavaSdkType.INSTANCE, null); } | setSdkInherited |
896 | void (final JpsModule from, final JpsModule to) { addDependency(from, to, JpsJavaDependencyScope.COMPILE, false); } | addDependency |
897 | void (final JpsModule from, final JpsModule to, final JpsJavaDependencyScope scope, final boolean exported) { setDependencyProperties(from.getDependenciesList().addModuleDependency(to), scope, exported); } | addDependency |
898 | void () { JpsLibrary a = myProject.addLibrary("a", JpsJavaLibraryType.INSTANCE); JpsLibraryCollection collection = myProject.getLibraryCollection(); assertSameElements(collection.getLibraries(), a); assertSameElements(ContainerUtil.newArrayList(collection.getLibraries(JpsJavaLibraryType.INSTANCE)), a); assertEmpty(ContainerUtil.newArrayList(collection.getLibraries(JpsJavaSdkType.INSTANCE))); } | testAddLibrary |
899 | void () { final JpsLibrary library = myProject.addLibrary("a", JpsJavaLibraryType.INSTANCE); library.addRoot("file://my-url", JpsOrderRootType.COMPILED); assertEquals("file://my-url", assertOneElement(library.getRoots(JpsOrderRootType.COMPILED)).getUrl()); } | testAddRoot |