X-Git-Url: http://git.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/internal/compiler/ast/ThrowStatement.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/internal/compiler/ast/ThrowStatement.java index 25aaa89..f2a0e5c 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/internal/compiler/ast/ThrowStatement.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/internal/compiler/ast/ThrowStatement.java @@ -10,7 +10,7 @@ *******************************************************************************/ package net.sourceforge.phpeclipse.internal.compiler.ast; -import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; +import net.sourceforge.phpdt.internal.compiler.ASTVisitor; import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; @@ -37,8 +37,8 @@ public class ThrowStatement extends Statement { /** * Throw code generation * - * @param currentScope org.eclipse.jdt.internal.compiler.lookup.BlockScope - * @param codeStream org.eclipse.jdt.internal.compiler.codegen.CodeStream + * @param currentScope net.sourceforge.phpdt.internal.compiler.lookup.BlockScope + * @param codeStream net.sourceforge.phpdt.internal.compiler.codegen.CodeStream */ // public void generateCode(BlockScope currentScope, CodeStream codeStream) { // @@ -61,7 +61,12 @@ public class ThrowStatement extends Statement { // } exception.implicitWidening(exceptionType, exceptionType); } + public StringBuffer printStatement(int indent, StringBuffer output) { + printIndent(indent, output).append("throw "); //$NON-NLS-1$ + exception.printExpression(0, output); + return output.append(';'); + } public String toString(int tab) { String s = tabString(tab); s = s + "throw "; //$NON-NLS-1$ @@ -69,7 +74,7 @@ public class ThrowStatement extends Statement { return s; } - public void traverse(IAbstractSyntaxTreeVisitor visitor, BlockScope blockScope) { + public void traverse(ASTVisitor visitor, BlockScope blockScope) { if (visitor.visit(this, blockScope)) exception.traverse(visitor, blockScope); visitor.endVisit(this, blockScope);