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


Java DependencyScope.isForProductionRuntime方法代码示例

本文整理汇总了Java中com.intellij.openapi.roots.DependencyScope.isForProductionRuntime方法的典型用法代码示例。如果您正苦于以下问题:Java DependencyScope.isForProductionRuntime方法的具体用法?Java DependencyScope.isForProductionRuntime怎么用?Java DependencyScope.isForProductionRuntime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.openapi.roots.DependencyScope的用法示例。


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

示例1: isExported

import com.intellij.openapi.roots.DependencyScope; //导入方法依赖的package包/类
public static boolean isExported( Module ijModule, Module child )
{
  for( OrderEntry entry : ModuleRootManager.getInstance( ijModule ).getOrderEntries() )
  {
    if( entry instanceof ModuleOrderEntry )
    {
      final ModuleOrderEntry moduleEntry = (ModuleOrderEntry)entry;
      final DependencyScope scope = moduleEntry.getScope();
      if( !scope.isForProductionCompile() && !scope.isForProductionRuntime() )
      {
        continue;
      }
      final Module module = moduleEntry.getModule();
      if( module != null && module == child )
      {
        return moduleEntry.isExported();
      }
    }
  }
  return false;
}
 
开发者ID:manifold-systems,项目名称:manifold-ij,代码行数:22,代码来源:ManProject.java

示例2: getClasspath

import com.intellij.openapi.roots.DependencyScope; //导入方法依赖的package包/类
@NotNull
public String getClasspath(@NotNull MavenProject mavenProject,
                           @Nullable Element manifestConfiguration) {
  StringBuilder classpath = new StringBuilder();
  String classpathPrefix = getClasspathPrefix(manifestConfiguration);
  for (MavenArtifact mavenArtifact : mavenProject.getDependencies()) {
    final DependencyScope scope = MavenModuleImporter.selectScope(mavenArtifact.getScope());
    if (scope.isForProductionCompile() || scope.isForProductionRuntime()) {
      if (classpath.length() > 0) {
        classpath.append(" ");
      }
      classpath.append(classpathPrefix);
      String artifactFileName = mavenArtifact.getArtifactId() + "-" + mavenArtifact.getVersion() + "." + mavenArtifact.getExtension();
      classpath.append(doGetClasspathItem(mavenProject, mavenArtifact, artifactFileName));
    }
  }
  return classpath.toString();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:ManifestImporter.java

示例3: collectDependentModules

import com.intellij.openapi.roots.DependencyScope; //导入方法依赖的package包/类
private static void collectDependentModules(final Module module, Set<Module> modules, ArtifactEditorContext context) {
  if (!modules.add(module)) return;
  
  for (OrderEntry entry : context.getModulesProvider().getRootModel(module).getOrderEntries()) {
    if (entry instanceof ModuleOrderEntry) {
      final ModuleOrderEntry moduleEntry = (ModuleOrderEntry)entry;
      final Module dependency = moduleEntry.getModule();
      final DependencyScope scope = moduleEntry.getScope();
      if (dependency != null && scope.isForProductionRuntime()) {
        collectDependentModules(dependency, modules, context);
      }
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:ModuleSourceItemGroup.java


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