Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
252,900
int () { int result = myName != null ? myName.hashCode() : 0; result = 31 * result + myRoots.hashCode(); return result; }
hashCode
252,901
String () { return "Library: name:" + myName + "; roots:" + myRoots.values(); }
toString
252,902
Module () { return myRootModel == null ? null : myRootModel.getModule(); }
getModule
252,903
void (@NotNull RootSetChangedListener listener) { myDispatcher.addListener(listener); }
addRootSetChangedListener
252,904
void (@NotNull RootSetChangedListener listener) { myDispatcher.removeListener(listener); }
removeRootSetChangedListener
252,905
void (@NotNull RootSetChangedListener listener, @NotNull Disposable parentDisposable) { myDispatcher.addListener(listener, parentDisposable); }
addRootSetChangedListener
252,906
void () { myDispatcher.getMulticaster().rootSetChanged(this); }
fireRootSetChanged
252,907
void (@NotNull VirtualFilePointer @NotNull [] pointers) { ProjectJdkImpl.getGlobalVirtualFilePointerListener().beforeValidityChanged(pointers); }
beforeValidityChanged
252,908
void (@NotNull VirtualFilePointer @NotNull [] pointers) { ProjectJdkImpl.getGlobalVirtualFilePointerListener().validityChanged(pointers); fireRootSetChanged(); }
validityChanged
252,909
int () { return getKindId().hashCode(); }
hashCode
252,910
boolean (Object obj) { return obj instanceof UnknownLibraryKind && ((UnknownLibraryKind)obj).getKindId().equals(getKindId()); }
equals
252,911
UnknownLibraryProperties () { return new UnknownLibraryProperties(); }
createDefaultProperties
252,912
UnknownLibraryKind (@NotNull String kindId) { LibraryKind kind = LibraryKindRegistry.getInstance().findKindById(kindId); if (kind instanceof UnknownLibraryKind) { return (UnknownLibraryKind)kind; } if (kind != null) { LOG.error("Trying to create UnknownLibraryKind for known kind " + kind); } return new UnknownLibraryKi...
getOrCreate
252,913
String () { return "UnknownLibraryKind:" + getKindId(); }
toString
252,914
Element () { return myConfiguration; }
getConfiguration
252,915
void (Element configuration) { myConfiguration = configuration; }
setConfiguration
252,916
boolean (Object obj) { if (!(obj instanceof UnknownLibraryProperties)) return false; Element configuration = ((UnknownLibraryProperties)obj).myConfiguration; if (configuration == null && myConfiguration == null) return true; if (configuration == null || myConfiguration == null) return false; return JDOMUtil.areElements...
equals
252,917
int () { return JDOMUtil.hashCode(myConfiguration, false); }
hashCode
252,918
Element () { return myConfiguration; }
getState
252,919
void (@NotNull Element state) { myConfiguration = state; }
loadState
252,920
String (boolean plural) { return ProjectModelBundle.message("global.library.display.name", plural ? 2 : 1); }
getDisplayName
252,921
String () { return ProjectModelBundle.message("libraries.node.text.ide"); }
getDescription
252,922
String () { return ProjectModelBundle.message("library.configure.global.title"); }
getLibraryTableEditorTitle
252,923
ApplicationLibraryTable () { return ApplicationManager.getApplication().getService(ApplicationLibraryTable.class); }
getApplicationTable
252,924
String () { return LibraryTablesRegistrar.APPLICATION_LEVEL; }
getTableLevel
252,925
LibraryTablePresentation () { return GLOBAL_LIBRARY_TABLE_PRESENTATION; }
getPresentation
252,926
boolean (@NotNull Library library) { LibraryTable table = library.getTable(); if (table != null) { String name = library.getName(); return name != null && table.getLibraryByName(name) == library; } if (!(library instanceof LibraryEx)) return false; Module module = ((LibraryEx)library).getModule(); if (module == null ||...
isValidLibrary
252,927
LibraryTable () { if (GlobalLibraryTableBridge.Companion.isEnabled()) { return GlobalLibraryTableBridge.Companion.getInstance(); } return ApplicationLibraryTable.getApplicationTable(); }
getLibraryTable
252,928
LibraryTable (@NotNull Project project) { return project.getService(ProjectLibraryTable.class); }
getLibraryTable
252,929
LibraryTable (String level, @NotNull Project project) { return switch (level) { case LibraryTablesRegistrar.PROJECT_LEVEL -> getLibraryTable(project); case LibraryTablesRegistrar.APPLICATION_LEVEL -> getLibraryTable(); default -> getCustomLibraryTableByLevel(level); }; }
getLibraryTableByLevel
252,930
void (@NotNull CustomLibraryTableDescription extension, @NotNull PluginDescriptor pluginDescriptor) { LibraryTableBase table = new CustomLibraryTableImpl(extension.getTableLevel(), extension.getPresentation()); customLibraryTables.put(extension.getTableLevel(), table); }
extensionAdded
252,931
void (@NotNull CustomLibraryTableDescription extension, @NotNull PluginDescriptor pluginDescriptor) { LibraryTableBase table = customLibraryTables.remove(extension.getTableLevel()); if (table != null) { Disposer.dispose(table); } }
extensionRemoved
252,932
List<LibraryTable> () { return List.copyOf(getCustomLibrariesMap().values()); }
getCustomLibraryTables
252,933
void () { for (LibraryTableBase value : customLibraryTables.values()) { Disposer.dispose(value); } customLibraryTables.clear(); }
dispose
252,934
ModifiableModel () { return new LibraryModel(myModel); }
getModifiableModel
252,935
Element () { final Element element = new Element("state"); try { myModel.writeExternal(element); } catch (WriteExternalException e) { LOG.error(e); } return element; }
getState
252,936
void () { myFirstLoad = false; }
noStateLoaded
252,937
void (@NotNull Element element) { if (myFirstLoad) { myModel.readExternal(element); } else { LibraryModel model = new LibraryModel(myModel); WriteAction.run(() -> { model.readExternal(element); model.commit(); }); } myFirstLoad = false; }
loadState
252,938
long () { return myModificationTracker.getModificationCount(); }
getStateModificationCount
252,939
Iterator<Library> () { return myModel.getLibraryIterator(); }
getLibraryIterator
252,940
Library (@NotNull String name) { return myModel.getLibraryByName(name); }
getLibraryByName
252,941
void (@NotNull Listener listener) { myDispatcher.addListener(listener); }
addListener
252,942
void (@NotNull Listener listener, @NotNull Disposable parentDisposable) { myDispatcher.addListener(listener, parentDisposable); }
addListener
252,943
void (@NotNull Listener listener) { myDispatcher.removeListener(listener); }
removeListener
252,944
void (@NotNull Library library) { if (LOG.isDebugEnabled()) { LOG.debug("fireLibraryAdded: " + library); } myDispatcher.getMulticaster().afterLibraryAdded(library); }
fireLibraryAdded
252,945
void (@NotNull Library library) { if (LOG.isDebugEnabled()) { LOG.debug("fireBeforeLibraryRemoved: " + library); } myDispatcher.getMulticaster().beforeLibraryRemoved(library); }
fireBeforeLibraryRemoved
252,946
void () { for (Library library : getLibraries()) { Disposer.dispose(library); } }
dispose
252,947
Library () { ApplicationManager.getApplication().assertWriteAccessAllowed(); return createLibrary(null); }
createLibrary
252,948
void () { if (Registry.is("store.track.module.root.manager.changes", false)) { LOG.error("library"); } myModificationTracker.incModificationCount(); }
incrementModificationCount
252,949
Library (String name) { final ModifiableModel modifiableModel = getModifiableModel(); final Library library = modifiableModel.createLibrary(name); modifiableModel.commit(); return library; }
createLibrary
252,950
void (@NotNull Library library) { final ModifiableModel modifiableModel = getModifiableModel(); modifiableModel.removeLibrary(library); modifiableModel.commit(); }
removeLibrary
252,951
void (LibraryModel model) { myFirstLoad = false; ApplicationManager.getApplication().assertWriteAccessAllowed(); if (!model.isChanged()) { return; } incrementModificationCount(); Set<Library> removedLibraries = model.myRemovedLibraries; for (Library library : removedLibraries) { fireBeforeLibraryRemoved(library); } myM...
commit
252,952
void (@NotNull Library library) { myDispatcher.getMulticaster().afterLibraryRemoved(library); }
fireAfterLibraryRemoved
252,953
void () { LibraryTableBase.this.commit(this); myAddedLibraries.clear(); myRemovedLibraries.clear(); Disposer.dispose(this); myWritable = false; }
commit
252,954
void () { myDispatcher.removeListener(this); for (Library library : myAddedLibraries) { Disposer.dispose(library); } }
dispose
252,955
Iterator<Library> () { return Collections.unmodifiableList(myLibraries).iterator(); }
getLibraryIterator
252,956
Library (@NotNull String name) { Map<String, Library> cache = myLibraryByNameCache; if (cache == null) { cache = new HashMap<>(); for (Library library : myLibraries) { cache.put(library.getName(), library); } myLibraryByNameCache = cache; } Library library = cache.get(name); if (library != null) { return library; } @No...
getLibraryByName
252,957
void () { LOG.assertTrue(myWritable); }
assertWritable
252,958
Library (String name) { return createLibrary(name, null); }
createLibrary
252,959
Library (String name, @Nullable PersistentLibraryKind<?> kind) { return createLibrary(name, kind, null); }
createLibrary
252,960
Library (String name, @Nullable PersistentLibraryKind<?> kind, @Nullable ProjectModelExternalSource externalSource) { assertWritable(); final LibraryImpl library = new LibraryImpl(name, kind, LibraryTableBase.this, null, externalSource); myLibraries.add(library); if (myWritable) { //myAddedLibraries is used only when t...
createLibrary
252,961
void (@NotNull Library library) { incrementModificationCount(); assertWritable(); myLibraries.remove(library); if (myWritable) { //myRemovedLibraries are used only when the model is committed, so let's not populate it in the main model to save memory if (!myAddedLibraries.remove(library)) { myRemovedLibraries.add(libra...
removeLibrary
252,962
boolean () { if (!myWritable) return false; return !myAddedLibraries.isEmpty() || !myRemovedLibraries.isEmpty(); }
isChanged
252,963
void (Element element) { if (myWritable) { myRemovedLibraries.addAll(myLibraries); } myLibraries.clear(); final List<Element> libraryElements = element.getChildren(JpsLibraryTableSerializer.LIBRARY_TAG); for (Element libraryElement : libraryElements) { final LibraryImpl library = new LibraryImpl(LibraryTableBase.this, ...
readExternal
252,964
void (@NotNull Library library, @Nullable String oldName) { myLibraryByNameCache = null; }
afterLibraryRenamed
252,965
void (Element element) { final List<Library> libraries = ContainerUtil.sorted(ContainerUtil.findAll(myLibraries, library -> !((LibraryEx)library).isDisposed()), // todo: do not sort if project is directory-based (o1, o2) -> StringUtil.compare(o1.getName(), o2.getName(), true)); for (final Library library : libraries) {...
writeExternal
252,966
void (LibraryModel model) { myLibraries.removeAll(model.myRemovedLibraries); myLibraries.addAll(model.myAddedLibraries); myLibraryByNameCache = null; }
applyChanges
252,967
SettingsCategory (@NotNull PersistentStateComponent<?> component) { return getCategory(component.getClass()); }
getCategory
252,968
SettingsCategory (@NotNull Class<? extends PersistentStateComponent> componentClass) { PluginDescriptor plugin = PluginManager.getPluginByClass(componentClass); if (plugin != null) { getPluginCategory(componentClass, plugin); } return getFromAnnotationOrDefault(componentClass, SettingsCategory.OTHER); }
getCategory
252,969
SettingsCategory (@NotNull Class<? extends PersistentStateComponent> componentClass, @NotNull PluginDescriptor plugin) { return plugin.isBundled() ? getFromAnnotationOrDefault(componentClass, SettingsCategory.PLUGINS) : SettingsCategory.PLUGINS; }
getPluginCategory
252,970
SettingsCategory (@NotNull Class<? extends PersistentStateComponent> componentClass, @NotNull SettingsCategory defaultCategory) { State state = componentClass.getAnnotation(State.class); return state != null && !SettingsCategory.OTHER.equals(state.category()) ? state.category() : defaultCategory; }
getFromAnnotationOrDefault
252,971
PathMacroManager (@NotNull ComponentManager componentManager) { return componentManager.getService(PathMacroManager.class); }
getInstance
252,972
CompositePathMacroFilter () { return PathMacrosCollector.MACRO_FILTER_EXTENSION_POINT_NAME.computeIfAbsent(PathMacroManager.class, () -> { return new CompositePathMacroFilter(PathMacrosCollector.MACRO_FILTER_EXTENSION_POINT_NAME.getExtensionList()); }); }
createFilter
252,973
PathMacroFilter () { return createFilter(); }
getMacroFilter
252,974
void (@NotNull ExpandMacroToPathMap result, @NotNull String macroName, @SystemIndependent @Nullable String path) { if (path != null) { doAddFileHierarchyReplacements(result, Strings.trimEnd(path, "/"), '$' + macroName + '$'); } }
addFileHierarchyReplacements
252,975
void (@NotNull ExpandMacroToPathMap result, @NotNull String path, @NotNull String macro) { String parentPath = PathUtilRt.getParentPath(path); if (!parentPath.isEmpty()) { doAddFileHierarchyReplacements(result, parentPath, macro + "/.."); } result.put(macro, path); }
doAddFileHierarchyReplacements
252,976
void (ReplacePathToMacroMap result, String macroName, @Nullable String path, @Nullable String stopAt) { if (path == null) return; String macro = '$' + macroName + '$'; path = Strings.trimEnd(FileUtilRt.toSystemIndependentName(path), "/"); boolean overwrite = true; while (Strings.isNotEmpty(path) && path.contains("/") &...
addFileHierarchyReplacements
252,977
ExpandMacroToPathMap () { ExpandMacroToPathMap result = new ExpandMacroToPathMap(); getPathMacros().addMacroExpands(result); for (Map.Entry<String, String> entry : PathMacroUtil.getGlobalSystemMacros().entrySet()) { result.addMacroExpand(entry.getKey(), entry.getValue()); } return result; }
getExpandMacroMap
252,978
ReplacePathToMacroMap () { ReplacePathToMacroMap result = new ReplacePathToMacroMap(); getPathMacros().addMacroReplacements(result); for (Map.Entry<String, String> entry : PathMacroUtil.getGlobalSystemMacros().entrySet()) { result.addMacroReplacement(entry.getValue(), entry.getKey()); } return result; }
computeReplacePathMap
252,979
void () { replacePathToMacroMap = null; }
resetCachedReplacePathMap
252,980
String (@Nullable String text) { if (Strings.isEmpty(text)) { return text; } return getExpandMacroMap().substitute(text, SystemInfoRt.isFileSystemCaseSensitive); }
expandPath
252,981
String (@Nullable String text, boolean recursively) { if (Strings.isEmpty(text)) { return text; } return getReplacePathMap().substitute(text, SystemInfoRt.isFileSystemCaseSensitive, recursively).toString(); }
collapsePath
252,982
void (@NotNull Element element) { getExpandMacroMap().substitute(element, SystemInfoRt.isFileSystemCaseSensitive); }
expandPaths
252,983
void (@NotNull Element element, boolean recursively) { collapsePaths(element, recursively, getReplacePathMap()); }
collapsePaths
252,984
void (@NotNull Element element, boolean recursively, @NotNull ReplacePathToMacroMap map) { map.substitute(element, SystemInfoRt.isFileSystemCaseSensitive, recursively, createFilter()); }
collapsePaths
252,985
PathMacrosImpl () { if (pathMacros == null) { pathMacros = PathMacrosImpl.getInstanceEx(); } return pathMacros; }
getPathMacros
252,986
boolean (@Nullable String path1, @Nullable String path2) { return path1 != null && path2 != null && FileUtil.pathsEqual(FileUtilRt.toSystemIndependentName(path1), FileUtilRt.toSystemIndependentName(path2)); }
pathsEqual
252,987
ExpandMacroToPathMap () { ExpandMacroToPathMap result = super.getExpandMacroMap(); addFileHierarchyReplacements(result, PathMacroUtil.MODULE_DIR_MACRO_NAME, PathMacroUtil.getModuleDir(myModuleDirPointer.get())); String projectFile = myProjectFilePathPointer.get(); if (projectFile != null) { for (Map.Entry<String, Strin...
getExpandMacroMap
252,988
ReplacePathToMacroMap () { ReplacePathToMacroMap result = super.computeReplacePathMap(); addFileHierarchyReplacements(result, PathMacroUtil.MODULE_DIR_MACRO_NAME, PathMacroUtil.getModuleDir(myModuleDirPointer.get()), PathMacroUtil.getUserHomePath()); String projectFile = myProjectFilePathPointer.get(); if (projectFile ...
computeReplacePathMap
252,989
void () { resetCachedReplacePathMap(); }
onImlFileMoved
252,990
ModulePathMacroManager (@NotNull Supplier<@Nullable @SystemIndependent String> projectFilePathPointer, @NotNull Supplier<@NotNull @SystemIndependent String> moduleDirPointer) { return new ModulePathMacroManager(projectFilePathPointer, moduleDirPointer); }
createInstance
252,991
ExpandMacroToPathMap () { ExpandMacroToPathMap result = super.getExpandMacroMap(); addFileHierarchyReplacements(result, PathMacroUtil.PROJECT_DIR_MACRO_NAME, myBasePathPointer.get()); if (myNamePointer != null) { result.addMacroExpand(PathMacroUtil.PROJECT_NAME_MACRO_NAME, myNamePointer.get()); } String projectFile = m...
getExpandMacroMap
252,992
ReplacePathToMacroMap () { ReplacePathToMacroMap result = super.computeReplacePathMap(); addFileHierarchyReplacements(result, PathMacroUtil.PROJECT_DIR_MACRO_NAME, myBasePathPointer.get(), null); String projectFile = myProjectFilePathPointer.get(); if (projectFile != null) { for (Map.Entry<String, String> entry : Proje...
computeReplacePathMap
252,993
ProjectPathMacroManager (@NotNull Supplier<@Nullable @SystemIndependent String> projectFilePathPointer, @NotNull Supplier<@SystemIndependent @Nullable String> basePathPointer, @Nullable Supplier<@SystemIndependent @NotNull String> namePointer) { return new ProjectPathMacroManager(projectFilePathPointer, basePathPointer...
createInstance
252,994
boolean (Element element) { if (element.hasAttributes()) { return false; } List<Content> content = element.getContent(); return content.size() == 1 && content.get(0) instanceof Text; }
isKotlinSerializable
252,995
void (VirtualFilePointer @NotNull [] pointers) { //todo check if this sdk is really used in the project for (Project project : ProjectManager.getInstance().getOpenProjects()) { VirtualFilePointerListener listener = ((ProjectRootManagerImpl)ProjectRootManager.getInstance(project)).getRootsValidityChangedListener(); list...
beforeValidityChanged
252,996
void (VirtualFilePointer @NotNull [] pointers) { //todo check if this sdk is really used in the project for (Project project : ProjectManager.getInstance().getOpenProjects()) { VirtualFilePointerListener listener = ((ProjectRootManagerImpl)ProjectRootManager.getInstance(project)).getRootsValidityChangedListener(); list...
validityChanged
252,997
VirtualFilePointerListener () { return tellAllProjectsTheirRootsAreGoingToChange; }
getGlobalVirtualFilePointerListener
252,998
void () { }
dispose
252,999
SdkTypeId () { SdkTypeId sdkType = mySdkType; if (sdkType == null) { mySdkType = sdkType = ProjectJdkTable.getInstance().getDefaultSdkType(); } return sdkType; }
getSdkType