From 35805f1d384f198c00473e0ecc5280a99b6c3e17 Mon Sep 17 00:00:00 2001 From: John Camelon Date: Thu, 27 Jan 2005 20:42:56 +0000 Subject: [PATCH] Patch for Devin Steffler. Further UI indicator infrastructure for testing DOM AST. --- .../DOMAST/CPPPopulateASTViewAction.java | 14 +++++++ .../tests/DOMAST/CPopulateASTViewAction.java | 15 +++++++ .../cdt/ui/tests/DOMAST/TreeObject.java | 41 +++++++++++++++++-- 3 files changed, 67 insertions(+), 3 deletions(-) diff --git a/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/CPPPopulateASTViewAction.java b/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/CPPPopulateASTViewAction.java index 740cccd2c24..0d5f3157b01 100644 --- a/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/CPPPopulateASTViewAction.java +++ b/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/CPPPopulateASTViewAction.java @@ -10,6 +10,8 @@ **********************************************************************/ package org.eclipse.cdt.ui.tests.DOMAST; +import org.eclipse.cdt.core.dom.ast.IASTArrayDeclarator; +import org.eclipse.cdt.core.dom.ast.IASTArrayModifier; import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier; import org.eclipse.cdt.core.dom.ast.IASTDeclaration; import org.eclipse.cdt.core.dom.ast.IASTDeclarator; @@ -18,6 +20,7 @@ import org.eclipse.cdt.core.dom.ast.IASTInitializer; import org.eclipse.cdt.core.dom.ast.IASTName; import org.eclipse.cdt.core.dom.ast.IASTNode; import org.eclipse.cdt.core.dom.ast.IASTParameterDeclaration; +import org.eclipse.cdt.core.dom.ast.IASTPointerOperator; import org.eclipse.cdt.core.dom.ast.IASTPreprocessorMacroDefinition; import org.eclipse.cdt.core.dom.ast.IASTProblem; import org.eclipse.cdt.core.dom.ast.IASTStatement; @@ -79,6 +82,17 @@ public class CPPPopulateASTViewAction extends CPPBaseVisitorAction implements IP */ public int processDeclarator(IASTDeclarator declarator) { addRoot(declarator); + + IASTPointerOperator[] ops = declarator.getPointerOperators(); + for(int i=0; i 0 ) { + buffer.append(START_OF_LIST); + for (int i=0; i 0) { + buffer.append(START_OF_LIST); + buffer.append(fileName.substring(lastSlash+1)); // TODO make path relative to project, i.e. /projectName/path/file.c + } + + return buffer.toString(); } - + return buffer.toString(); } public Object getAdapter(Class key) {