Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMBinding.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMBinding.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMBinding.java
index 0059f60802..22b81c33e4 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMBinding.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMBinding.java
@@ -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() {

Back to the top