当前位置: 首页>>代码示例>>Java>>正文


Java JpsModelSerializerExtension.getExtensions方法代码示例

本文整理汇总了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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:JpsModuleRootModelSerializer.java

示例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));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:JpsArtifactSerializer.java

示例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();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:JpsLibraryTableSerializer.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:JpsLibraryTableSerializer.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:JpsModuleRootModelSerializer.java

示例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());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:JpsFacetSerializer.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:JpsFacetSerializer.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:JpsArtifactSerializer.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:JpsLibraryTableSerializer.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:JpsLibraryTableSerializer.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:JpsSdkTableSerializer.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:JpsSdkTableSerializer.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:JpsSdkTableSerializer.java

示例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);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:JpsModuleRootModelSerializer.java

示例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);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:JpsModuleRootModelSerializer.java


注:本文中的org.jetbrains.jps.model.serialization.JpsModelSerializerExtension.getExtensions方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。