Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
0 | CharSequence (@NotNull String text, boolean caseSensitive, boolean recursively) { return recursively ? substituteRecursively(text, caseSensitive) : substitute(text, caseSensitive); } | substitute |
1 | void (@NotNull Element e, boolean caseSensitive) { substitute(e, caseSensitive, false); } | substitute |
2 | void (@NotNull Element element, boolean caseSensitive, boolean recursively, @Nullable PathMacroFilter filter) { if (filter != null && filter.skipPathMacros(element)) { return; } for (Content child : element.getContent()) { if (child instanceof Element) { substitute((Element)child, caseSensitive, recursively, filter); }... | substitute |
3 | String (@NotNull Attribute attribute, @Nullable PathMacroFilter filter, boolean caseSensitive, boolean recursively) { String oldValue = attribute.getValue(); if (recursively || (filter != null && filter.recursePathMacros(attribute))) { return substituteRecursively(oldValue, caseSensitive).toString(); } else { return su... | getAttributeValue |
4 | void (@NotNull Element e, boolean caseSensitive, boolean recursively) { substitute(e, caseSensitive, recursively, null); } | substitute |
5 | CharSequence (@NotNull String text, boolean caseSensitive) { return substitute(text, caseSensitive); } | substituteRecursively |
6 | void (@NotNull String macroName, @NotNull String path) { myMacroExpands.put(macroName, FileUtilRt.toSystemIndependentName(path)); } | addMacroExpand |
7 | void (@NotNull String fromText, @NotNull String toText) { myPlainMap.put(fromText, toText); } | put |
8 | void (@NotNull ExpandMacroToPathMap another) { myPlainMap.putAll(another.myPlainMap); myMacroExpands.putAll(another.myMacroExpands); } | putAll |
9 | String (@NotNull String text, boolean caseSensitive) { if (text.indexOf('$') < 0 && text.indexOf('%') < 0) { return text; } for (Map.Entry<String, String> entry : myPlainMap.entrySet()) { // when replacing macros with actual paths, the replace utility may be used as always 'case-sensitive' // for case-insensitive file ... | substitute |
10 | String (@NotNull String text, @NotNull String macroName, @NotNull String replacement) { while (true) { int start = findMacroIndex(text, macroName); if (start < 0) { break; } int end = start + macroName.length() + 2; int slashCount = getSlashCount(text, end); String actualReplacement = slashCount > 0 && !replacement.end... | replaceMacro |
11 | int (@NotNull String text, int pos) { return StringUtil.isChar(text, pos, '/') ? StringUtil.isChar(text, pos + 1, '/') ? 2 : 1 : 0; } | getSlashCount |
12 | int (@NotNull String text, @NotNull String macroName) { int i = -1; while (true) { i = text.indexOf('$', i + 1); if (i < 0) { return -1; } if (StringUtil.startsWith(text, i + 1, macroName) && StringUtil.isChar(text, i + macroName.length() + 1, '$')) { return i; } } } | findMacroIndex |
13 | int () { return myPlainMap.hashCode() + myMacroExpands.hashCode(); } | hashCode |
14 | boolean (@NotNull Element element) { return false; } | skipPathMacros |
15 | boolean (@NotNull Attribute attribute) { return false; } | skipPathMacros |
16 | boolean (@NotNull Attribute attribute) { return false; } | recursePathMacros |
17 | void (@NotNull JpsProject project, @NotNull Element componentTag) { var optionsValues = new EnumMap<Options, Boolean>(Options.class); var optionElements = componentTag.getChildren(OPTION_TAG); for (var element : optionElements) { try { var name = Options.valueOf(element.getAttributeValue(NAME_ATTRIBUTE)); var value = B... | loadExtension |
18 | Runnable (final String name) { if (!LOG.isDebugEnabled()) { return EmptyRunnable.INSTANCE; } long start = System.nanoTime(); return () -> LOG.debug(name + " in " + TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - start) + "ms"); } | startActivity |
19 | void (@NotNull JpsProject project, @NotNull Element componentTag) { String projectEncoding = null; Map<String, String> urlToEncoding = new HashMap<>(); for (Element fileTag : JDOMUtil.getChildren(componentTag, "file")) { String url = fileTag.getAttributeValue("url"); String encoding = fileTag.getAttributeValue("charset... | loadExtension |
20 | void (@NotNull JpsGlobal global, @NotNull Element componentTag) { String encoding = componentTag.getAttributeValue(ENCODING_ATTRIBUTE); JpsEncodingConfigurationService.getInstance().setGlobalEncoding(global, StringUtil.nullize(encoding)); } | loadExtension |
21 | void (@NotNull JpsGlobal global) { JpsEncodingConfigurationService.getInstance().setGlobalEncoding(global, CharsetToolkit.UTF8); } | loadExtensionWithDefaultSettings |
22 | void (@NotNull Path optionsDir) { Path defaultConfigFile = optionsDir.resolve("other.xml"); LOG.debug("Loading config from " + optionsDir.toAbsolutePath()); for (JpsGlobalExtensionSerializer serializer : SERIALIZERS) { loadGlobalComponents(optionsDir, defaultConfigFile, serializer); } for (JpsModelSerializerExtension e... | load |
23 | void (@NotNull Path optionsDir, @NotNull Path defaultConfigFile, JpsGlobalExtensionSerializer serializer) { loadComponents(optionsDir, defaultConfigFile.getParent(), serializer, myGlobal); } | loadGlobalComponents |
24 | void (@NotNull JpsGlobal global, @NotNull Element componentTag) { JpsPathVariablesConfiguration configuration = global.getContainer().setChild(PATH_VARIABLES_ROLE, new JpsPathVariablesConfigurationImpl()); for (Element macroTag : JDOMUtil.getChildren(componentTag, MACRO_TAG)) { String name = macroTag.getAttributeValue(... | loadExtension |
25 | void (@NotNull JpsGlobal global, @NotNull Element componentTag) { JpsLibraryTableSerializer.loadLibraries(componentTag, global.getPathMapper(), global.getLibraryCollection()); } | loadExtension |
26 | void (@NotNull JpsGlobal global, @NotNull Element componentTag) { JpsSdkTableSerializer.loadSdks(componentTag, global.getLibraryCollection(), global.getPathMapper()); } | loadExtension |
27 | void (@NotNull JpsGlobal global, @NotNull Element componentTag) { Element ignoreFilesTag = componentTag.getChild("ignoreFiles"); if (ignoreFilesTag != null) { global.getFileTypesConfiguration().setIgnoredPatternString(ignoreFilesTag.getAttributeValue("list")); } } | loadExtension |
28 | void (String macroName, File file) { doAddFileHierarchyReplacements("$" + macroName + "$", file); } | addFileHierarchyReplacements |
29 | void (String macroName, String path) { myExpandMacroMap.addMacroExpand(macroName, path); } | addMacro |
30 | void (String macro, @Nullable File file) { if (file == null) { return; } doAddFileHierarchyReplacements(macro + "/..", file.getParentFile()); String path = FileUtilRt.toSystemIndependentName(file.getPath()); if (StringUtilRt.endsWithChar(path, '/')) { myExpandMacroMap.put(macro + "/", path); myExpandMacroMap.put(macro,... | doAddFileHierarchyReplacements |
31 | void (@NotNull Element element, boolean caseSensitive) { myExpandMacroMap.substitute(element, caseSensitive); } | substitute |
32 | ExpandMacroToPathMap () { return myExpandMacroMap; } | getExpandMacroMap |
33 | String (@NotNull String element, boolean caseSensitive) { return myExpandMacroMap.substitute(element, caseSensitive); } | substitute |
34 | String () { return myConfigFileName; } | getConfigFileName |
35 | String () { return myComponentName; } | getComponentName |
36 | void (@NotNull E e) { } | loadExtensionWithDefaultSettings |
37 | void (@NotNull E e, @NotNull Element componentTag) { } | saveExtension |
38 | Iterable<JpsModelSerializerExtension> () { return JpsServiceManager.getInstance().getExtensions(JpsModelSerializerExtension.class); } | getExtensions |
39 | void (@NotNull JpsModule module, @NotNull Element rootModel) { } | loadRootModel |
40 | void (@NotNull JpsModule module, @NotNull Element rootElement) { } | loadModuleOptions |
41 | List<JpsLibraryRootTypeSerializer> () { return Collections.emptyList(); } | getLibraryRootTypeSerializers |
42 | List<JpsLibraryRootTypeSerializer> () { return Collections.emptyList(); } | getSdkRootTypeSerializers |
43 | void (JpsDependencyElement dependency, Element orderEntry) { } | loadModuleDependencyProperties |
44 | String (JpsElementReference<? extends JpsCompositeElement> reference) { return null; } | getLibraryTableLevelId |
45 | JpsModuleClasspathSerializer () { return null; } | getClasspathSerializer |
46 | String () { return myTypeId; } | getTypeId |
47 | Type () { return myType; } | getType |
48 | JpsSerializationManager () { return JpsServiceManager.getInstance().getService(JpsSerializationManager.class); } | getInstance |
49 | String () { return Objects.requireNonNull(getGlobalSystemMacroValue(USER_HOME_NAME)); } | getUserHomePath |
50 | String () { return Strings.trimEnd(FileUtilRt.toSystemIndependentName(SystemProperties.getUserHome()), "/"); } | computeUserHomePath |
51 | String (@NotNull String path) { if (myWslRootPrefix == null || path.indexOf(':') != 1) { String wslPath; try { wslPath = runWslPath(path); } catch (IOException | InterruptedException e) { return path; } if (path.indexOf(':') == 1) { int pathLengthAfterDriveLetter = path.length() - 2; myWslRootPrefix = wslPath.substring... | mapPath |
52 | JpsMacroExpander (Map<String, String> pathVariables, @NotNull Path baseDir) { JpsMacroExpander expander = new JpsMacroExpander(pathVariables); expander.addFileHierarchyReplacements(PathMacroUtil.PROJECT_DIR_MACRO_NAME, baseDir.toFile()); return expander; } | createProjectMacroExpander |
53 | String (@NotNull Path dir) { String name = JpsPathUtil.readProjectName(dir); return name != null ? name : JpsPathUtil.getDefaultProjectName(dir); } | getDirectoryBaseProjectName |
54 | void (@NotNull Path dir, @NotNull Executor executor) { myProject.setName(getDirectoryBaseProjectName(dir)); Path defaultConfigFile = dir.resolve("misc.xml"); JpsSdkType<?> projectSdkType = loadProjectRoot(loadRootElement(defaultConfigFile)); for (JpsModelSerializerExtension extension : JpsModelSerializerExtension.getEx... | loadFromDirectory |
55 | boolean () { for (JpsModelSerializerExtension extension : JpsModelSerializerExtension.getExtensions()) { if (!extension.getRunConfigurationPropertiesSerializers().isEmpty()) { return true; } } return false; } | hasRunConfigurationSerializers |
56 | List<Path> (@NotNull Path dir) { try { try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir, it -> it.getFileName().toString().endsWith(".xml") && Files.isRegularFile(it))) { return ContainerUtil.collect(stream.iterator()); } } catch (IOException e) { return Collections.emptyList(); } } | listXmlFiles |
57 | void (@NotNull Path iprFile, @NotNull Executor executor) { final Element iprRoot = loadRootElement(iprFile); String projectName = FileUtilRt.getNameWithoutExtension(iprFile.getFileName().toString()); myProject.setName(projectName); Path iwsFile = iprFile.getParent().resolve(projectName + ".iws"); Element iwsRoot = load... | loadFromIpr |
58 | void (@Nullable Element artifactManagerComponent) { JpsArtifactSerializer.loadArtifacts(myProject, artifactManagerComponent); } | loadArtifacts |
59 | void (@Nullable Element libraryTableElement) { JpsLibraryTableSerializer.loadLibraries(libraryTableElement, myPathMapper, myProject.getLibraryCollection()); } | loadProjectLibraries |
60 | void (@Nullable Element componentElement, @Nullable JpsSdkType<?> projectSdkType, @NotNull Path workspaceFile, @NotNull Executor executor) { Runnable timingLog = TimingLog.startActivity("loading modules"); if (componentElement == null) { return; } Set<String> unloadedModules = new HashSet<>(); if (!myLoadUnloadedModule... | loadModules |
61 | List<JpsModule> (@NotNull List<? extends Path> moduleFiles, @Nullable JpsSdkType<?> projectSdkType, @NotNull Map<String, String> pathVariables, @NotNull JpsPathMapper pathMapper, @Nullable Executor executor) { if (executor == null) { executor = DefaultExecutorHolder.threadPool; } List<JpsModule> modules = new ArrayList... | loadModules |
62 | JpsModule (@NotNull Path file, @NotNull Element moduleRoot, List<String> paths, @Nullable JpsSdkType<?> projectSdkType, Map<String, String> pathVariables, @NotNull JpsPathMapper pathMapper) { String name = getModuleName(file); final String typeId = moduleRoot.getAttributeValue("type"); final JpsModulePropertiesSerializ... | loadModule |
63 | String (@NotNull Path file) { return FileUtilRt.getNameWithoutExtension(file.getFileName().toString()); } | getModuleName |
64 | JpsMacroExpander (final Map<String, String> pathVariables, @NotNull Path moduleFile) { JpsMacroExpander expander = new JpsMacroExpander(pathVariables); String moduleDirPath = PathMacroUtil.getModuleDir(moduleFile.toAbsolutePath().toString()); if (moduleDirPath != null) { expander.addFileHierarchyReplacements(PathMacroU... | createModuleMacroExpander |
65 | JpsDummyElement (@Nullable Element componentElement) { return JpsElementFactory.getInstance().createDummyElement(); } | loadProperties |
66 | File () { String defaultMavenFolder = SystemProperties.getUserHome() + File.separator + M2_DIR; return new File(defaultMavenFolder, SETTINGS_XML); } | getUserMavenSettingsXml |
67 | File () { String mavenHome = resolveMavenHomeDirectory(); if (mavenHome == null) { return null; } return new File(mavenHome + File.separator + CONF_DIR, SETTINGS_XML); } | getGlobalMavenSettingsXml |
68 | String () { String m2home = System.getenv("M2_HOME"); if (isValidMavenHome(m2home)) return m2home; String mavenHome = System.getenv("MAVEN_HOME"); if (isValidMavenHome(mavenHome)) return mavenHome; String m2UserHome = SystemProperties.getUserHome() + File.separator + M2_DIR; if (isValidMavenHome(m2UserHome)) return m2U... | resolveMavenHomeDirectory |
69 | String () { String defaultMavenFolder = SystemProperties.getUserHome() + File.separator + M2_DIR; // Check user local settings File userSettingsFile = getUserMavenSettingsXml(); if (userSettingsFile.exists()) { String fromUserSettings = getRepositoryFromSettings(userSettingsFile); if (isNotEmpty(fromUserSettings) && ne... | getMavenRepositoryPath |
70 | String () { final File brewDir = new File("/usr/local/Cellar/maven"); final String[] list = brewDir.list(); if (list == null || list.length == 0) return null; Arrays.sort(list, (o1, o2) -> compareVersionNumbers(o2, o1)); return brewDir + File.separator + list[0] + "/libexec"; } | fromBrew |
71 | String (final File file) { Element settingsXmlRoot; try { settingsXmlRoot = JDOMUtil.load(file); } catch (JDOMException | IOException e) { return null; } Optional<String> maybeRepository = KNOWN_NAMESPACES.stream() .map(it -> settingsXmlRoot.getChildText("localRepository", it)) .filter(it -> it != null && !isEmpty(it))... | getRepositoryFromSettings |
72 | boolean (@Nullable String path) { return isNotEmpty(path) && FileUtil.exists(path); } | isValidMavenHome |
73 | void (@NotNull File settingsXml, @NotNull Map<String, RemoteRepositoryAuthentication> output) { Element settingsXmlRoot; try { settingsXmlRoot = JDOMUtil.load(settingsXml); } catch (JDOMException | IOException e) { return; } Optional<Namespace> maybeNamespace = KNOWN_NAMESPACES.stream() .filter(it -> settingsXmlRoot.ge... | loadAuthenticationFromSettings |
74 | String () { return username; } | getUsername |
75 | String () { return password; } | getPassword |
76 | Element (@Nullable Element root, @NonNls String componentName) { for (Element element : JDOMUtil.getChildren(root, COMPONENT_ELEMENT)) { if (isComponent(componentName, element)) { return element; } } return null; } | findComponent |
77 | boolean (@NotNull String componentName, @NotNull Element element) { return componentName.equals(element.getAttributeValue(Constants.NAME)); } | isComponent |
78 | Element (final String componentName) { final Element element = new Element(COMPONENT_ELEMENT); element.setAttribute(Constants.NAME, componentName); return element; } | createComponentElement |
79 | Element (@NotNull Element root, @NotNull String componentName) { Element component = findComponent(root, componentName); if (component == null) { component = createComponentElement(componentName); addComponent(root, component); } return component; } | findOrCreateComponentElement |
80 | void (@NotNull Element root, @NotNull Element component) { String componentName = component.getAttributeValue(Constants.NAME); Element old = findComponent(root, componentName); if (old != null) { root.removeContent(old); } for (int i = 0; i < root.getContent().size(); i++) { Content o = root.getContent().get(i); if (o ... | addComponent |
81 | Element (@NotNull Path file) { return loadRootElement(file, myMacroExpander); } | loadRootElement |
82 | Element (@NotNull Path file, @NotNull JpsMacroExpander macroExpander) { final Element element = tryLoadRootElement(file); if (element != null) { macroExpander.substitute(element, SystemInfo.isFileSystemCaseSensitive); } return element; } | loadRootElement |
83 | Element (@NotNull Path file) { int i = 0; while (true) { try { return JDOMUtil.load(file); } catch (NoSuchFileException e) { return null; } catch (IOException | JDOMException e) { if (++i == MAX_ATTEMPTS) { //noinspection InstanceofCatchParameter throw new CannotLoadJpsModelException(file.toFile(), "Cannot " + (e insta... | tryLoadRootElement |
84 | JpsPathVariablesConfiguration (JpsGlobal global) { return global.getContainer().getChild(JpsGlobalLoader.PATH_VARIABLES_ROLE); } | getPathVariablesConfiguration |
85 | JpsPathVariablesConfiguration (JpsGlobal global) { JpsPathVariablesConfiguration child = global.getContainer().getChild(JpsGlobalLoader.PATH_VARIABLES_ROLE); if (child == null) { return global.getContainer().setChild(JpsGlobalLoader.PATH_VARIABLES_ROLE, new JpsPathVariablesConfigurationImpl()); } return child; } | getOrCreatePathVariablesConfiguration |
86 | JpsProjectSerializationDataExtension (@NotNull JpsProject project) { return project.getContainer().getChild(JpsProjectSerializationDataExtensionImpl.ROLE); } | getProjectExtension |
87 | File (@NotNull JpsProject project) { JpsProjectSerializationDataExtension extension = getProjectExtension(project); return extension != null ? extension.getBaseDirectory() : null; } | getBaseDirectory |
88 | JpsModuleSerializationDataExtension (@NotNull JpsModule project) { return project.getContainer().getChild(JpsModuleSerializationDataExtensionImpl.ROLE); } | getModuleExtension |
89 | File (@NotNull JpsModule module) { JpsModuleSerializationDataExtension extension = getModuleExtension(module); return extension != null ? extension.getBaseDirectory() : null; } | getBaseDirectory |
90 | String (@NotNull JpsGlobal global, @NotNull String name) { String value = PathMacroUtil.getGlobalSystemMacroValue(name, false); if (value != null) { return value; } JpsPathVariablesConfiguration configuration = getPathVariablesConfiguration(global); return configuration != null ? configuration.getUserVariableValue(name... | getPathVariableValue |
91 | File () { return myFile; } | getFile |
92 | void (JpsModule module, @Nullable Element facetManagerElement) { if (facetManagerElement == null) return; FacetManagerState state = XmlSerializer.deserialize(facetManagerElement, FacetManagerState.class); addFacets(module, state.facets, null); } | loadFacets |
93 | void (JpsModule module, List<FacetState> facets, @Nullable final JpsElement parentFacet) { for (FacetState facetState : facets) { final JpsFacetConfigurationSerializer<?> serializer = getModuleExtensionSerializer(facetState.getFacetType()); if (serializer != null) { final JpsElement element = addExtension(module, seria... | addFacets |
94 | JpsModuleReference (String facetId) { String moduleName = facetId.substring(0, facetId.indexOf('/')); return JpsElementFactory.getInstance().createModuleReference(moduleName); } | createModuleReference |
95 | String (final JpsModuleReference moduleReference, final String facetTypeId, final String facetName) { return moduleReference.getModuleName() + "/" + facetTypeId + "/" + facetName; } | getFacetId |
96 | String () { return myFacetType; } | getFacetType |
97 | String () { return myName; } | getName |
98 | String () { return myExternalSystemId; } | getExternalSystemId |
99 | String () { return myExternalSystemIdInInternalStorage; } | getExternalSystemIdInInternalStorage |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.