From 03ff1d926f2509231ebafbc97f2237a5ccce8b09 Mon Sep 17 00:00:00 2001 From: kpouer Date: Mon, 2 Jun 2003 15:58:15 +0000 Subject: [PATCH] bugfixes --- .../phpdt/internal/compiler/ast/Break.java | 2 +- .../phpdt/internal/compiler/ast/Case.java | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Break.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Break.java index e7ef3ee..08b273b 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Break.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Break.java @@ -12,7 +12,7 @@ public class Break extends BranchStatement { public String toString(int tab) { String s = tabString(tab); - if (expression == null) { + if (expression != null) { return s + "break " + expression.toString();//$NON-NLS-1$ } return s + "break";//$NON-NLS-1$ diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Case.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Case.java index da70a1e..a66d3f1 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Case.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Case.java @@ -27,9 +27,11 @@ public class Case extends AbstractCase { buff.append("case "); buff.append(value.toStringExpression()); buff.append(" :\n"); - for (int i = 0; i < statements.length; i++) { - Statement statement = statements[i]; - buff.append(statement.toString(tab + 1)); + if (statements != null) { + for (int i = 0; i < statements.length; i++) { + Statement statement = statements[i]; + buff.append(statement.toString(tab + 1)); + } } return buff.toString(); } -- 1.7.1