mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-25 01:45:33 +02:00
Added local-to-file information to toString() method.
This commit is contained in:
parent
6db1a5c8fd
commit
2690b106c5
1 changed files with 10 additions and 4 deletions
|
@ -12,6 +12,9 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core.pdom.dom;
|
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.CCorePlugin;
|
||||||
import org.eclipse.cdt.core.dom.ast.ASTTypeUtil;
|
import org.eclipse.cdt.core.dom.ast.ASTTypeUtil;
|
||||||
import org.eclipse.cdt.core.dom.ast.DOMException;
|
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.cdt.internal.core.pdom.tag.PDOMTaggable;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
|
||||||
import java.lang.reflect.Modifier;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class for bindings in the PDOM.
|
* Base class for bindings in the PDOM.
|
||||||
*/
|
*/
|
||||||
|
@ -261,7 +261,13 @@ public abstract class PDOMBinding extends PDOMNamedNode implements IPDOMBinding
|
||||||
@Override
|
@Override
|
||||||
public final String toString() {
|
public final String toString() {
|
||||||
String name = toStringBase();
|
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() {
|
protected String toStringBase() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue