本文整理汇总了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;
}
示例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;
}
示例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;
}
示例4: createModuleConfigurable
@NotNull
@Override
protected Configurable createModuleConfigurable(Module module) {
if (PlatformUtils.isPyCharmCommunity())
return new PlatformContentEntriesConfigurable(module, JavaSourceRootType.SOURCE);
return new PyContentEntriesModuleConfigurable(module);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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)
};
}
示例10: JavaContentEntriesEditor
public JavaContentEntriesEditor(String moduleName, ModuleConfigurationState state) {
super(moduleName, state, JavaSourceRootType.SOURCE, JavaSourceRootType.TEST_SOURCE, JavaResourceRootType.RESOURCE, JavaResourceRootType.TEST_RESOURCE);
}
示例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);
}
示例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);
}
示例13: JavaModuleSourceRootEditHandler
public JavaModuleSourceRootEditHandler() {
super(JavaSourceRootType.SOURCE);
}
示例14: MarkJavaSourceRootAction
public MarkJavaSourceRootAction() {
super(JavaSourceRootType.SOURCE);
}
示例15: isSupportedRootType
@Override
public boolean isSupportedRootType(JpsModuleSourceRootType type) {
return type == JavaSourceRootType.SOURCE;
}