adds support for fields as well as local variables.
[cfb.git] / prod / net / jaekl / cfb / xml / LocalVariable.java
index 8043821844c89f0085292dae231058a6a5bce847..1a590ae7df6cbaa9ca2a9eabc81bec4bdda5cbcd 100644 (file)
@@ -9,7 +9,7 @@ import net.jaekl.qd.xml.MissingAttributeException;
 import net.jaekl.qd.xml.ParseResult;
 import net.jaekl.qd.xml.XmlParseException;
 
-public class LocalVariable extends ParseResult {
+public class LocalVariable extends ParseResult implements Variable {
 
        static final String TAG = "LocalVariable";
        static final String[] INTERNAL = { };
@@ -38,7 +38,21 @@ public class LocalVariable extends ParseResult {
        }
        
        public Long getId() { return m_id; }
+       
+       @Override
+       public String getDescription()
+       {
+               String result = getName();
+               if (null != getRole()) {
+                       result += " (" + getRole() + ")";
+               }
+               return result;
+       }
+       
+       @Override
        public String getName() { return m_name; }
+       
+       @Override
        public String getRole() { return m_role; }
        
        @Override