Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
500
Set<File> () { return myFiles; }
getExcludedFiles
501
Set<File> () { return myDirectories; }
getExcludedDirectories
502
Set<File> () { return myRecursivelyExcludedDirectories; }
getRecursivelyExcludedDirectories
503
JpsJavaCompilerConfigurationImpl () { return new JpsJavaCompilerConfigurationImpl(this); }
createCopy
504
boolean () { return myAddNotNullAssertions; }
isAddNotNullAssertions
505
List<String> () { return myNotNullAnnotations; }
getNotNullAnnotations
506
boolean () { return myClearOutputDirectoryOnRebuild; }
isClearOutputDirectoryOnRebuild
507
void (boolean addNotNullAssertions) { myAddNotNullAssertions = addNotNullAssertions; }
setAddNotNullAssertions
508
void (List<String> notNullAnnotations) { myNotNullAnnotations = Collections.unmodifiableList(notNullAnnotations); }
setNotNullAnnotations
509
void (boolean clearOutputDirectoryOnRebuild) { myClearOutputDirectoryOnRebuild = clearOutputDirectoryOnRebuild; }
setClearOutputDirectoryOnRebuild
510
JpsCompilerExcludes () { return myCompilerExcludes; }
getCompilerExcludes
511
JpsCompilerExcludes () { return myValidationExcludes; }
getValidationExcludes
512
JpsValidationConfiguration () { return myValidationConfiguration; }
getValidationConfiguration
513
void (boolean validateOnBuild, @NotNull Set<String> disabledValidators) { myValidationConfiguration = new JpsValidationConfigurationImpl(validateOnBuild, disabledValidators); }
setValidationConfiguration
514
ProcessorConfigProfile () { return myDefaultAnnotationProcessingProfile; }
getDefaultAnnotationProcessingProfile
515
Collection<ProcessorConfigProfile> () { return myAnnotationProcessingProfiles; }
getAnnotationProcessingProfiles
516
void (String pattern) { myResourcePatterns.add(pattern); }
addResourcePattern
517
List<String> () { return myResourcePatterns; }
getResourcePatterns
518
boolean (@NotNull File file, @NotNull File srcRoot) { ResourcePatterns patterns = myCompiledPatterns; if (patterns == null) { myCompiledPatterns = patterns = new ResourcePatterns(this); } return patterns.isResourceFile(file, srcRoot); }
isResourceFile
519
String (String moduleName) { String level = myModulesByteCodeTargetLevels.get(moduleName); if (level != null) { return level.isEmpty() ? null : level; } return myProjectByteCodeTargetLevel; }
getByteCodeTargetLevel
520
void (String moduleName, String level) { myModulesByteCodeTargetLevels.put(moduleName, level); }
setModuleByteCodeTargetLevel
521
String () { return myJavaCompilerId; }
getJavaCompilerId
522
void (@NotNull String compiler) { myJavaCompilerId = compiler; }
setJavaCompilerId
523
JpsJavaCompilerOptions (@NotNull String compilerId) { JpsJavaCompilerOptions options = myCompilerOptions.get(compilerId); if (options == null) { options = new JpsJavaCompilerOptions(); myCompilerOptions.put(compilerId, options); } return options; }
getCompilerOptions
524
void (@NotNull String compilerId, @NotNull JpsJavaCompilerOptions options) { myCompilerOptions.put(compilerId, options); }
setCompilerOptions
525
JpsJavaCompilerOptions () { return getCompilerOptions(getJavaCompilerId()); }
getCurrentCompilerOptions
526
void (String level) { myProjectByteCodeTargetLevel = level; }
setProjectByteCodeTargetLevel
527
boolean () { return myUseReleaseOption; }
useReleaseOption
528
void (boolean useReleaseOption) { myUseReleaseOption = useReleaseOption; }
setUseReleaseOption
529
ProcessorConfigProfile () { ProcessorConfigProfileImpl profile = new ProcessorConfigProfileImpl(""); myAnnotationProcessingProfiles.add(profile); return profile; }
addAnnotationProcessingProfile
530
ProcessorConfigProfile (JpsModule module) { Map<JpsModule, ProcessorConfigProfile> map = myAnnotationProcessingProfileMap; if (map == null) { map = new HashMap<>(); final Map<String, JpsModule> namesMap = new HashMap<>(); for (JpsModule m : module.getProject().getModules()) { namesMap.put(m.getName(), m); } if (!namesMap.isEmpty()) { for (ProcessorConfigProfile profile : getAnnotationProcessingProfiles()) { for (String name : profile.getModuleNames()) { final JpsModule mod = namesMap.get(name); if (mod != null) { map.put(mod, profile); } } } } myAnnotationProcessingProfileMap = map; } final ProcessorConfigProfile profile = map.get(module); return profile != null? profile : getDefaultAnnotationProcessingProfile(); }
getAnnotationProcessingProfile
531
boolean (File file, @NotNull final File srcRoot) { final String name = file.getName(); final String relativePathToParent; final String parentPath = file.getParent(); if (parentPath != null) { relativePathToParent = "/" + FileUtilRt.getRelativePath(FileUtilRt.toSystemIndependentName(srcRoot.getAbsolutePath()), FileUtilRt.toSystemIndependentName(parentPath), '/', SystemInfo.isFileSystemCaseSensitive); } else { relativePathToParent = null; } for (CompiledPattern pair : myCompiledPatterns) { if (matches(name, relativePathToParent, srcRoot, pair)) { return true; } } if (myNegatedCompiledPatterns.isEmpty()) { return false; } //noinspection ForLoopReplaceableByForEach for (int i = 0; i < myNegatedCompiledPatterns.size(); i++) { if (matches(name, relativePathToParent, srcRoot, myNegatedCompiledPatterns.get(i))) { return false; } } return true; }
isResourceFile
532
boolean (String name, String parentRelativePath, @NotNull File srcRoot, CompiledPattern pattern) { if (!matches(name, pattern.fileName)) { return false; } if (parentRelativePath != null) { if (pattern.dir != null && !matches(parentRelativePath, pattern.dir)) { return false; } if (pattern.srcRoot != null && !matches(srcRoot.getName(), pattern.srcRoot)) { return false; } } return true; }
matches
533
boolean (String s, Pattern p) { try { return p.matcher(s).matches(); } catch (Exception e) { LOG.error("Exception matching file name \"" + s + "\" against the pattern \"" + p + "\"", e); return false; } }
matches
534
CompiledPattern (String wildcardPattern) { if (isPatternNegated(wildcardPattern)) { wildcardPattern = wildcardPattern.substring(1); } wildcardPattern = FileUtilRt.toSystemIndependentName(wildcardPattern); String srcRoot = null; int colon = wildcardPattern.indexOf(":"); if (colon > 0) { srcRoot = wildcardPattern.substring(0, colon); wildcardPattern = wildcardPattern.substring(colon + 1); } String dirPattern = null; int slash = wildcardPattern.lastIndexOf('/'); if (slash >= 0) { dirPattern = wildcardPattern.substring(0, slash + 1); wildcardPattern = wildcardPattern.substring(slash + 1); dirPattern = optimizeDirPattern(dirPattern); } wildcardPattern = normalizeWildcards(wildcardPattern); wildcardPattern = optimize(wildcardPattern); final Pattern dirCompiled = dirPattern == null ? null : compilePattern(dirPattern); final Pattern srcCompiled = srcRoot == null ? null : compilePattern(optimize(normalizeWildcards(srcRoot))); return new CompiledPattern(compilePattern(wildcardPattern), dirCompiled, srcCompiled); }
convertToRegexp
535
String (String dirPattern) { if (!dirPattern.startsWith("/")) { dirPattern = "/" + dirPattern; } //now dirPattern starts and ends with '/' dirPattern = normalizeWildcards(dirPattern); dirPattern = StringUtil.replace(dirPattern, "/.*.*/", "(/.*)?/"); dirPattern = StringUtil.trimEnd(dirPattern, "/"); dirPattern = optimize(dirPattern); return dirPattern; }
optimizeDirPattern
536
String (String wildcardPattern) { return wildcardPattern.replaceAll("(?:\\.\\*)+", ".*"); }
optimize
537
String (String wildcardPattern) { wildcardPattern = StringUtil.replace(wildcardPattern, "\\!", "!"); wildcardPattern = StringUtil.replace(wildcardPattern, ".", "\\."); wildcardPattern = StringUtil.replace(wildcardPattern, "*?", ".+"); wildcardPattern = StringUtil.replace(wildcardPattern, "?*", ".+"); wildcardPattern = StringUtil.replace(wildcardPattern, "*", ".*"); wildcardPattern = StringUtil.replace(wildcardPattern, "?", "."); return wildcardPattern; }
normalizeWildcards
538
boolean (String wildcardPattern) { return wildcardPattern.length() > 1 && wildcardPattern.charAt(0) == '!'; }
isPatternNegated
539
Pattern (@NonNls String s) { return Pattern.compile(s, SystemInfo.isFileSystemCaseSensitive ? 0 : Pattern.CASE_INSENSITIVE); }
compilePattern
540
void (ProcessorConfigProfile other) { myName = other.getName(); myEnabled = other.isEnabled(); myIsProcOnly = other.isProcOnly(); myObtainProcessorsFromClasspath = other.isObtainProcessorsFromClasspath(); myProcessorPath = other.getProcessorPath(); myUseProcessorModulePath = other.isUseProcessorModulePath(); myProcessors.clear(); myProcessors.addAll(other.getProcessors()); myProcessorOptions.clear(); myProcessorOptions.putAll(other.getProcessorOptions()); myGeneratedProductionDirectoryName = other.getGeneratedSourcesDirectoryName(false); myGeneratedTestsDirectoryName = other.getGeneratedSourcesDirectoryName(true); myOutputRelativeToContentRoot = other.isOutputRelativeToContentRoot(); myModuleNames.clear(); myModuleNames.addAll(other.getModuleNames()); }
initFrom
541
String () { return myName; }
getName
542
void (String name) { myName = name; }
setName
543
boolean () { return myEnabled; }
isEnabled
544
void (boolean enabled) { myEnabled = enabled; }
setEnabled
545
String () { return myProcessorPath; }
getProcessorPath
546
void (@Nullable String processorPath) { myProcessorPath = processorPath != null? processorPath : ""; }
setProcessorPath
547
void (boolean useModulePath) { myUseProcessorModulePath = useModulePath; }
setUseProcessorModulePath
548
boolean () { return myUseProcessorModulePath; }
isUseProcessorModulePath
549
boolean () { return myObtainProcessorsFromClasspath; }
isObtainProcessorsFromClasspath
550
void (boolean value) { myObtainProcessorsFromClasspath = value; }
setObtainProcessorsFromClasspath
551
String (boolean forTests) { return forTests? myGeneratedTestsDirectoryName : myGeneratedProductionDirectoryName; }
getGeneratedSourcesDirectoryName
552
void (@Nullable String name, boolean forTests) { if (forTests) { myGeneratedTestsDirectoryName = name != null? name.trim() : DEFAULT_TESTS_DIR_NAME; } else { myGeneratedProductionDirectoryName = name != null? name.trim() : DEFAULT_PRODUCTION_DIR_NAME; } }
setGeneratedSourcesDirectoryName
553
boolean () { return myOutputRelativeToContentRoot; }
isOutputRelativeToContentRoot
554
void (boolean relativeToContent) { myOutputRelativeToContentRoot = relativeToContent; }
setOutputRelativeToContentRoot
555
boolean () { return myIsProcOnly; }
isProcOnly
556
void (boolean value) { myIsProcOnly = value; }
setProcOnly
557
Set<String> () { return myModuleNames; }
getModuleNames
558
boolean (String name) { return myModuleNames.add(name); }
addModuleName
559
boolean (Collection<String> names) { return myModuleNames.addAll(names); }
addModuleNames
560
boolean (String name) { return myModuleNames.remove(name); }
removeModuleName
561
boolean (Collection<String> names) { return myModuleNames.removeAll(names); }
removeModuleNames
562
void () { myModuleNames.clear(); }
clearModuleNames
563
void () { myProcessors.clear(); }
clearProcessors
564
boolean (String processor) { return myProcessors.add(processor); }
addProcessor
565
boolean (String processor) { return myProcessors.remove(processor); }
removeProcessor
566
Set<String> () { return Collections.unmodifiableSet(myProcessors); }
getProcessors
567
String (String key, String value) { return myProcessorOptions.put(key, value); }
setOption
568
String (String key) { return myProcessorOptions.get(key); }
getOption
569
void () { myProcessorOptions.clear(); }
clearProcessorOptions
570
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ProcessorConfigProfileImpl profile = (ProcessorConfigProfileImpl)o; if (myEnabled != profile.myEnabled) return false; if (myIsProcOnly != profile.myIsProcOnly) return false; if (myObtainProcessorsFromClasspath != profile.myObtainProcessorsFromClasspath) return false; if (myGeneratedProductionDirectoryName != null ? !myGeneratedProductionDirectoryName.equals(profile.myGeneratedProductionDirectoryName) : profile.myGeneratedProductionDirectoryName != null) { return false; } if (myGeneratedTestsDirectoryName != null ? !myGeneratedTestsDirectoryName.equals(profile.myGeneratedTestsDirectoryName) : profile.myGeneratedTestsDirectoryName != null) { return false; } if (myOutputRelativeToContentRoot != profile.myOutputRelativeToContentRoot) return false; if (myUseProcessorModulePath != profile.myUseProcessorModulePath) return false; if (!myModuleNames.equals(profile.myModuleNames)) return false; if (!myProcessorOptions.equals(profile.myProcessorOptions)) return false; if (myProcessorPath != null ? !myProcessorPath.equals(profile.myProcessorPath) : profile.myProcessorPath != null) return false; if (!myProcessors.equals(profile.myProcessors)) return false; if (!myName.equals(profile.myName)) return false; return true; }
equals
571
int () { int result = myName.hashCode(); result = 31 * result + (myEnabled ? 1 : 0); result = 31 * result + (myIsProcOnly ? 1 : 0); result = 31 * result + (myObtainProcessorsFromClasspath ? 1 : 0); result = 31 * result + (myProcessorPath != null ? myProcessorPath.hashCode() : 0); result = 31 * result + myProcessors.hashCode(); result = 31 * result + myProcessorOptions.hashCode(); result = 31 * result + (myGeneratedProductionDirectoryName != null ? myGeneratedProductionDirectoryName.hashCode() : 0); result = 31 * result + (myGeneratedTestsDirectoryName != null ? myGeneratedTestsDirectoryName.hashCode() : 0); result = 31 * result + (myOutputRelativeToContentRoot ? 1 : 0); result = 31 * result + (myUseProcessorModulePath ? 1 : 0); result = 31 * result + myModuleNames.hashCode(); return result; }
hashCode
572
String () { return myName; }
toString
573
JpsApplicationRunConfigurationPropertiesImpl () { return new JpsApplicationRunConfigurationPropertiesImpl(XmlSerializerUtil.createCopy(myState)); }
createCopy
574
void (@NotNull JpsApplicationRunConfigurationPropertiesImpl modified) { XmlSerializerUtil.copyBean(modified.myState, myState); }
applyChanges
575
String () { return myState.MAIN_CLASS_NAME; }
getMainClass
576
void (String value) { myState.MAIN_CLASS_NAME = value; }
setMainClass
577
JpsOrderRootType () { return myRootType; }
getRootType
578
String () { return myUrl; }
getUrl
579
InclusionOptions () { return myOptions; }
getInclusionOptions
580
JpsLibraryRootImpl () { return new JpsLibraryRootImpl(this); }
createCopy
581
void (@NotNull JpsLibraryRootImpl modified) { }
applyChanges
582
JpsLibrary () { return (JpsLibrary)myParent.getParent(); }
getLibrary
583
JpsLibraryType<P> () { return myLibraryType; }
getType
584
P () { return myContainer.getChild(myLibraryType.getPropertiesRole()); }
getProperties
585
List<JpsLibraryRoot> (@NotNull JpsOrderRootType rootType) { final JpsElementCollection<JpsLibraryRoot> rootsCollection = myContainer.getChild(getRole(rootType)); return rootsCollection != null ? rootsCollection.getElements() : Collections.emptyList(); }
getRoots
586
void (@NotNull String url, @NotNull JpsOrderRootType rootType) { addRoot(url, rootType, JpsLibraryRoot.InclusionOptions.ROOT_ITSELF); }
addRoot
587
void (@NotNull File file, @NotNull JpsOrderRootType rootType) { addRoot(JpsPathUtil.getLibraryRootUrl(file), rootType); }
addRoot
588
void (final @NotNull String url, final @NotNull JpsOrderRootType rootType, @NotNull JpsLibraryRoot.InclusionOptions options) { myContainer.getOrSetChild(getRole(rootType)).addChild(new JpsLibraryRootImpl(url, rootType, options)); }
addRoot
589
void (final @NotNull String url, final @NotNull JpsOrderRootType rootType) { final JpsElementCollection<JpsLibraryRoot> rootsCollection = myContainer.getChild(getRole(rootType)); if (rootsCollection != null) { for (JpsLibraryRoot root : rootsCollection.getElements()) { if (root.getUrl().equals(url) && root.getRootType().equals(rootType)) { rootsCollection.removeChild(root); break; } } } }
removeUrl
590
JpsElementCollectionRole<JpsLibraryRoot> (JpsOrderRootType type) { JpsElementCollectionRole<JpsLibraryRoot> role = ourRootRoles.get(type); if (role != null) return role; ourRootRoles.putIfAbsent(type, JpsElementCollectionRole.create(new JpsLibraryRootRole(type))); return ourRootRoles.get(type); }
getRole
591
void () { getParent().removeChild(this); }
delete
592
JpsElementCollectionImpl<JpsLibrary> () { //noinspection unchecked return (JpsElementCollectionImpl<JpsLibrary>)myParent; }
getParent
593
JpsLibraryImpl<P> () { return new JpsLibraryImpl<>(this); }
createCopy
594
JpsLibraryReference () { return new JpsLibraryReferenceImpl(getName(), createParentReference()); }
createReference
595
JpsElementReference<JpsCompositeElement> () { //noinspection unchecked return ((JpsReferenceableElement<JpsCompositeElement>)getParent().getParent()).createReference(); }
createParentReference
596
List<File> (final JpsOrderRootType rootType) { List<String> urls = getRootUrls(rootType); List<File> files = new ArrayList<>(urls.size()); for (String url : urls) { if (!JpsPathUtil.isJrtUrl(url)) { files.add(JpsPathUtil.urlToFile(url)); } } return files; }
getFiles
597
List<Path> (@NotNull JpsOrderRootType rootType) { List<String> urls = getRootUrls(rootType); List<Path> result = new ArrayList<>(urls.size()); for (String url : urls) { if (!JpsPathUtil.isJrtUrl(url)) { result.add(Paths.get(JpsPathUtil.urlToPath(url))); } } return result; }
getPaths
598
List<String> (JpsOrderRootType rootType) { List<String> urls = new ArrayList<>(); for (JpsLibraryRoot root : getRoots(rootType)) { switch (root.getInclusionOptions()) { case ROOT_ITSELF: urls.add(root.getUrl()); break; case ARCHIVES_UNDER_ROOT: collectArchives(JpsPathUtil.urlToFile(root.getUrl()), false, urls); break; case ARCHIVES_UNDER_ROOT_RECURSIVELY: collectArchives(JpsPathUtil.urlToFile(root.getUrl()), true, urls); break; } } return urls; }
getRootUrls
599
void (File file, boolean recursively, List<? super String> result) { final File[] children = file.listFiles(); if (children != null) { // There is no guarantee about order of files on different OS Arrays.sort(children); for (File child : children) { final String extension = FileUtilRt.getExtension(child.getName()); if (child.isDirectory()) { if (recursively) { collectArchives(child, recursively, result); } } // todo get list of extensions mapped to Archive file type from IDE settings else if (AR_EXTENSIONS.contains(extension)) { result.add(JpsPathUtil.getLibraryRootUrl(child)); } } } }
collectArchives