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