mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
add template parameters to DOM view
This commit is contained in:
parent
829a826ec9
commit
2a8ddcb4ee
1 changed files with 16 additions and 0 deletions
|
@ -38,6 +38,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTConstructorChainInitializer;
|
|||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFunctionDeclarator;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFunctionTryBlockDeclarator;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamespaceDefinition;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateParameter;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier;
|
||||
import org.eclipse.cdt.core.parser.util.ArrayUtil;
|
||||
|
||||
|
@ -61,6 +62,7 @@ public class CPPPopulateASTViewAction extends CPPASTVisitor implements IPopulate
|
|||
shouldVisitEnumerators = true;
|
||||
shouldVisitBaseSpecifiers = true;
|
||||
shouldVisitNamespaces = true;
|
||||
shouldVisitTemplateParameters= true;
|
||||
}
|
||||
|
||||
DOMASTNodeParent root = null;
|
||||
|
@ -321,6 +323,20 @@ public class CPPPopulateASTViewAction extends CPPASTVisitor implements IPopulate
|
|||
else
|
||||
return PROCESS_CONTINUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor#visit(org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateParameter)
|
||||
*/
|
||||
public int visit(ICPPASTTemplateParameter templateParameter) {
|
||||
DOMASTNodeLeaf temp = addRoot(templateParameter);
|
||||
if (temp == null)
|
||||
return PROCESS_ABORT;
|
||||
else if (temp instanceof DOMASTNodeLeafContinue)
|
||||
return PROCESS_CONTINUE;
|
||||
else
|
||||
return PROCESS_CONTINUE;
|
||||
}
|
||||
|
||||
private DOMASTNodeLeaf mergeNode(ASTNode node) {
|
||||
DOMASTNodeLeaf leaf = addRoot(node);
|
||||
|
|
Loading…
Add table
Reference in a new issue