本文整理汇总了Java中com.intellij.openapi.compiler.CompileScope.belongs方法的典型用法代码示例。如果您正苦于以下问题:Java CompileScope.belongs方法的具体用法?Java CompileScope.belongs怎么用?Java CompileScope.belongs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.compiler.CompileScope
的用法示例。
在下文中一共展示了CompileScope.belongs方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: cleanupChildrenRecursively
import com.intellij.openapi.compiler.CompileScope; //导入方法依赖的package包/类
private void cleanupChildrenRecursively(@NotNull final Object fromElement, final @Nullable CompileScope scope, @NotNull UUID currentSessionId) {
final ErrorViewStructure structure = myPanel.getErrorViewStructure();
for (ErrorTreeElement element : structure.getChildElements(fromElement)) {
if (element instanceof GroupingElement) {
if (scope != null) {
final VirtualFile file = ((GroupingElement)element).getFile();
if (file != null && !scope.belongs(file.getUrl())) {
continue;
}
}
if (!currentSessionId.equals(element.getData())) {
structure.removeElement(element);
}
else {
cleanupChildrenRecursively(element, scope, currentSessionId);
}
}
else {
if (!currentSessionId.equals(element.getData())) {
structure.removeElement(element);
}
}
}
}
示例2: belongs
import com.intellij.openapi.compiler.CompileScope; //导入方法依赖的package包/类
public boolean belongs(String url) {
for (CompileScope scope : myScopes) {
if (scope.belongs(url)) {
return true;
}
}
return false;
}
示例3: needTransformCopying
import com.intellij.openapi.compiler.CompileScope; //导入方法依赖的package包/类
private boolean needTransformCopying(CompileScope compileScope) {
final CompilerConfiguration configuration = CompilerConfiguration.getInstance(myProject);
final ProjectFileIndex index = ProjectRootManager.getInstance(myProject).getFileIndex();
for (VirtualFile file : FilenameIndex.getVirtualFilesByName(myProject, AST_TRANSFORM_FILE_NAME, GlobalSearchScope.projectScope(myProject))) {
if (compileScope.belongs(file.getUrl()) && index.isInSource(file) && !configuration.isResourceFile(file)) {
return true;
}
}
return false;
}
示例4: belongsToCompileScope
import com.intellij.openapi.compiler.CompileScope; //导入方法依赖的package包/类
private static boolean belongsToCompileScope(final CompileContext context, final VirtualFile formFile, final String classToBind)
{
final CompileScope compileScope = context.getCompileScope();
if(compileScope.belongs(formFile.getUrl()))
{
return true;
}
final VirtualFile sourceFile = findSourceFile(context, formFile, classToBind);
return sourceFile != null && compileScope.belongs(sourceFile.getUrl());
}