mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
improved placeholders support (IDEA-65041)
This commit is contained in:
@@ -39,9 +39,7 @@ public class NamespaceFilter implements ElementFilter {
|
||||
if (!psiElement.isValid()) return false;
|
||||
final String ns = psiElement.getNamespace();
|
||||
|
||||
for (String aMyValue : myNamespaces) {
|
||||
if (aMyValue.equals(ns)) return true;
|
||||
}
|
||||
if (isNamespaceAcceptable(ns)) return true;
|
||||
|
||||
final PsiFile psiFile = psiElement.getContainingFile();
|
||||
if (psiFile instanceof XmlFile) {
|
||||
@@ -55,11 +53,7 @@ public class NamespaceFilter implements ElementFilter {
|
||||
final String publicId = doctype.getPublicId();
|
||||
|
||||
if (publicId != null) {
|
||||
for (String aMyValue : myNamespaces) {
|
||||
if (aMyValue.equals(publicId)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (isNamespaceAcceptable(publicId)) return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -70,4 +64,11 @@ public class NamespaceFilter implements ElementFilter {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected boolean isNamespaceAcceptable(String ns) {
|
||||
for (String aMyValue : myNamespaces) {
|
||||
if (aMyValue.equals(ns)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user