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:
parent
f896a9a228
commit
b1ec2cba25
1 changed files with 4 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue