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


Java JavaSourceRootType.SOURCE属性代码示例

本文整理汇总了Java中org.jetbrains.jps.model.java.JavaSourceRootType.SOURCE属性的典型用法代码示例。如果您正苦于以下问题:Java JavaSourceRootType.SOURCE属性的具体用法?Java JavaSourceRootType.SOURCE怎么用?Java JavaSourceRootType.SOURCE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.jetbrains.jps.model.java.JavaSourceRootType的用法示例。


在下文中一共展示了JavaSourceRootType.SOURCE属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: computeRootDescriptors

@NotNull
@Override
public List<ResourceRootDescriptor> computeRootDescriptors(JpsModel model, ModuleExcludeIndex index, IgnoredFileIndex ignoredFileIndex, BuildDataPaths dataPaths) {
  List<ResourceRootDescriptor> roots = new ArrayList<ResourceRootDescriptor>();
  JavaSourceRootType type = isTests() ? JavaSourceRootType.TEST_SOURCE : JavaSourceRootType.SOURCE;
  Iterable<ExcludedJavaSourceRootProvider> excludedRootProviders = JpsServiceManager.getInstance().getExtensions(ExcludedJavaSourceRootProvider.class);

  roots_loop:
  for (JpsTypedModuleSourceRoot<JpsSimpleElement<JavaSourceRootProperties>> sourceRoot : myModule.getSourceRoots(type)) {
    for (ExcludedJavaSourceRootProvider provider : excludedRootProviders) {
      if (provider.isExcludedFromCompilation(myModule, sourceRoot)) {
        continue roots_loop;
      }
    }
    final String packagePrefix = sourceRoot.getProperties().getData().getPackagePrefix();
    final File rootFile = sourceRoot.getFile();
    roots.add(new ResourceRootDescriptor(rootFile, this, false, packagePrefix, computeRootExcludes(rootFile, index)));
  }

  return roots;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:21,代码来源:ResourcesTarget.java

示例2: isDummy

private boolean isDummy(ModuleSourceSet set) {
  JavaSourceRootType type = set.getType() == ModuleSourceSet.Type.PRODUCTION ? JavaSourceRootType.SOURCE : JavaSourceRootType.TEST_SOURCE;
  ModuleRootModel rootModel = myContext.getModulesConfigurator().getRootModel(set.getModule());
  for (ContentEntry entry : rootModel.getContentEntries()) {
    if (!entry.getSourceFolders(type).isEmpty()) {
      return false;
    }
  }
  return true;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:GeneralProjectSettingsElement.java

示例3: getJavaProperties

@Nullable
private JavaSourceRootProperties getJavaProperties() {
  if (mySourceRoot.getRootType() == JavaSourceRootType.SOURCE) {
    return mySourceRoot.getProperties(JavaSourceRootType.SOURCE);
  }
  if (mySourceRoot.getRootType() == JavaSourceRootType.TEST_SOURCE) {
    return mySourceRoot.getProperties(JavaSourceRootType.TEST_SOURCE);
  }
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:JpsSourceFolder.java

示例4: createModuleConfigurable

@NotNull
@Override
protected Configurable createModuleConfigurable(Module module) {
  if (PlatformUtils.isPyCharmCommunity())
    return new PlatformContentEntriesConfigurable(module, JavaSourceRootType.SOURCE);
  return new PyContentEntriesModuleConfigurable(module);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:PythonContentEntriesConfigurable.java

示例5: computeRootDescriptors

/**
 * Computes the root descriptors for the build target.
 *
 * @param jpsModel           The JPS model.
 * @param moduleExcludeIndex The module exclude index.
 * @param ignoredFileIndex   The ignored file index.
 * @param buildDataPaths     The build data paths.
 * @return A list of source root descriptors.
 */
@Override
public final List<SpoofaxSourceRootDescriptor> computeRootDescriptors(
        final JpsModel jpsModel,
        final ModuleExcludeIndex moduleExcludeIndex,
        final IgnoredFileIndex ignoredFileIndex,
        final BuildDataPaths buildDataPaths) {
    // Default implementation.
    final List<SpoofaxSourceRootDescriptor> result = new ArrayList<>();
    final JavaSourceRootType type = isTests() ? JavaSourceRootType.TEST_SOURCE : JavaSourceRootType.SOURCE;
    for (final JpsTypedModuleSourceRoot<JavaSourceRootProperties> root : super.myModule.getSourceRoots(type)) {
        result.add(new SpoofaxSourceRootDescriptor(root.getFile(), this));
    }
    return result;
}
 
开发者ID:metaborg,项目名称:spoofax-intellij,代码行数:23,代码来源:SpoofaxTarget.java

示例6: computeRootDescriptors

@NotNull
@Override
public List<HaskellSourceRootDescriptor> computeRootDescriptors(JpsModel jpsModel, ModuleExcludeIndex moduleExcludeIndex, IgnoredFileIndex ignoredFileIndex, BuildDataPaths buildDataPaths) {
    List<HaskellSourceRootDescriptor> result = new ArrayList<HaskellSourceRootDescriptor>();
    JavaSourceRootType type = isTests() ? JavaSourceRootType.TEST_SOURCE : JavaSourceRootType.SOURCE;
    for (JpsTypedModuleSourceRoot<JavaSourceRootProperties> root : myModule.getSourceRoots(type)) {
        result.add(new HaskellSourceRootDescriptor(root.getFile(), this));
    }
    return result;
}
 
开发者ID:carymrobbins,项目名称:intellij-haskforce,代码行数:10,代码来源:HaskellTarget.java

示例7: getJavaProperties

@Nullable
private JpsSimpleElement<JavaSourceRootProperties> getJavaProperties() {
  if (mySourceRoot.getRootType() == JavaSourceRootType.SOURCE) {
    return mySourceRoot.getProperties(JavaSourceRootType.SOURCE);
  }
  if (mySourceRoot.getRootType() == JavaSourceRootType.TEST_SOURCE) {
    return mySourceRoot.getProperties(JavaSourceRootType.TEST_SOURCE);
  }
  return null;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:10,代码来源:JpsSourceFolder.java

示例8: addSourceFolder

private SourceFolder addSourceFolder(final String url, boolean isTestSource, String packagePrefix) {
  final JavaSourceRootType rootType = isTestSource ? JavaSourceRootType.TEST_SOURCE : JavaSourceRootType.SOURCE;
  final JpsModuleSourceRoot sourceRoot = myModule.addSourceRoot(url, rootType, JpsElementFactory.getInstance()
    .createSimpleElement(new JavaSourceRootProperties(packagePrefix)));
  final JpsSourceFolder sourceFolder = new JpsSourceFolder(sourceRoot, this);
  mySourceFolders.add(sourceFolder);
  return sourceFolder;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:8,代码来源:JpsContentEntry.java

示例9: createEditors

public ModuleConfigurationEditor[] createEditors(final ModuleConfigurationState state) {
  final Module module = state.getRootModel().getModule();
  if (ModuleType.get(module) != HaxeModuleType.getInstance()) {
    return ModuleConfigurationEditor.EMPTY;
  }
  return new ModuleConfigurationEditor[]{
    new CommonContentEntriesEditor(module.getName(), state, JavaSourceRootType.SOURCE, JavaSourceRootType.TEST_SOURCE),
    new ClasspathEditor(state),
    new HaxeModuleConfigurationEditor(state)
  };
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:11,代码来源:HaxeModuleConfigurationEditorProvider.java

示例10: JavaContentEntriesEditor

public JavaContentEntriesEditor(String moduleName, ModuleConfigurationState state) {
  super(moduleName, state, JavaSourceRootType.SOURCE, JavaSourceRootType.TEST_SOURCE, JavaResourceRootType.RESOURCE, JavaResourceRootType.TEST_RESOURCE);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:3,代码来源:JavaContentEntriesEditor.java

示例11: addSourceFolder

private SourceFolder addSourceFolder(final String url, boolean isTestSource, String packagePrefix) {
  final JavaSourceRootType rootType = isTestSource ? JavaSourceRootType.TEST_SOURCE : JavaSourceRootType.SOURCE;
  JavaSourceRootProperties properties = JpsJavaExtensionService.getInstance().createSourceRootProperties(packagePrefix);
  return addSourceFolder(url, rootType, properties);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:JpsContentEntry.java

示例12: addSourceFolder

@NotNull
@Override
public SourceFolder addSourceFolder(@NotNull VirtualFile file, boolean isTestSource, @NotNull String packagePrefix) {
  JavaSourceRootType type = isTestSource ? JavaSourceRootType.TEST_SOURCE : JavaSourceRootType.SOURCE;
  return addSourceFolder(file, type);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:ContentEntryImpl.java

示例13: JavaModuleSourceRootEditHandler

public JavaModuleSourceRootEditHandler() {
  super(JavaSourceRootType.SOURCE);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:3,代码来源:JavaModuleSourceRootEditHandler.java

示例14: MarkJavaSourceRootAction

public MarkJavaSourceRootAction() {
  super(JavaSourceRootType.SOURCE);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:3,代码来源:MarkJavaSourceRootAction.java

示例15: isSupportedRootType

@Override
public boolean isSupportedRootType(JpsModuleSourceRootType type) {
  return type == JavaSourceRootType.SOURCE;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:PlatformPythonModuleType.java


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