Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2013-09-09 17:09:09 -0400
committerSergey Prigogin2013-09-10 12:47:32 -0400
commit1adadfc29a5696f6632bd289af932d598215fe17 (patch)
tree6d47f44a3dd3f45ff6ef88f9118f82728616b244
parent665f381488dc26e66fa790ff68fd0287864ba83f (diff)
downloadorg.eclipse.cdt-1adadfc29a5696f6632bd289af932d598215fe17.tar.gz
org.eclipse.cdt-1adadfc29a5696f6632bd289af932d598215fe17.tar.xz
org.eclipse.cdt-1adadfc29a5696f6632bd289af932d598215fe17.zip
Added local-to-file information to toString() method.
-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