1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 17:56:01 +02:00

ASTviewer must not call set.. methods.

This commit is contained in:
Markus Schorn 2008-08-05 11:04:38 +00:00
parent 8a535a1187
commit ab54af8863

View file

@ -37,6 +37,7 @@ import org.eclipse.cdt.core.dom.ast.IASTNode;
import org.eclipse.cdt.core.dom.ast.IASTPointer; import org.eclipse.cdt.core.dom.ast.IASTPointer;
import org.eclipse.cdt.core.dom.ast.IASTPreprocessorIncludeStatement; import org.eclipse.cdt.core.dom.ast.IASTPreprocessorIncludeStatement;
import org.eclipse.cdt.core.dom.ast.IASTPreprocessorObjectStyleMacroDefinition; import org.eclipse.cdt.core.dom.ast.IASTPreprocessorObjectStyleMacroDefinition;
import org.eclipse.cdt.core.dom.ast.IASTProblem;
import org.eclipse.cdt.core.dom.ast.IASTProblemHolder; import org.eclipse.cdt.core.dom.ast.IASTProblemHolder;
import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration; import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit; import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
@ -505,6 +506,10 @@ public class DOMASTNodeLeaf implements IAdaptable {
buffer.append(trimObjectToString(obj.toString())); buffer.append(trimObjectToString(obj.toString()));
} else if (obj instanceof ASTNodeProperty) { } else if (obj instanceof ASTNodeProperty) {
buffer.append(((ASTNodeProperty)obj).getName()); buffer.append(((ASTNodeProperty)obj).getName());
} else if (obj instanceof IASTProblemHolder) {
IASTProblemHolder ph= (IASTProblemHolder) obj;
IASTProblem problem= ph.getProblem();
buffer.append(problem.getMessage());
} else if (obj instanceof IASTName) { } else if (obj instanceof IASTName) {
final String toString = ((IASTName)obj).toString(); final String toString = ((IASTName)obj).toString();
if( toString != null ) if( toString != null )
@ -601,6 +606,8 @@ public class DOMASTNodeLeaf implements IAdaptable {
if (method.equals(CLONE_METHOD_NAME)) if (method.equals(CLONE_METHOD_NAME))
return false; return false;
if (method.equals(FLUSH_CACHE_METHOD_NAME)) if (method.equals(FLUSH_CACHE_METHOD_NAME))
return false;
if (method.startsWith("set"))
return false; return false;
return true; return true;