Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
25,900 | String () { return myVariable; } | getVariable |
25,901 | String () { return myRelatedPath; } | getRelatedPath |
25,902 | void (final List<? super String> paths, final String rootPath, @Nullable Processor<? super String> progressUpdater) { if (progressUpdater != null) { progressUpdater.process(rootPath); } final String project = findProjectName(rootPath); if (project != null) { paths.add(rootPath); } final File root = new File(rootPath); ... | findModuleRoots |
25,903 | String (String rootPath) { String name = null; final File file = new File(rootPath, DOT_PROJECT_EXT); if (file.isFile()) { try { name = JDOMUtil.load(file).getChildText(NAME_TAG); if (StringUtil.isEmptyOrSpaces(name)) { return null; } name = name.replace("\n", " ").trim(); } catch (JDOMException | IOException e) { retu... | findProjectName |
25,904 | LinkedResource (@NotNull String projectPath, @NotNull String relativePath) { String independentPath = FileUtil.toSystemIndependentName(relativePath); @NotNull String resourceName = independentPath; final int idx = independentPath.indexOf('/'); if (idx != -1) { resourceName = independentPath.substring(0, idx); } final F... | findLinkedResource |
25,905 | String () { final int idx = myURI.indexOf('/'); return idx > -1 ? myURI.substring(0, idx) : myURI; } | getVariableName |
25,906 | String () { final int idx = myURI.indexOf('/'); return idx > -1 && idx + 1 < myURI.length() ? myURI.substring(idx + 1) : null; } | getRelativeToVariablePath |
25,907 | boolean () { return myURI != null; } | containsPathVariable |
25,908 | void (String URI) { myURI = URI; } | setURI |
25,909 | String () { return myLocation; } | getLocation |
25,910 | void (String location) { myLocation = location; } | setLocation |
25,911 | String (String path) { int secondSlIdx = path.indexOf('/', 1); return secondSlIdx > 1 ? path.substring(1, secondSlIdx) : path.substring(1); } | getRelativeModuleName |
25,912 | String (String path) { final int secondSlIdx = path.indexOf('/', 1); return secondSlIdx != -1 && secondSlIdx + 1 < path.length() ? path.substring(secondSlIdx + 1) : null; } | getRelativeToModulePath |
25,913 | String (final @NotNull List<String> currentRoots, final @NotNull String rootPath, final @Nullable String relativeToRootPath) { for (String currentRoot : currentRoots) { if (currentRoot.endsWith(rootPath) || Comparing.strEqual(rootPath, EclipseProjectFinder.findProjectName(currentRoot))) { //rootPath = content_root <=> ... | expandEclipseRelative2ContentRoots |
25,914 | void (Element root, T model, @Nullable SdkType projectSdkType) { setupJdk(root, model, projectSdkType); setupCompilerOutputs(root, model); readContentEntry(root, model); } | updateEntries |
25,915 | void (Element root, T model) { List<Element> entriesElements = root.getChildren(IdeaXml.CONTENT_ENTRY_TAG); if (entriesElements.isEmpty()) { // todo C[] entries = getEntries(model); if (entries.length > 0) { readContentEntry(root, entries[0], model); } } else { for (Element element : entriesElements) { readContentEntry... | readContentEntry |
25,916 | void (Element root, @NotNull Map<String, String> levels) { } | readLibraryLevels |
25,917 | void (@NotNull JpsModule module, @Nullable String classpathDir, @NotNull String baseModulePath, JpsMacroExpander expander, List<String> paths, JpsSdkType<?> projectSdkType) { final JpsDependenciesList dependenciesList = module.getDependenciesList(); dependenciesList.clear(); try { if (classpathDir == null) classpathDir... | loadClasspath |
25,918 | JpsModuleClasspathSerializer () { return CLASSPATH_SERIALIZER; } | getClasspathSerializer |
25,919 | String (String url) { //strip path inside jar final String jarSeparator = "!/"; final int localPathEndIdx = url.indexOf(jarSeparator); if (localPathEndIdx > -1) { return url.substring(0, localPathEndIdx + jarSeparator.length()); } return url; } | prepareValidUrlInsideJar |
25,920 | void (JpsModule rootModel, Collection<? super String> unknownLibraries, boolean exported, String name, boolean applicationLevel) { if (LOG.isDebugEnabled()) { LOG.debug("loading " + rootModel.getName() + ": adding " + (applicationLevel ? "application" : "project") + " library '" + name + "'"); } JpsElementFactory facto... | addNamedLibrary |
25,921 | void (JpsModule rootModel, boolean exported, String moduleName) { final JpsElementFactory elementFactory = JpsElementFactory.getInstance(); final JpsDependenciesList dependenciesList = rootModel.getDependenciesList(); final JpsModuleDependency dependency = dependenciesList.addModuleDependency(elementFactory.createModul... | addInvalidModuleEntry |
25,922 | void (JpsModule rootModel, Collection<? super String> unknownJdks, EclipseModuleManager eclipseModuleManager, String jdkName) { if (LOG.isDebugEnabled()) { LOG.debug("loading " + rootModel.getName() + ": set module jdk " + jdkName); } rootModel.getDependenciesList().addSdkDependency(JpsJavaSdkType.INSTANCE); } | setUpModuleJdk |
25,923 | void (JpsModule rootModel, String srcUrl, boolean testFolder) { rootModel.addSourceRoot(srcUrl, testFolder ? JavaSourceRootType.TEST_SOURCE : JavaSourceRootType.SOURCE); } | addSourceFolder |
25,924 | void (JpsModule rootModel, String srcUrl, boolean testFolder) { rootModel.addSourceRoot(srcUrl, testFolder ? JavaSourceRootType.TEST_SOURCE : JavaSourceRootType.SOURCE); } | addSourceFolderToCurrentContentRoot |
25,925 | void (JpsModule rootModel, String junitName, ExpandMacroToPathMap macroMap) { final @NonNls String ideaHome = macroMap.substitute("$APPLICATION_HOME_DIR$", SystemInfo.isFileSystemCaseSensitive); final FilenameFilter junitFilter = (dir, name) -> name.startsWith("junit"); File[] junitJars = new File(ideaHome, "lib").list... | addJUnitDefaultLib |
25,926 | void (JpsModule rootModel, Element element, boolean exported, String libName, String url, String srcUrl, String nativeRoot, ExpandMacroToPathMap macroMap) { final JpsLibrary jpsLibrary = rootModel.addModuleLibrary(libName, JpsJavaLibraryType.INSTANCE); final JpsDependenciesList dependenciesList = rootModel.getDependenc... | addModuleLibrary |
25,927 | String (JpsModule rootModel, String path) { String url = null; if (new File(path).exists()) { //absolute path url = pathToUrl(path); } else { final String relativePath = new File(myRootPath, path).getPath(); //inside current project final File file = new File(relativePath); if (file.exists()) { url = pathToUrl(relative... | expandEclipsePath2Url |
25,928 | Set<String> () { return Collections.emptySet(); } | getDefinedCons |
25,929 | int (JpsModule rootModel) { return 0; } | rearrange |
25,930 | String (final String path, ExpandMacroToPathMap expander) { final EclipseProjectFinder.LinkedResource linkedResource = EclipseProjectFinder.findLinkedResource(myRootPath, path); if (linkedResource != null) { if (linkedResource.containsPathVariable()) { final String toPathVariableFormat = getVariableRelatedPath(linkedRe... | expandLinkedResourcesPath |
25,931 | void (JpsModule rootModel, final String path) { final JpsJavaModuleExtension extension = getService().getOrCreateModuleExtension(rootModel); String outputUrl = pathToUrl(path); extension.setOutputUrl(outputUrl); extension.setTestOutputUrl(outputUrl); //extension.setInheritOutput(false); rootModel.getDependenciesList().... | setupOutput |
25,932 | void (final JpsDependencyElement dependency, boolean exported) { final JpsJavaDependencyExtension extension = getService().getOrCreateDependencyExtension(dependency); extension.setExported(exported); } | setLibraryEntryExported |
25,933 | JpsJavaExtensionService () { return JpsJavaExtensionService.getInstance(); } | getService |
25,934 | void (Element root, @NotNull Map<String, String> levels) { final Element levelsElement = root.getChild("levels"); if (levelsElement != null) { for (Element element : levelsElement.getChildren("level")) { String libName = element.getAttributeValue("name"); String libLevel = element.getAttributeValue("value"); if (libNam... | readLibraryLevels |
25,935 | String[] (JpsModule model) { return ArrayUtilRt.toStringArray(model.getContentRootsList().getUrls()); } | getEntries |
25,936 | String (JpsModule model, String url) { model.getContentRootsList().addUrl(url); return url; } | createContentEntry |
25,937 | void (Element root, JpsModule model) {} | setupLibraryRoots |
25,938 | void (Element root, JpsModule model, @Nullable JpsSdkType<?> projectSdkType) { final String inheritJdk = root.getAttributeValue("inheritJdk"); final JpsDependenciesList dependenciesList = model.getDependenciesList(); if (inheritJdk != null && Boolean.parseBoolean(inheritJdk)) { dependenciesList.addSdkDependency(project... | setupJdk |
25,939 | void (Element root, JpsModule model) { final JpsJavaModuleExtension extension = getService().getOrCreateModuleExtension(model); final Element testOutputElement = root.getChild(IdeaXml.OUTPUT_TEST_TAG); if (testOutputElement != null) { extension.setTestOutputUrl(testOutputElement.getAttributeValue(IdeaXml.URL_ATTR)); } ... | setupCompilerOutputs |
25,940 | void (Element root, JpsModule model) { final String languageLevel = root.getAttributeValue("LANGUAGE_LEVEL"); final JpsJavaModuleExtension extension = getService().getOrCreateModuleExtension(model); if (languageLevel != null) { extension.setLanguageLevel(LanguageLevel.valueOf(languageLevel)); } } | readLanguageLevel |
25,941 | void (Element root, JpsModule model) { myExpander.substitute(root, SystemInfo.isFileSystemCaseSensitive); } | expandElement |
25,942 | void (Element root, JpsModule model) {} | overrideModulesScopes |
25,943 | void (Element root, String contentUrl, JpsModule model) { for (Element o : root.getChildren(IdeaXml.TEST_FOLDER_TAG)) { final String url = o.getAttributeValue(IdeaXml.URL_ATTR); JpsModuleSourceRoot folderToBeTest = null; for (JpsModuleSourceRoot folder : model.getSourceRoots()) { if (Comparing.strEqual(folder.getUrl(),... | readContentEntry |
25,944 | JpsJavaExtensionService () { return JpsJavaExtensionService.getInstance(); } | getService |
25,945 | void (Format newFormat) { this.userFormat = newFormat; this.currentFormat = userFormat; } | setFormat |
25,946 | Format () { return (Format)userFormat; } | getFormat |
25,947 | String (Document doc) { StringWriter out = new StringWriter(); try { output(doc, out); // output() flushes } catch (IOException e) { } return out.toString(); } | outputString |
25,948 | String (DocType doctype) { StringWriter out = new StringWriter(); try { output(doctype, out); // output() flushes } catch (IOException e) { } return out.toString(); } | outputString |
25,949 | String (Element element) { StringWriter out = new StringWriter(); try { output(element, out); // output() flushes } catch (IOException e) { } return out.toString(); } | outputString |
25,950 | String (List list) { StringWriter out = new StringWriter(); try { output(list, out); // output() flushes } catch (IOException e) { } return out.toString(); } | outputString |
25,951 | String (CDATA cdata) { StringWriter out = new StringWriter(); try { output(cdata, out); // output() flushes } catch (IOException e) { } return out.toString(); } | outputString |
25,952 | String (Text text) { StringWriter out = new StringWriter(); try { output(text, out); // output() flushes } catch (IOException e) { } return out.toString(); } | outputString |
25,953 | String (EntityRef entity) { StringWriter out = new StringWriter(); try { output(entity, out); // output() flushes } catch (IOException e) { } return out.toString(); } | outputString |
25,954 | int (List content, int start) { if (start < 0) { start = 0; } int index = start; int size = content.size(); //if (currentFormat.mode == Format.TextMode.TRIM_FULL_WHITE // || currentFormat.mode == Format.TextMode.NORMALIZE // || currentFormat.mode == Format.TextMode.TRIM) { while (index < size) { if (!isAllWhitespace(co... | skipLeadingWhite |
25,955 | int (List content, int start) { int size = content.size(); if (start > size) { start = size; } int index = start; //if (currentFormat.mode == Format.TextMode.TRIM_FULL_WHITE // || currentFormat.mode == Format.TextMode.NORMALIZE // || currentFormat.mode == Format.TextMode.TRIM) { while (index >= 0) { if (!isAllWhitespac... | skipTrailingWhite |
25,956 | int (List content, int start) { if (start < 0) { start = 0; } int index = start; int size = content.size(); while (index < size) { Object node = content.get(index); if (!((node instanceof Text) || (node instanceof EntityRef))) { return index; } index++; } return size; } | nextNonText |
25,957 | boolean (Object obj) { String str = null; if (obj instanceof String) { str = (String)obj; } else if (obj instanceof Text) { str = ((Text)obj).getText(); } else if (obj instanceof EntityRef) { return false; } else { return false; } for (int i = 0; i < str.length(); i++) { if (!isWhitespace(str.charAt(i))) { return false... | isAllWhitespace |
25,958 | boolean (String str) { if ((str != null) && (str.length() > 0) && isWhitespace(str.charAt(0))) { return true; } return false; } | startsWithWhite |
25,959 | boolean (String str) { if ((str != null) && (str.length() > 0) && isWhitespace(str.charAt(str.length() - 1))) { return true; } return false; } | endsWithWhite |
25,960 | boolean (char c) { if (c == ' ' || c == '\n' || c == '\t' || c == '\r') { return true; } return false; } | isWhitespace |
25,961 | String (String str) { StringBuffer buffer; char ch; String entity; //EscapeStrategy strategy = currentFormat.escapeStrategy; buffer = null; for (int i = 0; i < str.length(); i++) { ch = str.charAt(i); switch (ch) { case '<': entity = "<"; break; case '>': entity = ">"; break; /* case '\'' : entity = "'"; bre... | escapeAttributeEntities |
25,962 | String (String str) { if (escapeOutput == false) return str; StringBuffer buffer; char ch; String entity; //EscapeStrategy strategy = currentFormat.escapeStrategy; buffer = null; for (int i = 0; i < str.length(); i++) { ch = str.charAt(i); switch (ch) { case '<': entity = "<"; break; case '>': entity = ">"; break... | escapeElementEntities |
25,963 | Object () { // Implementation notes: Since all state of an XMLOutputter is // embodied in simple private instance variables, Object.clone // can be used. Note that since Object.clone is totally // broken, we must catch an exception that will never be // thrown. try { return super.clone(); } catch (java.lang.CloneNotSup... | clone |
25,964 | String () { StringBuilder buffer = new StringBuilder(); for (int i = 0; i < userFormat.lineSeparator.length(); i++) { char ch = userFormat.lineSeparator.charAt(i); switch (ch) { case '\r': buffer.append("\\r"); break; case '\n': buffer.append("\\n"); break; case '\t': buffer.append("\\t"); break; default: buffer.append... | toString |
25,965 | EclipseNamespaceStack () { // actually returns a XMLOutputter.NamespaceStack (see below) return new EclipseNamespaceStack(); } | createNamespaceStack |
25,966 | String () { return prefix + "&" + uri; } | toString |
25,967 | void (Namespace ns) { myNamespaces.push(new NamespaceInfo(ns.getPrefix(), ns.getURI())); } | push |
25,968 | String () { return myNamespaces.pop().prefix; } | pop |
25,969 | int () { return myNamespaces.size(); } | size |
25,970 | String (String prefix) { Iterator<NamespaceInfo> iterator = myNamespaces.descendingIterator(); while (iterator.hasNext()) { NamespaceInfo ns = iterator.next(); if (ns.prefix.equals(prefix)) { return ns.uri; } } return null; } | getURI |
25,971 | String () { StringBuilder buf = new StringBuilder(); String sep = System.lineSeparator(); buf.append("Stack: ").append(myNamespaces.size()).append(sep); for (NamespaceInfo info : myNamespaces) { buf.append(info).append(sep); } return buf.toString(); } | toString |
25,972 | EclipseXMLOutputter (String lineSeparator) { EclipseXMLOutputter xmlOutputter = new EclipseXMLOutputter(lineSeparator); Format format = Format.getCompactFormat(). setIndent("\t"). setTextMode(Format.TextMode.NORMALIZE). setEncoding(CharsetToolkit.UTF8). setOmitEncoding(false). setOmitDeclaration(false); xmlOutputter.se... | createOutputter |
25,973 | void () { defaultImpl = null; } | release |
25,974 | void (Level level, @NonNls String module, @NonNls String context, @NonNls String message) { if (defaultImpl != null) { defaultImpl.report(level, module, context, message); } } | report |
25,975 | void (Level level, @NonNls String module, @NonNls String context, Exception e) { String message = e.getMessage(); report(level, module, context, message == null ? e.getClass().toString() : FileUtil.toSystemIndependentName(message)); } | report |
25,976 | String (@NotNull String path) { path = FileUtil.toSystemIndependentName(path); path = StringUtil.trimEnd(path, "/"); while (path.contains("/./")) { path = path.replace("/./", "/"); } path = StringUtil.trimStart(path, "./"); path = StringUtil.trimEnd(path, "/."); while (true) { int index = path.indexOf("/.."); if (index... | normalize |
25,977 | String (@NotNull String baseRoot, @NotNull String path) { baseRoot = normalize(baseRoot); path = normalize(path); int prefix = findCommonPathPrefixLength(baseRoot, path); if (prefix != 0) { baseRoot = baseRoot.substring(prefix); path = path.substring(prefix); if (!baseRoot.isEmpty()) { return normalize(revertRelativePa... | getRelative |
25,978 | int (@NotNull String path1, @NotNull String path2) { int end = -1; do { int beg = end + 1; int new_end = endOfToken(path1, beg); if (new_end != endOfToken(path2, beg) || !path1.substring(beg, new_end).equals(path2.substring(beg, new_end))) { break; } end = new_end; } while (end != path1.length()); return Math.max(end, ... | findCommonPathPrefixLength |
25,979 | int (String s, int index) { index = s.indexOf('/', index); return index == -1 ? s.length() : index; } | endOfToken |
25,980 | String (@NotNull String path) { if (path.equals(".")) { return path; } else { StringBuilder sb = new StringBuilder(); sb.append(".."); int count = normalize(path).split("/").length; while (--count > 0) { sb.append("/.."); } return sb.toString(); } } | revertRelativePath |
25,981 | String () { return JpsEclipseClasspathSerializer.CLASSPATH_STORAGE_ID; } | getID |
25,982 | String () { return getDescr(); } | getDescription |
25,983 | void (@NotNull Module module) { EclipseModuleManagerImpl.getInstance(module).setDocumentSet(null); updateEntitySource(module, source -> ((EclipseProjectFile)source).getInternalSource()); } | detach |
25,984 | void (Module module, Function<? super EntitySource, ? extends EntitySource> updateSource) { ModuleBridge moduleBridge = (ModuleBridge)module; EntityStorage moduleEntityStorage = moduleBridge.getEntityStorage().getCurrent(); ModuleEntity moduleEntity = ModuleBridgeUtils.findModuleEntity(moduleBridge, moduleEntityStorage... | updateEntitySource |
25,985 | void (@NotNull ModuleRootModel model) { updateEntitySource(model.getModule(), source -> { VirtualFileUrlManager virtualFileUrlManager = VirtualFileUrls.getVirtualFileUrlManager(model.getModule().getProject()); String contentRoot = getContentRoot(model); String classpathFileUrl = VfsUtilCore.pathToUrl(contentRoot) + "/"... | attach |
25,986 | String (@NotNull ModuleRootModel model) { VirtualFile contentRoot = EPathUtil.getContentRoot(model); return contentRoot == null ? model.getContentRoots()[0].getPath() : contentRoot.getPath(); } | getContentRoot |
25,987 | void (@NotNull Module module) { final EclipseModuleManagerImpl moduleManager = EclipseModuleManagerImpl.getInstance(module); if (moduleManager != null) { moduleManager.setDocumentSet(null); } } | modulePathChanged |
25,988 | CachedXmlDocumentSet (@NotNull Module module) { EclipseModuleManagerImpl moduleManager = EclipseModuleManagerImpl.getInstance(module); CachedXmlDocumentSet fileCache = moduleManager != null ? moduleManager.getDocumentSet() : null; if (fileCache == null) { fileCache = new CachedXmlDocumentSet(); if (moduleManager != nul... | getFileCache |
25,989 | void (@NotNull Module module, @NotNull String oldName, @NotNull String newName) { try { CachedXmlDocumentSet fileSet = getFileCache(module); VirtualFile root = LocalFileSystem.getInstance().findFileByPath(ModuleUtilCore.getModuleDirPath(module)); VirtualFile source = root == null ? null : root.findChild(oldName + Eclip... | moduleRenamed |
25,990 | String () { return "Eclipse"; } | getName |
25,991 | String () { return EclipseBundle.message("filetype.eclipse.description"); } | getDescription |
25,992 | String () { return EclipseBundle.message("filetype.eclipse.display.name"); } | getDisplayName |
25,993 | String () { return EclipseXml.CLASSPATH_EXT; } | getDefaultExtension |
25,994 | Icon () { return AllIcons.Providers.Eclipse; } | getIcon |
25,995 | boolean () { return false; } | isBinary |
25,996 | String (@NotNull VirtualFile file, final byte @NotNull [] content) { return CharsetToolkit.UTF8; } | getCharset |
25,997 | EclipseModuleManagerImpl (Module module) { return module.getService(EclipseModuleManagerImpl.class); } | getInstance |
25,998 | boolean (@NotNull Module module) { return JpsEclipseClasspathSerializer.CLASSPATH_STORAGE_ID.equals(ClassPathStorageUtil.getStorageType(module)); } | isEclipseStorage |
25,999 | void (String invalidJdk) { myInvalidJdk = invalidJdk; } | setInvalidJdk |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.