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


Java VfsUtilCore.isEqualOrAncestor方法代码示例

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


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

示例1: configOutputFolders

import com.intellij.openapi.vfs.VfsUtilCore; //导入方法依赖的package包/类
private void configOutputFolders() {
  if (myImportingSettings.isUseMavenOutput()) {
    myModel.useModuleOutput(myMavenProject.getOutputDirectory(),
                            myMavenProject.getTestOutputDirectory());
  }

  String buildDirPath = myModel.toPath(myMavenProject.getBuildDirectory()).getPath();
  String outputDirPath = myModel.toPath(myMavenProject.getOutputDirectory()).getPath();

  if ((!VfsUtilCore.isEqualOrAncestor(buildDirPath, outputDirPath))) {
    myModel.addExcludedFolder(myMavenProject.getOutputDirectory());
  }

  String testOutputDirPath = myModel.toPath(myMavenProject.getTestOutputDirectory()).getPath();
  if ((!VfsUtilCore.isEqualOrAncestor(buildDirPath, testOutputDirPath))) {
    myModel.addExcludedFolder(myMavenProject.getTestOutputDirectory());
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:MavenFoldersImporter.java

示例2: addSourceFolder

import com.intellij.openapi.vfs.VfsUtilCore; //导入方法依赖的package包/类
public <P extends JpsElement> void addSourceFolder(final @NotNull Url url,
                                                   final @NotNull JpsModuleSourceRootType<P> rootType,
                                                   final @NotNull P properties) {
  for (Iterator<JpsSourceFolder> iterator = myJpsSourceFolders.iterator(); iterator.hasNext(); ) {
    JpsSourceFolder eachFolder = iterator.next();
    if (VfsUtilCore.isEqualOrAncestor(url.getUrl(), eachFolder.getUrl()) ||
        VfsUtilCore.isEqualOrAncestor(eachFolder.getUrl(), url.getUrl())) {
      iterator.remove();
      Disposer.dispose(eachFolder);
    }
  }

  final JpsModuleSourceRoot jpsModuleSourceRoot =
    JpsElementFactory.getInstance().createModuleSourceRoot(url.getUrl(), rootType, properties);
  addJspSourceFolder(jpsModuleSourceRoot, url.getUrl());

  isJpsSourceFoldersChanged = true;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:MavenSourceFoldersModuleExtension.java

示例3: isUnderRoots

import com.intellij.openapi.vfs.VfsUtilCore; //导入方法依赖的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

示例4: addSourceFolderIfNotOverlap

import com.intellij.openapi.vfs.VfsUtilCore; //导入方法依赖的package包/类
private void addSourceFolderIfNotOverlap(String path, JpsModuleSourceRootType<?> type, List<String> addedPaths) {
  String canonicalPath = myModel.toPath(path).getPath();
  for (String existing : addedPaths) {
    if (VfsUtilCore.isEqualOrAncestor(existing, canonicalPath)
        || VfsUtilCore.isEqualOrAncestor(canonicalPath, existing)) {
      return;
    }
  }
  addedPaths.add(canonicalPath);
  myModel.addSourceFolder(canonicalPath, type);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:MavenFoldersImporter.java

示例5: getContentRootFor

import com.intellij.openapi.vfs.VfsUtilCore; //导入方法依赖的package包/类
@Nullable
private ContentEntry getContentRootFor(@NotNull Url url) {
  for (ContentEntry e : myRootModel.getContentEntries()) {
    if (VfsUtilCore.isEqualOrAncestor(e.getUrl(), url.getUrl())) return e;
  }
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:MavenSourceFoldersModuleExtension.java

示例6: unregisterAll

import com.intellij.openapi.vfs.VfsUtilCore; //导入方法依赖的package包/类
public void unregisterAll(@NotNull Url url, boolean under) {
  for (Iterator<JpsSourceFolder> iterator = myJpsSourceFolders.iterator(); iterator.hasNext(); ) {
    JpsSourceFolder eachFolder = iterator.next();
    String ancestor = under ? url.getUrl() : eachFolder.getUrl();
    String child = under ? eachFolder.getUrl() : url.getUrl();
    if (VfsUtilCore.isEqualOrAncestor(ancestor, child)) {
      iterator.remove();
      Disposer.dispose(eachFolder);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:MavenSourceFoldersModuleExtension.java

示例7: hasRegisteredSourceSubfolder

import com.intellij.openapi.vfs.VfsUtilCore; //导入方法依赖的package包/类
public boolean hasRegisteredSourceSubfolder(@NotNull String url) {
  for (JpsSourceFolder eachFolder : myJpsSourceFolders) {
    if (VfsUtilCore.isEqualOrAncestor(url, eachFolder.getUrl())) return true;
  }
  return false;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:MavenSourceFoldersModuleExtension.java

示例8: getContentRootFor

import com.intellij.openapi.vfs.VfsUtilCore; //导入方法依赖的package包/类
private ContentEntry getContentRootFor(Url url) {
  for (ContentEntry e : myRootModel.getContentEntries()) {
    if (VfsUtilCore.isEqualOrAncestor(e.getUrl(), url.getUrl())) return e;
  }
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:MavenRootModelAdapter.java


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