1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-13 11:15:38 +02:00

Implemented a couple of methods in PDOMCPPClassType which are now called since I fixed qualified name support. Also fixed the label for the text selection query to show which text we're searching for.

This commit is contained in:
Doug Schaefer 2006-05-26 17:06:24 +00:00
parent f4fc7d4d27
commit 6c4db4a4b8
2 changed files with 15 additions and 2 deletions

View file

@ -147,7 +147,8 @@ public class PDOMCPPClassType extends PDOMMemberOwner implements ICPPClassType,
} }
public void addName(IASTName name) throws DOMException { public void addName(IASTName name) throws DOMException {
throw new PDOMNotImplementedError(); // TODO - this might be a better way of adding names to scopes
// but for now do nothing.
} }
public IBinding[] find(String name) throws DOMException { public IBinding[] find(String name) throws DOMException {
@ -178,7 +179,15 @@ public class PDOMCPPClassType extends PDOMMemberOwner implements ICPPClassType,
} }
public IASTName getScopeName() throws DOMException { public IASTName getScopeName() throws DOMException {
throw new PDOMNotImplementedError(); try {
IASTName name = getFirstDefinition();
if (name == null)
name = getFirstDefinition();
return name;
} catch (CoreException e) {
CCorePlugin.log(e);
return null;
}
} }
public boolean isFullyCached() throws DOMException { public boolean isFullyCached() throws DOMException {

View file

@ -56,4 +56,8 @@ public class PDOMSearchTextSelectionQuery extends PDOMSearchQuery {
} }
} }
public String getLabel() {
return super.getLabel() + " " + selection.getText();
}
} }