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


Java LightFilePointer类代码示例

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


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

示例1: getFiles

import com.intellij.openapi.roots.ui.LightFilePointer; //导入依赖的package包/类
@Override
public VirtualFile[] getFiles(OrderRootType rootType) {
  List<VirtualFile> result = new ArrayList<VirtualFile>();
  for (LightFilePointer pointer : myRoots.get(rootType)) {
    final VirtualFile file = pointer.getFile();
    if (file == null) {
      continue;
    }

    if (file.isDirectory()) {
      final String url = file.getUrl();
      if (myJarDirectories.contains(rootType, url)) {
        LibraryImpl.collectJarFiles(file, result, myJarDirectories.isRecursive(rootType, url));
        continue;
      }
    }
    result.add(file);
  }
  return VfsUtil.toVirtualFileArray(result);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:NewLibraryEditor.java

示例2: pointersToUrls

import com.intellij.openapi.roots.ui.LightFilePointer; //导入依赖的package包/类
private static String[] pointersToUrls(Collection<LightFilePointer> pointers) {
  List<String> urls = new ArrayList<String>(pointers.size());
  for (LightFilePointer pointer : pointers) {
    urls.add(pointer.getUrl());
  }
  return ArrayUtil.toStringArray(urls);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:NewLibraryEditor.java

示例3: removeRoot

import com.intellij.openapi.roots.ui.LightFilePointer; //导入依赖的package包/类
@Override
public void removeRoot(String url, OrderRootType rootType) {
  myRoots.remove(rootType, new LightFilePointer(url));
  Iterator<LightFilePointer> iterator = myExcludedRoots.iterator();
  while (iterator.hasNext()) {
    LightFilePointer pointer = iterator.next();
    if (!isUnderRoots(pointer.getUrl())) {
      iterator.remove();
    }
  }
  myJarDirectories.remove(rootType, url);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:NewLibraryEditor.java

示例4: isUnderRoots

import com.intellij.openapi.roots.ui.LightFilePointer; //导入依赖的package包/类
private boolean isUnderRoots(@NotNull String url) {
  for (LightFilePointer pointer : myRoots.values()) {
    if (VfsUtilCore.isEqualOrAncestor(pointer.getUrl(), url)) {
      return true;
    }
  }
  return false;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:NewLibraryEditor.java

示例5: isValid

import com.intellij.openapi.roots.ui.LightFilePointer; //导入依赖的package包/类
@Override
public boolean isValid(String url, OrderRootType orderRootType) {
  final Collection<LightFilePointer> pointers = myRoots.get(orderRootType);
  for (LightFilePointer pointer : pointers) {
    if (pointer.getUrl().equals(url)) {
      return pointer.isValid();
    }
  }
  return false;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:NewLibraryEditor.java

示例6: applyTo

import com.intellij.openapi.roots.ui.LightFilePointer; //导入依赖的package包/类
public void applyTo(LibraryEx.ModifiableModelEx model) {
  model.setProperties(myProperties);
  for (OrderRootType type : myRoots.keySet()) {
    for (LightFilePointer pointer : myRoots.get(type)) {
      if (!myJarDirectories.contains(type, pointer.getUrl())) {
        model.addRoot(pointer.getUrl(), type);
      }
    }
  }
  for (OrderRootType rootType : myJarDirectories.getRootTypes()) {
    for (String url : myJarDirectories.getDirectories(rootType)) {
      model.addJarDirectory(url, myJarDirectories.isRecursive(rootType, url), rootType);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:NewLibraryEditor.java

示例7: getUrls

import com.intellij.openapi.roots.ui.LightFilePointer; //导入依赖的package包/类
@Override
public String[] getUrls(OrderRootType rootType) {
  final Collection<LightFilePointer> pointers = myRoots.get(rootType);
  List<String> urls = new ArrayList<String>();
  for (LightFilePointer pointer : pointers) {
    urls.add(pointer.getUrl());
  }
  return ArrayUtil.toStringArray(urls);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:10,代码来源:NewLibraryEditor.java

示例8: getCompilerOutputPointer

import com.intellij.openapi.roots.ui.LightFilePointer; //导入依赖的package包/类
@Override
public VirtualFilePointer getCompilerOutputPointer() {
  if (myOutputDirPointer == null) {
    return new LightFilePointer(getCompilerOutputUrl());
  }
  return myOutputDirPointer;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:8,代码来源:CompilerConfigurationImpl.java

示例9: getCompilerOutputPointer

import com.intellij.openapi.roots.ui.LightFilePointer; //导入依赖的package包/类
@Nonnull
@Override
public VirtualFilePointer getCompilerOutputPointer(@Nonnull ContentFolderTypeProvider contentFolderType) {
  if (myInheritOutput) {
    throw new IllegalArgumentException("Then module is inherit output dir - output virtual file pointer not exists");
  }
  else {
    VirtualFilePointer virtualFilePointer = myVirtualFilePointers.get(contentFolderType.getId());
    if (virtualFilePointer != null) {
      return virtualFilePointer;
    }
    return new LightFilePointer(myCompilerConfiguration.getCompilerOutputUrl() + "/" + contentFolderType.getId().toLowerCase() + "/" + myModule.getName());
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:15,代码来源:ModuleCompilerPathsManagerImpl.java

示例10: createLight

import com.intellij.openapi.roots.ui.LightFilePointer; //导入依赖的package包/类
@Nonnull
public static HistoryEntry createLight(@Nonnull VirtualFile file,
                                       @Nonnull FileEditorProvider[] providers,
                                       @Nonnull FileEditorState[] states,
                                       @Nonnull FileEditorProvider selectedProvider) {
  VirtualFilePointer pointer = new LightFilePointer(file);
  HistoryEntry entry = new HistoryEntry(pointer, selectedProvider, null);
  for (int i = 0; i < providers.length; i++) {
    entry.putState(providers[i], states[i]);
  }
  return entry;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:13,代码来源:HistoryEntry.java

示例11: pointersToUrls

import com.intellij.openapi.roots.ui.LightFilePointer; //导入依赖的package包/类
private static String[] pointersToUrls(Collection<LightFilePointer> pointers) {
  List<String> urls = new ArrayList<String>();
  for (LightFilePointer pointer : pointers) {
    urls.add(pointer.getUrl());
  }
  return ArrayUtil.toStringArray(urls);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:8,代码来源:NewLibraryEditor.java

示例12: isUnderRoots

import com.intellij.openapi.roots.ui.LightFilePointer; //导入依赖的package包/类
private boolean isUnderRoots(@Nonnull String url) {
  for (LightFilePointer pointer : myRoots.values()) {
    if (VfsUtilCore.isEqualOrAncestor(pointer.getUrl(), url)) {
      return true;
    }
  }
  return false;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:9,代码来源:NewLibraryEditor.java

示例13: NewLibraryEditor

import com.intellij.openapi.roots.ui.LightFilePointer; //导入依赖的package包/类
public NewLibraryEditor(@Nullable LibraryType type, @Nullable LibraryProperties properties) {
  myType = type;
  myProperties = properties;
  myRoots = new MultiMap<OrderRootType, LightFilePointer>();
  myExcludedRoots = new LinkedHashSet<LightFilePointer>();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:NewLibraryEditor.java

示例14: addRoot

import com.intellij.openapi.roots.ui.LightFilePointer; //导入依赖的package包/类
@Override
public void addRoot(VirtualFile file, OrderRootType rootType) {
  myRoots.putValue(rootType, new LightFilePointer(file));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:NewLibraryEditor.java

示例15: addExcludedRoot

import com.intellij.openapi.roots.ui.LightFilePointer; //导入依赖的package包/类
@Override
public void addExcludedRoot(@NotNull String url) {
  myExcludedRoots.add(new LightFilePointer(url));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:NewLibraryEditor.java


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