本文整理汇总了Java中org.jetbrains.jps.model.java.JavaSourceRootProperties.isForGeneratedSources方法的典型用法代码示例。如果您正苦于以下问题:Java JavaSourceRootProperties.isForGeneratedSources方法的具体用法?Java JavaSourceRootProperties.isForGeneratedSources怎么用?Java JavaSourceRootProperties.isForGeneratedSources使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jetbrains.jps.model.java.JavaSourceRootProperties
的用法示例。
在下文中一共展示了JavaSourceRootProperties.isForGeneratedSources方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isEnabled
import org.jetbrains.jps.model.java.JavaSourceRootProperties; //导入方法依赖的package包/类
@Override
protected boolean isEnabled(@NotNull RootsSelection selection, @NotNull Module module) {
if (!isJavaModule(module)) return false;
if (selection.myHaveSelectedFilesUnderSourceRoots) {
return false;
}
if (!selection.mySelectedDirectories.isEmpty()) {
return true;
}
for (SourceFolder root : selection.mySelectedRoots) {
JavaSourceRootProperties properties = root.getJpsElement().getProperties(JavaModuleSourceRootTypes.SOURCES);
if (properties != null && !properties.isForGeneratedSources()) {
return true;
}
}
return false;
}
示例2: isEnabled
import org.jetbrains.jps.model.java.JavaSourceRootProperties; //导入方法依赖的package包/类
@Override
protected boolean isEnabled(@NotNull RootsSelection selection, @NotNull Module module) {
for (SourceFolder root : selection.mySelectedRoots) {
JavaSourceRootProperties properties = root.getJpsElement().getProperties(JavaModuleSourceRootTypes.SOURCES);
if (properties != null && properties.isForGeneratedSources()) {
return true;
}
}
return false;
}
示例3: assertGeneratedSources
import org.jetbrains.jps.model.java.JavaSourceRootProperties; //导入方法依赖的package包/类
private void assertGeneratedSources(String moduleName, JavaSourceRootType type, String... expectedSources) {
ContentEntry contentRoot = getContentRoot(moduleName);
List<ContentFolder> folders = new ArrayList<ContentFolder>();
for (SourceFolder folder : contentRoot.getSourceFolders(type)) {
JavaSourceRootProperties properties = folder.getJpsElement().getProperties(type);
assertNotNull(properties);
if (properties.isForGeneratedSources()) {
folders.add(folder);
}
}
doAssertContentFolders(contentRoot, folders, expectedSources);
}
示例4: getPropertiesString
import org.jetbrains.jps.model.java.JavaSourceRootProperties; //导入方法依赖的package包/类
@Nullable
@Override
public String getPropertiesString(@NotNull JavaSourceRootProperties properties) {
StringBuilder buffer = new StringBuilder();
if (properties.isForGeneratedSources()) {
buffer.append(" [generated]");
}
String packagePrefix = properties.getPackagePrefix();
if (!packagePrefix.isEmpty()) {
buffer.append(" (").append(packagePrefix).append(")");
}
return buffer.length() > 0 ? buffer.toString() : null;
}
示例5: assertGeneratedSources
import org.jetbrains.jps.model.java.JavaSourceRootProperties; //导入方法依赖的package包/类
protected void assertGeneratedSources(String moduleName, String... expectedSources) {
ContentEntry contentRoot = getContentRoot(moduleName);
List<ContentFolder> folders = new ArrayList<ContentFolder>();
for (SourceFolder folder : contentRoot.getSourceFolders(JavaSourceRootType.SOURCE)) {
JavaSourceRootProperties properties = folder.getJpsElement().getProperties(JavaSourceRootType.SOURCE);
assertNotNull(properties);
if (properties.isForGeneratedSources()) {
folders.add(folder);
}
}
doAssertContentFolders(contentRoot, folders, expectedSources);
}
示例6: isForGeneratedSources
import org.jetbrains.jps.model.java.JavaSourceRootProperties; //导入方法依赖的package包/类
private static boolean isForGeneratedSources(SourceFolder sourceFolder) {
JavaSourceRootProperties properties = sourceFolder.getJpsElement().getProperties(JavaModuleSourceRootTypes.SOURCES);
JavaResourceRootProperties resourceProperties = sourceFolder.getJpsElement().getProperties(JavaModuleSourceRootTypes.RESOURCES);
return properties != null && properties.isForGeneratedSources() || resourceProperties != null && resourceProperties.isForGeneratedSources();
}
示例7: getRootIcon
import org.jetbrains.jps.model.java.JavaSourceRootProperties; //导入方法依赖的package包/类
@NotNull
@Override
public Icon getRootIcon(@NotNull JavaSourceRootProperties properties) {
return properties.isForGeneratedSources() ? getGeneratedRootIcon() : getRootIcon();
}
示例8: isGenerated
import org.jetbrains.jps.model.java.JavaSourceRootProperties; //导入方法依赖的package包/类
private static boolean isGenerated(@NotNull SourceFolder folder) {
JavaSourceRootProperties properties = folder.getJpsElement().getProperties(JavaModuleSourceRootTypes.SOURCES);
return properties != null && properties.isForGeneratedSources();
}
示例9: isForGeneratedSources
import org.jetbrains.jps.model.java.JavaSourceRootProperties; //导入方法依赖的package包/类
private static boolean isForGeneratedSources(@NotNull SourceFolder sourceFolder) {
JavaSourceRootType rootType = (JavaSourceRootType) sourceFolder.getRootType();
JavaSourceRootProperties properties = sourceFolder.getJpsElement().getProperties(rootType);
return properties != null && properties.isForGeneratedSources();
}