Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
100
void (final Element configuration) { myConfiguration = configuration; }
setConfiguration
101
void (final String name) { myName = name; }
setName
102
void (final String type) { myFacetType = type; }
setFacetType
103
void (String externalSystemId) { myExternalSystemId = externalSystemId; }
setExternalSystemId
104
void (String externalSystemIdInInternalStorage) { myExternalSystemIdInInternalStorage = externalSystemIdInInternalStorage; }
setExternalSystemIdInInternalStorage
105
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FacetState state = (FacetState)o; return Objects.equals(myFacetType, state.myFacetType) && Objects.equals(myName, state.myName) && Objects.equals(myExternalSystemId, state.myExternalSystemId) && JDOMUtil.areEleme...
equals
106
int () { return (31 * Objects.hash(myFacetType, myName, myExternalSystemId, subFacets)) + JDOMUtil.hashCode(myConfiguration, false); }
hashCode
107
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FacetManagerState state = (FacetManagerState)o; return facets.equals(state.facets); }
equals
108
int () { return Objects.hash(facets); }
hashCode
109
String () { return myFacetTypeId; }
getFacetTypeId
110
E (final Element configurationElement, final String facetName, JpsModule module, JpsElement parentFacet) { final E e = loadExtension(configurationElement, facetName, parentFacet, module); return module.getContainer().setChild(myRole, e); }
loadExtension
111
boolean (JpsModule module) { return module.getContainer().getChild(myRole) != null; }
hasExtension
112
void (E extension, Element facetConfigurationTag, JpsModule module) { }
saveExtension
113
String () { return myTypeId; }
getTypeId
114
void (@NotNull JpsProject project, @Nullable Element runManagerTag) { List<Element> elements = JDOMUtil.getChildren(runManagerTag, "configuration"); if (elements.isEmpty()) { return; } Map<String, JpsRunConfigurationPropertiesSerializer<?>> serializers = new HashMap<>(); for (JpsModelSerializerExtension extension : Jps...
loadRunConfigurations
115
void (@NotNull JpsModule module, @NotNull Element rootModel) { loadExplodedDirectoryExtension(module, rootModel); loadJavaModuleExtension(module, rootModel); }
loadRootModel
116
void (@NotNull JpsModule module, @NotNull Element rootElement) { Element testModuleProperties = JDomSerializationUtil.findComponent(rootElement, "TestModuleProperties"); if (testModuleProperties != null) { String productionModuleName = testModuleProperties.getAttributeValue(PRODUCTION_MODULE_NAME_ATTRIBUTE); if (produc...
loadModuleOptions
117
void (JpsDependencyElement dependency, Element entry) { boolean exported = entry.getAttributeValue(EXPORTED_ATTRIBUTE) != null; String scopeName = entry.getAttributeValue(SCOPE_ATTRIBUTE); JpsJavaDependencyScope scope; try { scope = scopeName != null ? JpsJavaDependencyScope.valueOf(scopeName) : JpsJavaDependencyScope....
loadModuleDependencyProperties
118
List<JpsLibraryRootTypeSerializer> () { return Arrays.asList(new JpsLibraryRootTypeSerializer("JAVADOC", JpsOrderRootType.DOCUMENTATION, true), new JpsLibraryRootTypeSerializer("ANNOTATIONS", JpsAnnotationRootType.INSTANCE, false), new JpsLibraryRootTypeSerializer("NATIVE", JpsNativeLibraryRootType.INSTANCE, false)); }
getLibraryRootTypeSerializers
119
List<JpsLibraryRootTypeSerializer> () { return Arrays.asList(new JpsLibraryRootTypeSerializer("javadocPath", JpsOrderRootType.DOCUMENTATION, true), new JpsLibraryRootTypeSerializer("annotationsPath", JpsAnnotationRootType.INSTANCE, true)); }
getSdkRootTypeSerializers
120
void (JpsModule module, Element rootModelComponent) { final Element exploded = rootModelComponent.getChild(EXPLODED_TAG); if (exploded != null) { final ExplodedDirectoryModuleExtension extension = getService().getOrCreateExplodedDirectoryExtension(module); extension.setExcludeExploded(rootModelComponent.getChild(EXCLUD...
loadExplodedDirectoryExtension
121
void (JpsModule module, Element rootModelComponent) { final JpsJavaModuleExtension extension = getService().getOrCreateModuleExtension(module); final Element outputTag = rootModelComponent.getChild(OUTPUT_TAG); String outputUrl = outputTag != null ? outputTag.getAttributeValue(URL_ATTRIBUTE) : null; extension.setOutput...
loadJavaModuleExtension
122
void (Element rootModelComponent, final String rootsTagName, final JpsUrlList result) { final Element roots = rootModelComponent.getChild(rootsTagName); for (Element root : JDOMUtil.getChildren(roots, ROOT_TAG)) { result.addUrl(root.getAttributeValue(URL_ATTRIBUTE)); } }
loadAdditionalRoots
123
JpsJavaExtensionService () { return JpsJavaExtensionService.getInstance(); }
getService
124
JpsProductionModuleOutputPackagingElement (Element element) { JpsModuleReference reference = JpsElementFactory.getInstance().createModuleReference(element.getAttributeValue("name")); return getService().createProductionModuleOutput(reference); }
load
125
JpsProductionModuleSourcePackagingElement (Element element) { JpsModuleReference reference = JpsElementFactory.getInstance().createModuleReference(element.getAttributeValue("name")); return getService().createProductionModuleSource(reference); }
load
126
JpsTestModuleOutputPackagingElement (Element element) { JpsModuleReference reference = JpsElementFactory.getInstance().createModuleReference(element.getAttributeValue("name")); return getService().createTestModuleOutput(reference); }
load
127
LanguageLevel (String level, LanguageLevel defaultLevel) { for (LanguageLevel languageLevel : LanguageLevel.values()) { if (level.equals(languageLevel.name())) { return languageLevel; } } return defaultLevel; }
readLanguageLevel
128
void (@NotNull JpsProject project, @NotNull Element componentTag) { JpsJavaProjectExtension extension = getService().getOrCreateProjectExtension(project); final Element output = componentTag.getChild(OUTPUT_TAG); if (output != null) { String url = output.getAttributeValue(URL_ATTRIBUTE); if (url != null) { extension.se...
loadExtension
129
JavaSourceRootProperties (@NotNull Element sourceRootTag) { String packagePrefix = StringUtil.notNullize(sourceRootTag.getAttributeValue(JpsModuleRootModelSerializer.PACKAGE_PREFIX_ATTRIBUTE)); boolean isGenerated = Boolean.parseBoolean(sourceRootTag.getAttributeValue(IS_GENERATED_ATTRIBUTE)); return getService().creat...
loadProperties
130
void (@NotNull JavaSourceRootProperties properties, @NotNull Element sourceRootTag) { String isTestSource = Boolean.toString(getType().equals(JavaSourceRootType.TEST_SOURCE)); sourceRootTag.setAttribute(JpsModuleRootModelSerializer.IS_TEST_SOURCE_ATTRIBUTE, isTestSource); String packagePrefix = properties.getPackagePre...
saveProperties
131
JavaResourceRootProperties (@NotNull Element sourceRootTag) { String relativeOutputPath = StringUtil.notNullize(sourceRootTag.getAttributeValue(RELATIVE_OUTPUT_PATH_ATTRIBUTE)); boolean isGenerated = Boolean.parseBoolean(sourceRootTag.getAttributeValue(IS_GENERATED_ATTRIBUTE)); return getService().createResourceRootPro...
loadProperties
132
void (@NotNull JavaResourceRootProperties properties, @NotNull Element sourceRootTag) { String relativeOutputPath = properties.getRelativeOutputPath(); if (!relativeOutputPath.isEmpty()) { sourceRootTag.setAttribute(RELATIVE_OUTPUT_PATH_ATTRIBUTE, relativeOutputPath); } if (properties.isForGeneratedSources()) { sourceR...
saveProperties
133
JpsSimpleElement<JpsMavenRepositoryLibraryDescriptor> (@Nullable Element elem) { return JpsElementFactory.getInstance().createSimpleElement(loadDescriptor(elem)); }
loadProperties
134
JpsMavenRepositoryLibraryDescriptor (@Nullable Element elem) { if (elem == null) return new JpsMavenRepositoryLibraryDescriptor(null); String mavenId = elem.getAttributeValue(MAVEN_ID_ATTRIBUTE, (String)null); boolean includeTransitiveDependencies = Boolean.parseBoolean(elem.getAttributeValue(INCLUDE_TRANSITIVE_DEPS_AT...
loadDescriptor
135
List<ArtifactVerification> (@Nullable String mavenId, @Nullable Element element) { if (element == null) { return Collections.emptyList(); } List<Element> children = element.getChildren(ARTIFACT_TAG); List<ArtifactVerification> result = new ArrayList<>(children.size()); for (var child : children) { String artifactUrl = ...
loadArtifactsVerificationProperties
136
JpsApplicationRunConfigurationProperties (@Nullable Element runConfigurationTag) { JpsApplicationRunConfigurationState properties = runConfigurationTag != null ? XmlSerializer.deserialize(runConfigurationTag, JpsApplicationRunConfigurationState.class) : new JpsApplicationRunConfigurationState(); return JpsJavaExtension...
loadProperties
137
void (ProcessorConfigProfile profile, Element element) { profile.setName(element.getAttributeValue(NAME, "")); profile.setEnabled(Boolean.parseBoolean(element.getAttributeValue(ENABLED, "false"))); profile.setProcOnly(Boolean.parseBoolean(element.getAttributeValue(PROC_ONLY, "false"))); final Element srcOutput = elemen...
readExternal
138
void (@NotNull ProcessorConfigProfile profile, @NotNull Element element) { element.setAttribute(NAME, profile.getName()); if (profile.isEnabled()) { element.setAttribute(ENABLED, Boolean.toString(profile.isEnabled())); } if (profile.isProcOnly()) { element.setAttribute(PROC_ONLY, Boolean.toString(profile.isProcOnly()))...
writeExternal
139
Element (Element parent, final String childName) { final Element child = new Element(childName); parent.addContent(child); return child; }
addChild
140
void (@NotNull JpsProject project, @NotNull Element componentTag) { JpsJavaCompilerConfiguration configuration = JpsJavaExtensionService.getInstance().getCompilerConfiguration(project); JpsJavaCompilerOptions options = XmlSerializer.deserialize(componentTag, JpsJavaCompilerOptions.class); configuration.setCompilerOptio...
loadExtension
141
void (@NotNull JpsProject project) { JpsJavaCompilerConfiguration configuration = JpsJavaExtensionService.getInstance().getCompilerConfiguration(project); configuration.setCompilerOptions(myCompilerId, new JpsJavaCompilerOptions()); }
loadExtensionWithDefaultSettings
142
void (@NotNull JpsProject project, @NotNull Element componentTag) { JpsJavaCompilerConfiguration configuration = JpsJavaExtensionService.getInstance().getCompilerConfiguration(project); EclipseCompilerOptions options = XmlSerializer.deserialize(componentTag, EclipseCompilerOptions.class); configuration.setCompilerOptio...
loadExtension
143
void (@NotNull JpsProject project) { JpsJavaCompilerConfiguration configuration = JpsJavaExtensionService.getInstance().getCompilerConfiguration(project); configuration.setCompilerOptions(myCompilerId, new EclipseCompilerOptions()); }
loadExtensionWithDefaultSettings
144
void (@NotNull JpsProject project, @NotNull Element componentTag) { JpsJavaCompilerConfiguration configuration = JpsJavaExtensionService.getInstance().getCompilerConfiguration(project); Element addNotNullTag = componentTag.getChild(ADD_NOTNULL_ASSERTIONS); if (addNotNullTag != null) { configuration.setAddNotNullAsserti...
loadExtension
145
void (@NotNull JpsProject project) { JpsJavaCompilerConfiguration configuration = JpsJavaExtensionService.getInstance().getCompilerConfiguration(project); for (String pattern : DEFAULT_WILDCARD_PATTERNS) { configuration.addResourcePattern(pattern); } }
loadExtensionWithDefaultSettings
146
void (Element excludeFromCompileTag, JpsCompilerExcludes excludes) { if (excludeFromCompileTag != null) { for (Element fileTag : JDOMUtil.getChildren(excludeFromCompileTag, "file")) { excludes.addExcludedFile(fileTag.getAttributeValue("url")); } for (Element directoryTag : JDOMUtil.getChildren(excludeFromCompileTag, "d...
readExcludes
147
void (@NotNull JpsProject project, @NotNull Element componentTag) { JpsJavaCompilerConfiguration configuration = JpsJavaExtensionService.getInstance().getCompilerConfiguration(project); ValidationConfigurationState state = XmlSerializer.deserialize(componentTag, ValidationConfigurationState.class); Set<String> disabled...
loadExtension
148
void (@NotNull JpsProject project, @NotNull Element componentTag) { JpsJavaCompilerConfiguration configuration = JpsJavaExtensionService.getInstance().getCompilerConfiguration(project); JpsJavaCompilerConfigurationSerializer.readExcludes(componentTag, configuration.getValidationExcludes()); }
loadExtension
149
void (@NotNull JpsProject project, @NotNull Element componentTag) { JpsJavaCompilerConfiguration configuration = JpsJavaExtensionService.getInstance().getCompilerConfiguration(project); String assertNotNull = JDOMExternalizerUtil.readField(componentTag, "ASSERT_NOT_NULL"); if (assertNotNull != null) { configuration.set...
loadExtension
150
void (@NotNull JpsProject project, @NotNull Element componentTag) { JpsJavaCompilerConfiguration configuration = JpsJavaExtensionService.getInstance().getCompilerConfiguration(project); List<String> annoNames = new ArrayList<>(); for (Element option : componentTag.getChildren("instrumentedNotNulls")) { for (Element ite...
loadExtension
151
void (@NotNull JpsProject project) { JpsJavaExtensionService.getInstance().getCompilerConfiguration(project).setNotNullAnnotations( Collections.singletonList(NotNull.class.getName())); }
loadExtensionWithDefaultSettings
152
void (@NotNull JpsProject project, @NotNull Element componentTag) { JpsJavaCompilerConfiguration configuration = JpsJavaExtensionService.getInstance().getCompilerConfiguration(project); RmicCompilerOptions options = XmlSerializer.deserialize(componentTag, RmicCompilerOptions.class); configuration.setCompilerOptions(myC...
loadExtension
153
void (@NotNull JpsProject project) { JpsJavaCompilerConfiguration configuration = JpsJavaExtensionService.getInstance().getCompilerConfiguration(project); configuration.setCompilerOptions(myCompilerId, new RmicCompilerOptions()); }
loadExtensionWithDefaultSettings
154
JpsDummyElement (Element propertiesElement) { return JpsElementFactory.getInstance().createDummyElement(); }
loadProperties
155
void (@Nullable Element sdkListElement, JpsLibraryCollection result, @NotNull JpsPathMapper pathMapper) { for (Element sdkElement : JDOMUtil.getChildren(sdkListElement, JDK_TAG)) { result.addLibrary(loadSdk(sdkElement, pathMapper)); } }
loadSdks
156
JpsLibrary (Element sdkElement, @NotNull JpsPathMapper pathMapper) { String name = getAttributeValue(sdkElement, NAME_TAG); String typeId = getAttributeValue(sdkElement, TYPE_TAG); LOG.debug("Loading " + typeId + " SDK '" + name + "'"); JpsSdkPropertiesSerializer<?> serializer = getSdkPropertiesSerializer(typeId); fina...
loadSdk
157
void (Element rootElement, JpsLibrary library, JpsOrderRootType rootType, @NotNull JpsPathMapper pathMapper) { final String type = rootElement.getAttributeValue(TYPE_ATTRIBUTE); if (type.equals(COMPOSITE_TYPE)) { for (Element element : rootElement.getChildren()) { loadRoots(element, library, rootType, pathMapper); } } ...
loadRoots
158
JpsLibraryRootTypeSerializer (String typeId) { for (JpsLibraryRootTypeSerializer serializer : PREDEFINED_ROOT_TYPE_SERIALIZERS) { if (serializer.getTypeId().equals(typeId)) { return serializer; } } for (JpsModelSerializerExtension extension : JpsModelSerializerExtension.getExtensions()) { for (JpsLibraryRootTypeSeriali...
getRootTypeSerializer
159
String (Element element, String childName) { final Element child = element.getChild(childName); return child != null ? child.getAttributeValue(VALUE_ATTRIBUTE) : null; }
getAttributeValue
160
JpsDummyElement (@Nullable Element propertiesElement) { return JpsElementFactory.getInstance().createDummyElement(); }
loadProperties
161
void (@Nullable Element libraryTableElement, @NotNull JpsPathMapper pathMapper, JpsLibraryCollection result) { for (Element libraryElement : JDOMUtil.getChildren(libraryTableElement, LIBRARY_TAG)) { result.addLibrary(loadLibrary(libraryElement, pathMapper)); } }
loadLibraries
162
JpsLibrary (Element libraryElement, @NotNull JpsPathMapper pathMapper) { return loadLibrary(libraryElement, libraryElement.getAttributeValue(NAME_ATTRIBUTE), pathMapper); }
loadLibrary
163
JpsLibrary (Element libraryElement, String name, @NotNull JpsPathMapper pathMapper) { String typeId = libraryElement.getAttributeValue(TYPE_ATTRIBUTE); final JpsLibraryPropertiesSerializer<?> loader = getLibraryPropertiesSerializer(typeId); JpsLibrary library = createLibrary(name, loader, libraryElement.getChild(PROPER...
loadLibrary
164
JpsOrderRootType (String rootTypeId) { for (JpsLibraryRootTypeSerializer serializer : PREDEFINED_ROOT_TYPES_SERIALIZERS) { if (serializer.getTypeId().equals(rootTypeId)) { return serializer.getType(); } } for (JpsModelSerializerExtension extension : JpsModelSerializerExtension.getExtensions()) { for (JpsLibraryRootType...
getRootType
165
String (JpsElementReference<? extends JpsCompositeElement> reference) { if (reference instanceof JpsModuleReference) { return MODULE_LEVEL; } JpsCompositeElement element = reference.resolve(); if (element instanceof JpsProject) { return PROJECT_LEVEL; } else if (element instanceof JpsGlobal) { return APPLICATION_LEVEL;...
getLevelId
166
boolean () { return myWriteIfEmpty; }
isWriteIfEmpty
167
String () { return myTypeId; }
getTypeId
168
JpsOrderRootType () { return myType; }
getType
169
int (JpsLibraryRootTypeSerializer o) { return myTypeId.compareTo(o.myTypeId); }
compareTo
170
void (@NotNull P properties, @NotNull Element element) { }
saveProperties
171
String () { return myComponentName; }
getComponentName
172
void (@NotNull P properties, @NotNull Element componentElement) { }
saveProperties
173
UnknownSourceRootTypeProperties<Element> (@NotNull Element sourceRootTag) { return new UnknownSourceRootTypeProperties<>(sourceRootTag.getParent() != null? sourceRootTag.clone() : sourceRootTag); }
loadProperties
174
void (@NotNull UnknownSourceRootTypeProperties<?> properties, @NotNull Element sourceRootTag) { Object data = properties.getPropertiesData(); if (data instanceof Element) { JDOMUtil.copyMissingContent((Element)data, sourceRootTag); } }
saveProperties
175
UnknownSourceRootPropertiesSerializer (String unknownTypeId) { return forType(UnknownSourceRootType.getInstance(unknownTypeId)); }
forType
176
UnknownSourceRootPropertiesSerializer (UnknownSourceRootType type) { return new UnknownSourceRootPropertiesSerializer(type); }
forType
177
void (JpsModule module, @Nullable Element rootModelComponent, @Nullable JpsSdkType<?> projectSdkType, @NotNull JpsPathMapper pathMapper) { if (rootModelComponent == null) return; for (Element contentElement : getChildren(rootModelComponent, CONTENT_TAG)) { final String url = getRequiredAttribute(contentElement, URL_ATT...
loadRootModel
178
String (Element element, String attribute) { final String url = element.getAttributeValue(attribute); if (url == null) { throw new JpsSerializationFormatException("'" + attribute + "' attribute is missing in '" + element.getName() + "' tag"); } return url; }
getRequiredAttribute
179
JpsModuleSourceRoot (Element sourceElement) { final String sourceUrl = getRequiredAttribute(sourceElement, URL_ATTRIBUTE); JpsModuleSourceRootPropertiesSerializer<?> serializer = getSourceRootPropertiesSerializer(sourceElement); return createSourceRoot(sourceUrl, serializer, sourceElement); }
loadSourceRoot
180
void (JpsDependencyElement dependency, Element orderEntry) { for (JpsModelSerializerExtension extension : JpsModelSerializerExtension.getExtensions()) { extension.loadModuleDependencyProperties(dependency, orderEntry); } }
loadModuleDependencyProperties
181
String () { return myClasspathId; }
getClasspathId
182
JpsDummyElement (@NotNull Element sourceRootTag) { return JpsElementFactory.getInstance().createDummyElement(); }
loadProperties
183
void (@NotNull JpsDummyElement properties, @NotNull Element sourceRootTag) { }
saveProperties
184
JpsDummyElement (List<ArtifactPropertiesState> stateList) { return JpsElementFactory.getInstance().createDummyElement(); }
loadProperties
185
String () { return myTypeId; }
getTypeId
186
void (E element, Element tag) { }
save
187
void (@NotNull JpsProject project, @Nullable Element componentElement) { JpsArtifactService service = JpsArtifactService.getInstance(); for (Element artifactElement : JDOMUtil.getChildren(componentElement, "artifact")) { ArtifactState state = XmlSerializer.deserialize(artifactElement, ArtifactState.class); JpsArtifactP...
loadArtifacts
188
JpsPackagingElement (Element element) { JpsPackagingElement packagingElement = createPackagingElement(element); if (packagingElement instanceof JpsCompositePackagingElement) { for (Element childElement : JDOMUtil.getChildren(element, ELEMENT_TAG)) { JpsPackagingElement child = loadPackagingElement(childElement); if (ch...
loadPackagingElement
189
JpsPackagingElement (Element element) { String typeId = element.getAttributeValue(ID_ATTRIBUTE); if (typeId == null) return null; JpsPackagingElementSerializer<?> serializer = findElementSerializer(typeId); if (serializer != null) { return serializer.load(element); } return null; }
createPackagingElement
190
JpsArtifactRootElement (Element element) { return JpsPackagingElementFactory.getInstance().createArtifactRoot(); }
load
191
JpsDirectoryPackagingElement (Element element) { return JpsPackagingElementFactory.getInstance().createDirectory(element.getAttributeValue("name")); }
load
192
JpsArchivePackagingElement (Element element) { return JpsPackagingElementFactory.getInstance().createArchive(element.getAttributeValue("name")); }
load
193
JpsFileCopyPackagingElement (Element element) { return JpsPackagingElementFactory.getInstance().createFileCopy(element.getAttributeValue("path"), element.getAttributeValue("output-file-name")); }
load
194
JpsDirectoryCopyPackagingElement (Element element) { return JpsPackagingElementFactory.getInstance().createDirectoryCopy(element.getAttributeValue("path")); }
load
195
JpsExtractedDirectoryPackagingElement (Element element) { return JpsPackagingElementFactory.getInstance().createExtractedDirectory(element.getAttributeValue("path"), element.getAttributeValue("path-in-jar")); }
load
196
JpsLibraryFilesPackagingElement (Element element) { String level = element.getAttributeValue("level"); String libraryName = element.getAttributeValue("name"); String moduleName = element.getAttributeValue("module-name"); JpsElementReference<? extends JpsCompositeElement> parentReference; if (moduleName != null) { paren...
load
197
JpsArtifactOutputPackagingElement (Element element) { return JpsPackagingElementFactory.getInstance() .createArtifactOutput(JpsArtifactService.getInstance().createReference(element.getAttributeValue("artifact-name"))); }
load
198
JpsElementChildRole<E> () { return myRole; }
getRole
199
String () { return myId; }
getId