}
} catch (Exception e) {
// it's just for debug purposes... ignore all exceptions in this area
}
try {
JavaElement javaElement = (JavaElement)match.getElement();
System.out.println("\tJava element: "+ javaElement.toStringWithAncestors()); //$NON-NLS-1$
if (!javaElement.exists()) {
System.out.println("\t\tWARNING: this element does NOT exist!"); //$NON-NLS-1$
}
} catch (Exception e) {
// it's just for debug purposes... ignore all exceptions in this area
}
if (match instanceof TypeReferenceMatch) {
try {
TypeReferenceMatch typeRefMatch = (TypeReferenceMatch) match;
JavaElement local = (JavaElement) typeRefMatch.getLocalElement();
if (local != null) {
System.out.println("\tLocal element: "+ local.toStringWithAncestors()); //$NON-NLS-1$
}
IJavaElement[] others = typeRefMatch.getOtherElements();
if (others != null) {
int length = others.length;
if (length > 0) {
System.out.println("\tOther elements:"); //$NON-NLS-1$
for (int i=0; i<length; i++) {
JavaElement other = (JavaElement) others[i];
System.out.println("\t\t- "+ other.toStringWithAncestors()); //$NON-NLS-1$
}
}
}
} catch (Exception e) {
// it's just for debug purposes... ignore all exceptions in this area