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


Java JavaSourceRootProperties.isForGeneratedSources方法代码示例

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

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

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

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

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

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

示例7: getRootIcon

import org.jetbrains.jps.model.java.JavaSourceRootProperties; //导入方法依赖的package包/类
@NotNull
@Override
public Icon getRootIcon(@NotNull JavaSourceRootProperties properties) {
  return properties.isForGeneratedSources() ? getGeneratedRootIcon() : getRootIcon();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:JavaSourceRootEditHandlerBase.java

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

示例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();
}
 
开发者ID:mistraltechnologies,项目名称:smogen,代码行数:7,代码来源:SourceRootUtils.java


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