1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 01:15:29 +02:00

Fix template id occurrences as declarations

This commit is contained in:
Anton Leherbauer 2008-03-13 15:21:50 +00:00
parent f896a9a228
commit b1ec2cba25

View file

@ -19,6 +19,7 @@ import org.eclipse.cdt.core.dom.ast.IASTName;
import org.eclipse.cdt.core.dom.ast.IASTNode;
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
import org.eclipse.cdt.core.dom.ast.IBinding;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateId;
import org.eclipse.cdt.internal.ui.util.Messages;
@ -107,6 +108,9 @@ public class OccurrencesFinder implements IOccurrencesFinder {
if (binding != null /* && Bindings.equals(binding, fTarget) */) {
int flag= 0;
String description= fDescription;
if (node instanceof ICPPASTTemplateId) {
node= ((ICPPASTTemplateId) node).getTemplateName();
}
IASTFileLocation fileLocation= node.getImageLocation();
if (fileLocation == null || !fRoot.getFilePath().equals(fileLocation.getFileName())) {
fileLocation= node.getFileLocation();