From fbec1e1afed949a8c67122743fcefc942dd40246 Mon Sep 17 00:00:00 2001 From: khartlage Date: Tue, 28 Jan 2003 21:54:20 +0000 Subject: [PATCH] changed the "description" attribute in phpsyntax.xml into multi-line text between the tags --- .../phpeclipse/phpeditor/php/PHPElement.java | 61 ++++++++++++-------- .../phpeclipse/phpeditor/php/PHPFunction.java | 10 ++- 2 files changed, 43 insertions(+), 28 deletions(-) diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPElement.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPElement.java index be19656..455b979 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPElement.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPElement.java @@ -5,29 +5,40 @@ package net.sourceforge.phpeclipse.phpeditor.php; */ public abstract class PHPElement { - private String ElementName; - private String ElementDescription; - - //Setters - public final void setName(String ElementName) - { this.ElementName = ElementName; } - public final void setDescription(String ElementDescription) - { this.ElementDescription = ElementDescription; } - - //Getters - public final String getName() { return ElementName; } - public final String getDescription() { return ElementDescription; } - - public PHPElement(){} - public PHPElement(String Name, String Description){ - setName(Name); - if ((Description == null) || (Description.equals(""))) - { - setDescription(Name +" - "); - } - else { - setDescription(Description); - } - } - + private String ElementName; + private String ElementUsage; + + //Setters + public final void setName(String ElementName) { + this.ElementName = ElementName; + } + public final void setUsage(String ElementDescription) { + this.ElementUsage = ElementDescription; + } + + //Getters + public final String getName() { + return ElementName; + } + + public final String getUsage() { + return ElementUsage; + } + + public String getHoverText() { + return getUsage(); + } + + public PHPElement() { + } + + public PHPElement(String Name, String Usage) { + setName(Name); + if ((Usage == null) || (Usage.equals(""))) { + setUsage(Name + " - "); + } else { + setUsage(Usage); + } + } + } diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPFunction.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPFunction.java index fe1e11e..be5fb49 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPFunction.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPFunction.java @@ -11,15 +11,19 @@ package net.sourceforge.phpeclipse.phpeditor.php; public class PHPFunction extends PHPElement { private String FunctionUsage; - public void setUsage(String Usage) { + public void setDescription(String Usage) { this.FunctionUsage = Usage; } - public String getUsage() { + public String getDescription() { return this.FunctionUsage; } + public String getHoverText() { + return super.getHoverText()+"\n\n"+getDescription(); + } + public PHPFunction(String Name, String Description, String Usage) { super(Name, Description); - setUsage(Usage); + setDescription(Usage); } } -- 1.7.1