本文整理汇总了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;
}
示例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();
}
示例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);
}
}
}
}