1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 17:05:26 +02:00

Added local-to-file information to toString() method.

This commit is contained in:
Sergey Prigogin 2013-09-09 14:09:09 -07:00
parent 6db1a5c8fd
commit 2690b106c5

View file

@ -12,6 +12,9 @@
*******************************************************************************/
package org.eclipse.cdt.internal.core.pdom.dom;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.dom.ast.ASTTypeUtil;
import org.eclipse.cdt.core.dom.ast.DOMException;
@ -37,9 +40,6 @@ import org.eclipse.cdt.internal.core.pdom.db.IString;
import org.eclipse.cdt.internal.core.pdom.tag.PDOMTaggable;
import org.eclipse.core.runtime.CoreException;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
/**
* Base class for bindings in the PDOM.
*/
@ -261,7 +261,13 @@ public abstract class PDOMBinding extends PDOMNamedNode implements IPDOMBinding
@Override
public final String toString() {
String name = toStringBase();
return name + " " + getConstantNameForValue(getLinkage(), getNodeType()); //$NON-NLS-1$
try {
PDOMFile localToFile = getLocalToFile();
if (localToFile != null)
return name + " (local to " + localToFile.getLocation().getURI().getPath() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
} catch (CoreException e) {
}
return name;
}
protected String toStringBase() {