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


Java ModuleOrderEntryImpl类代码示例

本文整理汇总了Java中com.intellij.openapi.roots.impl.ModuleOrderEntryImpl的典型用法代码示例。如果您正苦于以下问题:Java ModuleOrderEntryImpl类的具体用法?Java ModuleOrderEntryImpl怎么用?Java ModuleOrderEntryImpl使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ModuleOrderEntryImpl类属于com.intellij.openapi.roots.impl包,在下文中一共展示了ModuleOrderEntryImpl类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testChangingDependencyTypeToTestJar

import com.intellij.openapi.roots.impl.ModuleOrderEntryImpl; //导入依赖的package包/类
public void testChangingDependencyTypeToTestJar() throws Exception {
  configConfirmationForYesAnswer();
  VirtualFile m1 = createModulePom("m1", createPomXmlWithModuleDependency("jar"));

  VirtualFile m2 = createModulePom("m2", "<groupId>test</groupId>" +
                                         "<artifactId>m2</artifactId>" +
                                         "<version>1</version>");

  importProjects(m1, m2);
  assertModules("m1", "m2");
  ModuleOrderEntry dep = OrderEntryUtil.findModuleOrderEntry(ModuleRootManager.getInstance(getModule("m1")), getModule("m2"));
  assertNotNull(dep);
  assertFalse(((ModuleOrderEntryImpl)dep).isProductionOnTestDependency());

  createModulePom("m1", createPomXmlWithModuleDependency("test-jar"));
  importProjects(m1, m2);
  ModuleOrderEntry dep2 = OrderEntryUtil.findModuleOrderEntry(ModuleRootManager.getInstance(getModule("m1")), getModule("m2"));
  assertNotNull(dep2);
  assertTrue(((ModuleOrderEntryImpl)dep2).isProductionOnTestDependency());

}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:ReimportingTest.java

示例2: addModuleDependency

import com.intellij.openapi.roots.impl.ModuleOrderEntryImpl; //导入依赖的package包/类
public void addModuleDependency(@NotNull String moduleName,
                                @NotNull DependencyScope scope,
                                boolean testJar) {
  Module m = findModuleByName(moduleName);

  ModuleOrderEntry e;
  if (m != null) {
    e = myRootModel.addModuleOrderEntry(m);
  }
  else {
    AccessToken accessToken = ReadAction.start();
    try {
      e = myRootModel.addInvalidModuleEntry(moduleName);
    }
    finally {
      accessToken.finish();
    }
  }

  e.setScope(scope);
  if (testJar) {
    ((ModuleOrderEntryImpl)e).setProductionOnTestDependency(true);
  }

  if (myOrderEntriesBeforeJdk.contains(moduleName)) {
    moveLastOrderEntryBeforeJdk();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:MavenRootModelAdapter.java

示例3: loadOrderEntry

import com.intellij.openapi.roots.impl.ModuleOrderEntryImpl; //导入依赖的package包/类
@Nonnull
@Override
public ModuleOrderEntryImpl loadOrderEntry(@Nonnull Element element, @Nonnull ModuleRootLayer moduleRootLayer) throws InvalidDataException {
  String moduleName = element.getAttributeValue(MODULE_NAME_ATTR);
  if (moduleName == null) {
    throw new InvalidDataException();
  }
  DependencyScope dependencyScope = DependencyScope.readExternal(element);
  boolean exported = element.getAttributeValue(EXPORTED_ATTR) != null;
  boolean productionOnTestDependency = element.getAttributeValue(PRODUCTION_ON_TEST_ATTRIBUTE) != null;
  return new ModuleOrderEntryImpl(moduleName, (ModuleRootLayerImpl)moduleRootLayer, dependencyScope, exported, productionOnTestDependency);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:13,代码来源:ModuleOrderEntryType.java

示例4: storeOrderEntry

import com.intellij.openapi.roots.impl.ModuleOrderEntryImpl; //导入依赖的package包/类
@Override
public void storeOrderEntry(@Nonnull Element element, @Nonnull ModuleOrderEntryImpl orderEntry) {
  element.setAttribute(MODULE_NAME_ATTR, orderEntry.getModuleName());
  if (orderEntry.isExported()) {
    element.setAttribute(EXPORTED_ATTR, "");
  }
  orderEntry.getScope().writeExternal(element);
  if (orderEntry.isProductionOnTestDependency()) {
    element.setAttribute(PRODUCTION_ON_TEST_ATTRIBUTE, "");
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:12,代码来源:ModuleOrderEntryType.java

示例5: getCellAppearance

import com.intellij.openapi.roots.impl.ModuleOrderEntryImpl; //导入依赖的package包/类
@Nonnull
@Override
public CellAppearanceEx getCellAppearance(@Nonnull ModuleOrderEntryImpl orderEntry) {
  return SimpleTextCellAppearance.regular(orderEntry.getPresentableName(), AllIcons.Nodes.Module);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:6,代码来源:ModuleOrderEntryTypeEditor.java


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