• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ModuleRootLayerImpl类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: addAsLibrary

import consulo.roots.impl.ModuleRootLayerImpl; //导入依赖的package包/类
private static void addAsLibrary(VirtualFile virtualFile, ModuleRootLayerImpl layer)
{
	if(virtualFile.getFileType() == DotNetModuleFileType.INSTANCE)
	{
		VirtualFile archiveRootForLocalFile = ArchiveVfsUtil.getArchiveRootForLocalFile(virtualFile);
		if(archiveRootForLocalFile != null)
		{
			Library library = layer.getModuleLibraryTable().createLibrary();
			Library.ModifiableModel modifiableModel = library.getModifiableModel();
			modifiableModel.addRoot(archiveRootForLocalFile, BinariesOrderRootType.getInstance());
			VirtualFile docFile = virtualFile.getParent().findChild(virtualFile.getNameWithoutExtension() + ".xml");
			if(docFile != null)
			{
				modifiableModel.addRoot(docFile, DocumentationOrderRootType.getInstance());
			}
			modifiableModel.commit();

			LibraryOrderEntry libraryOrderEntry = layer.findLibraryOrderEntry(library);
			assert libraryOrderEntry != null;
			libraryOrderEntry.setExported(true);
		}
	}
}
 
开发者ID:consulo,项目名称:consulo-unity3d,代码行数:24,代码来源:Unity3dProjectImportUtil.java


示例2: createOrderEntries

import consulo.roots.impl.ModuleRootLayerImpl; //导入依赖的package包/类
@Override
public List<OrderEntry> createOrderEntries(@NotNull ModifiableModuleRootLayer layer, DialogWrapper dialogWrapper)
{
	Object[] selectedValues = myLibraryList.getSelectedValues();
	List<OrderEntry> orderEntries = new ArrayList<OrderEntry>(selectedValues.length);
	for(Object selectedValue : selectedValues)
	{
		Map.Entry<String, String> entry = (Map.Entry<String, String>) selectedValue;

		DotNetLibraryOrderEntryImpl orderEntry = new DotNetLibraryOrderEntryImpl((ModuleRootLayerImpl) layer, entry.getKey());

		layer.addOrderEntry(orderEntry);

		orderEntries.add(orderEntry);
	}
	return orderEntries;
}
 
开发者ID:consulo,项目名称:consulo-dotnet,代码行数:18,代码来源:DotNetLibraryModuleDependencyTabContext.java


示例3: loadOrderEntry

import consulo.roots.impl.ModuleRootLayerImpl; //导入依赖的package包/类
@Nullable
public static OrderEntry loadOrderEntry(@Nonnull Element element, @Nonnull ModuleRootLayer moduleRootLayer) {
  String type = element.getAttributeValue(ORDER_ENTRY_TYPE_ATTR);
  if(type == null) {
    return null;
  }
  OrderEntryType orderEntryType = getProvidersAsMap().get(type);
  if(orderEntryType == null) {
    return new UnknownOrderEntryImpl(new UnknownOrderEntryType(type, element), (ModuleRootLayerImpl)moduleRootLayer);
  }

  try {
    return orderEntryType.loadOrderEntry(element, moduleRootLayer);
  }
  catch (InvalidDataException e) {
    return new UnknownOrderEntryImpl(new UnknownOrderEntryType(type, element), (ModuleRootLayerImpl)moduleRootLayer);
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:19,代码来源:OrderEntrySerializationUtil.java


示例4: LibraryImpl

import consulo.roots.impl.ModuleRootLayerImpl; //导入依赖的package包/类
private LibraryImpl(@Nonnull LibraryImpl from, LibraryImpl newSource, ModuleRootLayerImpl rootModel) {
  this(from.myLibraryTable, rootModel, newSource, from.myName, from.myKind);
  from.checkDisposed();

  if (from.myKind != null && from.myProperties != null) {
    myProperties = myKind.createDefaultProperties();
    //noinspection unchecked
    myProperties.loadState(from.myProperties.getState());
  }
  for (OrderRootType rootType : OrderRootType.getAllTypes()) {
    final VirtualFilePointerContainer thisContainer = myRoots.get(rootType);
    final VirtualFilePointerContainer thatContainer = from.myRoots.get(rootType);
    thisContainer.addAll(thatContainer);
  }
  if (from.myExcludedRoots != null) {
    myExcludedRoots = from.myExcludedRoots.clone(myPointersDisposable);
  }
  myJarDirectories.copyFrom(from.myJarDirectories);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:20,代码来源:LibraryImpl.java


示例5: loadState

import consulo.roots.impl.ModuleRootLayerImpl; //导入依赖的package包/类
@RequiredReadAction
private void loadState(Element element, @Nullable ProgressIndicator progressIndicator) {
  String currentLayer = element.getAttributeValue("current-layer");
  if (currentLayer != null) {
    setCurrentLayerSafe(currentLayer);

    for (Element moduleLayerElement : element.getChildren("module-layer")) {
      String name = moduleLayerElement.getAttributeValue("name");

      ModuleRootLayerImpl moduleRootLayer = new ModuleRootLayerImpl(null, this);
      moduleRootLayer.loadState(moduleLayerElement, progressIndicator);

      ModuleRootLayerImpl layer = myLayers.put(name, moduleRootLayer);
      if (layer != null) {
        // dispose old layout
        Disposer.dispose(layer);
      }
    }
  }

  // old format - create default profile and load it
  if (myLayers.isEmpty()) {
    initDefaultLayer(element);
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:26,代码来源:RootModelImpl.java


示例6: addLayer

import consulo.roots.impl.ModuleRootLayerImpl; //导入依赖的package包/类
@Nonnull
@Override
public ModifiableModuleRootLayer addLayer(@Nonnull String name, @Nullable String nameForCopy, boolean activate) {
  ModuleRootLayerImpl moduleRootLayer = myLayers.get(name);
  if (moduleRootLayer != null) {
    return moduleRootLayer;
  }

  ModuleRootLayerImpl layer = new ModuleRootLayerImpl(null, this);

  if (nameForCopy != null) {
    ModuleRootLayerImpl original = myLayers.get(nameForCopy);
    if (original != null) {
      original.copy(layer, false);
    }
  }
  myLayers.put(name, layer);
  if (activate) {
    setCurrentLayerSafe(name);
  }
  return layer;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:23,代码来源:RootModelImpl.java


示例7: removeLayer

import consulo.roots.impl.ModuleRootLayerImpl; //导入依赖的package包/类
@Override
public boolean removeLayer(@Nonnull String name, boolean initDefault) {
  assertWritable();
  ModuleRootLayerImpl removedLayer = myLayers.remove(name);
  if (removedLayer != null) {
    Disposer.dispose(removedLayer);

    if (initDefault && myLayers.isEmpty()) {
      initDefaultLayer(null);
    }

    if (Comparing.equal(myCurrentLayerName, name)) {
      setCurrentLayerSafe(myLayers.isEmpty() ? null : ContainerUtil.getFirstItem(myLayers.keySet()));
    }
  }
  return removedLayer != null;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:18,代码来源:RootModelImpl.java


示例8: removeAllLayers

import consulo.roots.impl.ModuleRootLayerImpl; //导入依赖的package包/类
@Override
public void removeAllLayers(boolean initDefault) {
  assertWritable();

  for (ModuleRootLayerImpl layer : myLayers.values()) {
    Disposer.dispose(layer);
  }
  myLayers.clear();

  if (initDefault) {
    initDefaultLayer(null);
  }
  else {
    setCurrentLayerSafe(null);
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:17,代码来源:RootModelImpl.java


示例9: loadOrderEntry

import consulo.roots.impl.ModuleRootLayerImpl; //导入依赖的package包/类
@NotNull
@Override
public DotNetLibraryOrderEntryImpl loadOrderEntry(@NotNull Element element, @NotNull ModuleRootLayer moduleRootLayer) throws InvalidDataException
{
	String name = element.getAttributeValue("name");
	if(name.endsWith(".dll"))
	{
		int lastIndex = name.lastIndexOf(".dll");
		name = name.substring(0, lastIndex);
	}
	return new DotNetLibraryOrderEntryImpl((ModuleRootLayerImpl) moduleRootLayer, name);
}
 
开发者ID:consulo,项目名称:consulo-dotnet,代码行数:13,代码来源:DotNetLibraryOrderEntryType.java


示例10: getCellAppearance

import consulo.roots.impl.ModuleRootLayerImpl; //导入依赖的package包/类
@NotNull
@Override
public CellAppearanceEx getCellAppearance(@NotNull DotNetLibraryOrderEntryImpl dotNetLibraryOrderEntry)
{
	ModuleRootLayerImpl moduleRootLayer = dotNetLibraryOrderEntry.getModuleRootLayer();

	DotNetSimpleModuleExtension extension = moduleRootLayer.getExtension(DotNetSimpleModuleExtension.class);

	ModuleExtensionProviderEP providerEP = extension == null ? null : ModuleExtensionProviders.findProvider(extension.getId());

	return SimpleTextCellAppearance.synthetic(dotNetLibraryOrderEntry.getPresentableName(), providerEP == null ? AllIcons.Toolbar.Unknown :
			providerEP.getIcon());
}
 
开发者ID:consulo,项目名称:consulo-dotnet,代码行数:14,代码来源:DotNetLibraryOrderEntryTypeEditor.java


示例11: DotNetLibraryOrderEntryImpl

import consulo.roots.impl.ModuleRootLayerImpl; //导入依赖的package包/类
public DotNetLibraryOrderEntryImpl(@NotNull ModuleRootLayerImpl rootLayer, String name, boolean init)
{
	super(DotNetLibraryOrderEntryType.getInstance(), rootLayer, ProjectRootManagerImpl.getInstanceImpl(rootLayer.getProject()));
	myName = name;
	if(init)
	{
		init();

		myProjectRootManagerImpl.addOrderWithTracking(this);
	}
}
 
开发者ID:consulo,项目名称:consulo-dotnet,代码行数:12,代码来源:DotNetLibraryOrderEntryImpl.java


示例12: loadOrderEntry

import consulo.roots.impl.ModuleRootLayerImpl; //导入依赖的package包/类
@Nonnull
@Override
public ModuleExtensionWithSdkOrderEntryImpl loadOrderEntry(@Nonnull Element element, @Nonnull ModuleRootLayer moduleRootLayer) throws InvalidDataException {
  String moduleExtensionId = element.getAttributeValue(EXTENSION_ID_ATTRIBUTE);
  if (moduleExtensionId == null) {
    throw new InvalidDataException();
  }
  return new ModuleExtensionWithSdkOrderEntryImpl(moduleExtensionId, (ModuleRootLayerImpl)moduleRootLayer, false);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:10,代码来源:ModuleExtensionWithSdkOrderEntryType.java


示例13: loadOrderEntry

import consulo.roots.impl.ModuleRootLayerImpl; //导入依赖的package包/类
@Nonnull
@Override
public LibraryOrderEntryImpl loadOrderEntry(@Nonnull Element element, @Nonnull ModuleRootLayer moduleRootLayer) throws InvalidDataException {
  String name = element.getAttributeValue(NAME_ATTR);
  if (name == null) {
    throw new InvalidDataException();
  }

  String level = element.getAttributeValue(LEVEL_ATTR, LibraryTablesRegistrar.PROJECT_LEVEL);
  DependencyScope dependencyScope = DependencyScope.readExternal(element);
  boolean exported = element.getAttributeValue(EXPORTED_ATTR) != null;
  return new LibraryOrderEntryImpl(name, level, (ModuleRootLayerImpl)moduleRootLayer, dependencyScope, exported, false);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:14,代码来源:LibraryOrderEntryType.java


示例14: loadOrderEntry

import consulo.roots.impl.ModuleRootLayerImpl; //导入依赖的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


示例15: loadOrderEntry

import consulo.roots.impl.ModuleRootLayerImpl; //导入依赖的package包/类
@Nonnull
@Override
public ModuleLibraryOrderEntryImpl loadOrderEntry(@Nonnull Element element, @Nonnull ModuleRootLayer moduleRootLayer) throws InvalidDataException {
  boolean exported = element.getAttributeValue(EXPORTED_ATTR) != null;
  DependencyScope scope = DependencyScope.readExternal(element);
  Library library = LibraryTableImplUtil.loadLibrary(element, (ModuleRootLayerImpl)moduleRootLayer);
  return new ModuleLibraryOrderEntryImpl(library, (ModuleRootLayerImpl)moduleRootLayer, exported, scope, false);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:9,代码来源:ModuleLibraryOrderEntryType.java


示例16: ModuleExtensionWithSdkOrderEntryImpl

import consulo.roots.impl.ModuleRootLayerImpl; //导入依赖的package包/类
public ModuleExtensionWithSdkOrderEntryImpl(@Nonnull String moduleExtensionId, @Nonnull ModuleRootLayerImpl rootModel, boolean init) {
  super(ModuleExtensionWithSdkOrderEntryType.getInstance(), rootModel, ProjectRootManagerImpl.getInstanceImpl(rootModel.getProject()));
  myModuleExtensionId = moduleExtensionId;
  if (init) {
    init();

    myProjectRootManagerImpl.addOrderWithTracking(this);
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:10,代码来源:ModuleExtensionWithSdkOrderEntryImpl.java


示例17: ContentEntryImpl

import consulo.roots.impl.ModuleRootLayerImpl; //导入依赖的package包/类
public ContentEntryImpl(@Nonnull Element e, @Nonnull ModuleRootLayerImpl m) {
  this(getUrlFrom(e), m);

  for (Element child : e.getChildren(ContentFolderImpl.ELEMENT_NAME)) {
    myContentFolders.add(new ContentFolderImpl(child, this));
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:8,代码来源:ContentEntryImpl.java


示例18: cloneEntry

import consulo.roots.impl.ModuleRootLayerImpl; //导入依赖的package包/类
@Override
@Nonnull
public ContentEntry cloneEntry(@Nonnull ModuleRootLayerImpl rootModel) {
  assert !isDisposed();

  ContentEntryImpl cloned = new ContentEntryImpl(myRoot.getUrl(), rootModel);
  for (ContentFolder contentFolder : myContentFolders) {
    if (contentFolder instanceof ClonableContentFolder) {
      ContentFolderImpl folder = (ContentFolderImpl)((ClonableContentFolder)contentFolder).cloneFolder(cloned);
      cloned.addFolder(folder);
    }
  }

  return cloned;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:16,代码来源:ContentEntryImpl.java


示例19: cloneLibrary

import consulo.roots.impl.ModuleRootLayerImpl; //导入依赖的package包/类
@Nonnull
public Library cloneLibrary(ModuleRootLayerImpl moduleRootLayer) {
  LOG.assertTrue(myLibraryTable == null);
  final LibraryImpl clone = new LibraryImpl(this, null, moduleRootLayer);
  clone.myRootsWatcher.updateWatchedRoots();
  return clone;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:8,代码来源:LibraryImpl.java


示例20: RootModelImpl

import consulo.roots.impl.ModuleRootLayerImpl; //导入依赖的package包/类
@RequiredReadAction
RootModelImpl(@Nonnull RootModelImpl rootModel, @Nonnull ModuleRootManagerImpl moduleRootManager, @Nonnull RootConfigurationAccessor rootConfigurationAccessor) {
  myModuleRootManager = moduleRootManager;
  myWritable = true;
  myConfigurationAccessor = rootConfigurationAccessor;

  myLayers.clear();
  for (Map.Entry<String, ModuleRootLayerImpl> entry : rootModel.myLayers.entrySet()) {
    ModuleRootLayerImpl moduleRootLayer = new ModuleRootLayerImpl(entry.getValue(), this);
    myLayers.put(entry.getKey(), moduleRootLayer);
  }
  setCurrentLayerSafe(rootModel.myCurrentLayerName);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:14,代码来源:RootModelImpl.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java SlaveServerConfig类代码示例发布时间:2022-05-22
下一篇:
Java ResourceCallback类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap