From 873cc2085cdc4b269138dc2ce3c8c8b522bd1f8b Mon Sep 17 00:00:00 2001 From: kpouer Date: Fri, 24 Jan 2003 23:16:15 +0000 Subject: [PATCH] If the value of a string is an empty string the outline will no longer show 'varname = ' --- .../phpeditor/phpparser/PHPVarDeclaration.java | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPVarDeclaration.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPVarDeclaration.java index 1a40ab9..be8e479 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPVarDeclaration.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPVarDeclaration.java @@ -9,16 +9,17 @@ import org.eclipse.jface.resource.ImageDescriptor; */ public class PHPVarDeclaration extends PHPSegment { + /** The value of the variable. */ private String value; /** * Create a php variable declaration. * @param parent the parent object (it should be a php class) * @param name the name of the variable * @param index where the variable is in the file - * @param value la valeur + * @param value the value */ public PHPVarDeclaration(Object parent, String name, int index, String value) { - super(parent, name, index); + super(parent, name, index); this.value = value; } @@ -27,7 +28,6 @@ public class PHPVarDeclaration extends PHPSegment { * @param parent the parent object (it should be a php class) * @param name the name of the variable * @param index where the variable is in the file - * @param value la valeur */ public PHPVarDeclaration(Object parent, String name, int index) { this(parent, name, index,null); @@ -42,7 +42,7 @@ public class PHPVarDeclaration extends PHPSegment { } public String toString() { - if (value == null) { + if (value == null || value.equals("")) { return super.toString(); } else { return name + " = " + value; -- 1.7.1