use of com.intellij.psi.jsp.JspFile in project intellij-plugins by JetBrains.
the class Struts2GraphFileEditorProvider method accept.
public boolean accept(@NotNull final Project project, @NotNull final VirtualFile file) {
if (!file.isValid()) {
return false;
}
final PsiFile psiFile = PsiManager.getInstance(project).findFile(file);
if (!(psiFile instanceof XmlFile)) {
return false;
}
if (psiFile instanceof JspFile) {
return false;
}
if (!StrutsManager.getInstance(project).isStruts2ConfigFile((XmlFile) psiFile)) {
return false;
}
final Module module = ModuleUtilCore.findModuleForFile(file, project);
if (module == null) {
return false;
}
final Set<StrutsFileSet> fileSets = StrutsManager.getInstance(project).getAllConfigFileSets(module);
for (final StrutsFileSet fileSet : fileSets) {
if (fileSet.hasFile(file)) {
return true;
}
}
return false;
}
Aggregations