本文整理汇总了Java中org.jetbrains.jps.model.serialization.JpsModelSerializerExtension.getExtensions方法的典型用法代码示例。如果您正苦于以下问题:Java JpsModelSerializerExtension.getExtensions方法的具体用法?Java JpsModelSerializerExtension.getExtensions怎么用?Java JpsModelSerializerExtension.getExtensions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jetbrains.jps.model.serialization.JpsModelSerializerExtension
的用法示例。
在下文中一共展示了JpsModelSerializerExtension.getExtensions方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getSourceRootPropertiesSerializer
import org.jetbrains.jps.model.serialization.JpsModelSerializerExtension; //导入方法依赖的package包/类
@NotNull
private static JpsModuleSourceRootPropertiesSerializer<?> getSourceRootPropertiesSerializer(@NotNull Element sourceElement) {
String typeAttribute = sourceElement.getAttributeValue(SOURCE_ROOT_TYPE_ATTRIBUTE);
if (typeAttribute == null) {
typeAttribute = Boolean.parseBoolean(sourceElement.getAttributeValue(IS_TEST_SOURCE_ATTRIBUTE)) ? JAVA_TEST_ROOT_TYPE_ID : JAVA_SOURCE_ROOT_TYPE_ID;
}
for (JpsModelSerializerExtension extension : JpsModelSerializerExtension.getExtensions()) {
for (JpsModuleSourceRootPropertiesSerializer<?> serializer : extension.getModuleSourceRootPropertiesSerializers()) {
if (serializer.getTypeId().equals(typeAttribute)) {
return serializer;
}
}
}
LOG.warn("Unknown module source root type " + typeAttribute);
return JpsJavaModelSerializerExtension.JAVA_SOURCE_ROOT_PROPERTIES_SERIALIZER;
}
示例2: doSaveArtifact
import org.jetbrains.jps.model.serialization.JpsModelSerializerExtension; //导入方法依赖的package包/类
private static <P extends JpsElement> void doSaveArtifact(JpsArtifact artifact, Element componentElement, ArtifactState state,
JpsArtifactPropertiesSerializer<P> serializer) {
state.setArtifactType(serializer.getTypeId());
state.setRootElement(savePackagingElement(artifact.getRootElement()));
List<ArtifactPropertiesState> propertiesList = state.getPropertiesList();
//noinspection unchecked
serializer.saveProperties((P)artifact.getProperties(), propertiesList);
for (JpsModelSerializerExtension serializerExtension : JpsModelSerializerExtension.getExtensions()) {
for (JpsArtifactExtensionSerializer<?> extensionSerializer : serializerExtension.getArtifactExtensionSerializers()) {
JpsElement extension = artifact.getContainer().getChild(extensionSerializer.getRole());
if (extension != null) {
ArtifactPropertiesState propertiesState = new ArtifactPropertiesState();
propertiesState.setId(extensionSerializer.getId());
propertiesState.setOptions(saveExtension(extensionSerializer, extension));
propertiesList.add(propertiesState);
}
}
}
componentElement.addContent(XmlSerializer.serialize(state, SERIALIZATION_FILTERS));
}
示例3: createLibraryTableReference
import org.jetbrains.jps.model.serialization.JpsModelSerializerExtension; //导入方法依赖的package包/类
public static JpsElementReference<? extends JpsCompositeElement> createLibraryTableReference(String level) {
JpsElementFactory elementFactory = JpsElementFactory.getInstance();
if (level.equals(PROJECT_LEVEL)) {
return elementFactory.createProjectReference();
}
if (level.equals(APPLICATION_LEVEL)) {
return elementFactory.createGlobalReference();
}
for (JpsModelSerializerExtension extension : JpsModelSerializerExtension.getExtensions()) {
final JpsElementReference<? extends JpsCompositeElement> reference = extension.createLibraryTableReference(level);
if (reference != null) {
return reference;
}
}
throw new UnsupportedOperationException();
}
示例4: getLevelId
import org.jetbrains.jps.model.serialization.JpsModelSerializerExtension; //导入方法依赖的package包/类
public static String getLevelId(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;
}
for (JpsModelSerializerExtension extension : JpsModelSerializerExtension.getExtensions()) {
String levelId = extension.getLibraryTableLevelId(reference);
if (levelId != null) {
return levelId;
}
}
return null;
}
示例5: getSerializer
import org.jetbrains.jps.model.serialization.JpsModelSerializerExtension; //导入方法依赖的package包/类
@Nullable
private static <P extends JpsElement> JpsModuleSourceRootPropertiesSerializer<P> getSerializer(JpsModuleSourceRootType<P> type) {
for (JpsModelSerializerExtension extension : JpsModelSerializerExtension.getExtensions()) {
for (JpsModuleSourceRootPropertiesSerializer<?> serializer : extension.getModuleSourceRootPropertiesSerializers()) {
if (serializer.getType().equals(type)) {
return (JpsModuleSourceRootPropertiesSerializer<P>)serializer;
}
}
}
return null;
}
示例6: saveFacets
import org.jetbrains.jps.model.serialization.JpsModelSerializerExtension; //导入方法依赖的package包/类
public static void saveFacets(JpsModule module, @NotNull Element facetManagerElement) {
FacetManagerState managerState = new FacetManagerState();
for (JpsModelSerializerExtension extension : JpsModelSerializerExtension.getExtensions()) {
for (JpsFacetConfigurationSerializer<?> serializer : extension.getFacetConfigurationSerializers()) {
if (serializer.hasExtension(module)) {
serializer.saveExtension(module, managerState.getFacets());
}
}
}
XmlSerializer.serializeInto(managerState, facetManagerElement, new SkipDefaultValuesSerializationFilters());
}
示例7: getModuleExtensionSerializer
import org.jetbrains.jps.model.serialization.JpsModelSerializerExtension; //导入方法依赖的package包/类
@Nullable
private static JpsFacetConfigurationSerializer<?> getModuleExtensionSerializer(@NotNull String typeId) {
for (JpsModelSerializerExtension extension : JpsModelSerializerExtension.getExtensions()) {
for (JpsFacetConfigurationSerializer<?> serializer : extension.getFacetConfigurationSerializers()) {
if (serializer.getFacetTypeId().equals(typeId)) {
return serializer;
}
}
}
return null;
}
示例8: getExtensionSerializer
import org.jetbrains.jps.model.serialization.JpsModelSerializerExtension; //导入方法依赖的package包/类
@Nullable
private static JpsArtifactExtensionSerializer<?> getExtensionSerializer(String id) {
for (JpsModelSerializerExtension extension : JpsModelSerializerExtension.getExtensions()) {
for (JpsArtifactExtensionSerializer<?> serializer : extension.getArtifactExtensionSerializers()) {
if (serializer.getId().equals(id)) {
return serializer;
}
}
}
return null;
}
示例9: getSortedSerializers
import org.jetbrains.jps.model.serialization.JpsModelSerializerExtension; //导入方法依赖的package包/类
private static Collection<JpsLibraryRootTypeSerializer> getSortedSerializers() {
List<JpsLibraryRootTypeSerializer> serializers = new ArrayList<JpsLibraryRootTypeSerializer>();
Collections.addAll(serializers, PREDEFINED_ROOT_TYPES_SERIALIZERS);
for (JpsModelSerializerExtension extension : JpsModelSerializerExtension.getExtensions()) {
serializers.addAll(extension.getLibraryRootTypeSerializers());
}
Collections.sort(serializers);
return serializers;
}
示例10: getLibraryPropertiesSerializer
import org.jetbrains.jps.model.serialization.JpsModelSerializerExtension; //导入方法依赖的package包/类
private static JpsLibraryPropertiesSerializer<?> getLibraryPropertiesSerializer(@Nullable String typeId) {
if (typeId != null) {
for (JpsModelSerializerExtension extension : JpsModelSerializerExtension.getExtensions()) {
for (JpsLibraryPropertiesSerializer<?> loader : extension.getLibraryPropertiesSerializers()) {
if (loader.getTypeId().equals(typeId)) {
return loader;
}
}
}
}
return JAVA_LIBRARY_PROPERTIES_SERIALIZER;
}
示例11: getRootTypeSerializers
import org.jetbrains.jps.model.serialization.JpsModelSerializerExtension; //导入方法依赖的package包/类
private static List<JpsLibraryRootTypeSerializer> getRootTypeSerializers() {
List<JpsLibraryRootTypeSerializer> serializers = new ArrayList<JpsLibraryRootTypeSerializer>(Arrays.asList(PREDEFINED_ROOT_TYPE_SERIALIZERS));
for (JpsModelSerializerExtension extension : JpsModelSerializerExtension.getExtensions()) {
serializers.addAll(extension.getSdkRootTypeSerializers());
}
Collections.sort(serializers);
return serializers;
}
示例12: getSdkPropertiesSerializer
import org.jetbrains.jps.model.serialization.JpsModelSerializerExtension; //导入方法依赖的package包/类
public static JpsSdkPropertiesSerializer<?> getSdkPropertiesSerializer(@Nullable String typeId) {
for (JpsModelSerializerExtension extension : JpsModelSerializerExtension.getExtensions()) {
for (JpsSdkPropertiesSerializer<?> loader : extension.getSdkPropertiesSerializers()) {
if (loader.getTypeId().equals(typeId)) {
return loader;
}
}
}
return JPS_JAVA_SDK_PROPERTIES_LOADER;
}
示例13: getLoader
import org.jetbrains.jps.model.serialization.JpsModelSerializerExtension; //导入方法依赖的package包/类
public static JpsSdkPropertiesSerializer<?> getLoader(JpsSdkType<?> type) {
for (JpsModelSerializerExtension extension : JpsModelSerializerExtension.getExtensions()) {
for (JpsSdkPropertiesSerializer<?> loader : extension.getSdkPropertiesSerializers()) {
if (loader.getType().equals(type)) {
return loader;
}
}
}
return JPS_JAVA_SDK_PROPERTIES_LOADER;
}
示例14: loadModuleDependencyProperties
import org.jetbrains.jps.model.serialization.JpsModelSerializerExtension; //导入方法依赖的package包/类
private static void loadModuleDependencyProperties(JpsDependencyElement dependency, Element orderEntry) {
for (JpsModelSerializerExtension extension : JpsModelSerializerExtension.getExtensions()) {
extension.loadModuleDependencyProperties(dependency, orderEntry);
}
}
示例15: saveModuleDependencyProperties
import org.jetbrains.jps.model.serialization.JpsModelSerializerExtension; //导入方法依赖的package包/类
private static void saveModuleDependencyProperties(JpsDependencyElement dependency, Element orderEntry) {
for (JpsModelSerializerExtension extension : JpsModelSerializerExtension.getExtensions()) {
extension.saveModuleDependencyProperties(dependency, orderEntry);
}
}