mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
resolve namespaces declared as import in wsdl:types
This commit is contained in:
@@ -553,4 +553,11 @@ public class ArrayUtil {
|
||||
public static <T> T getLastElement(T[] array) {
|
||||
return array.length > 0 ? array[array.length -1] : null;
|
||||
}
|
||||
|
||||
public static <T> T[] join(T[] array1, T[] array2) {
|
||||
final T[] newArray = (T[])Array.newInstance(array1.getClass().getComponentType(), array1.length + array2.length);
|
||||
System.arraycopy(array1, 0, newArray, 0, array1.length);
|
||||
System.arraycopy(array2, 0, newArray, array1.length, array2.length);
|
||||
return newArray;
|
||||
}
|
||||
}
|
||||
|
||||
+13
-6
@@ -132,6 +132,14 @@ public class URLReference implements PsiReference, QuickFixProvider, EmptyResolv
|
||||
result[0] = t;
|
||||
return false;
|
||||
}
|
||||
for (XmlTag anImport : t.findSubTags("import", t.getNamespace())) {
|
||||
if (canonicalText.equals(anImport.getAttributeValue("namespace"))) {
|
||||
final XmlAttribute location = anImport.getAttribute("schemaLocation");
|
||||
if (location != null) {
|
||||
result[0] = FileReferenceUtil.findFile(location.getValueElement());
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
});
|
||||
@@ -233,12 +241,11 @@ public class URLReference implements PsiReference, QuickFixProvider, EmptyResolv
|
||||
final XmlTag subTag = rootTag.findFirstSubTag(types);
|
||||
|
||||
if (subTag != null) {
|
||||
XmlTag[] tags = subTag.findSubTags("xsd:schema");
|
||||
if (tags.length == 0) {
|
||||
tags = subTag.findSubTags("schema");
|
||||
}
|
||||
for(XmlTag t:tags) {
|
||||
if (!processor.process(t)) return;
|
||||
for (int i = 0; i < XmlUtil.SCHEMA_URIS.length; i++) {
|
||||
final XmlTag[] tags = subTag.findSubTags("schema", XmlUtil.SCHEMA_URIS[i]);
|
||||
for (XmlTag t : tags) {
|
||||
if (!processor.process(t)) return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user