Browse Source

Added a function that creates the full name of the field (with its pointer and table indicators). Just for debugging purposes.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10381 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
Kae..pl 12 years ago
parent
commit
142905654f

+ 15 - 4
engine/src/blender/com/jme3/scene/plugins/blender/file/Field.java

@@ -276,10 +276,13 @@ class Field implements Cloneable {
             }
         }
     }
-
-    @Override
-    public String toString() {
-        StringBuilder result = new StringBuilder();
+    
+    /**
+     * This method builds the full name of the field (with function, pointer and table indications).
+     * @return the full name of the field
+     */
+    public String getFullName() {
+    	StringBuilder result = new StringBuilder();
         if (function) {
             result.append('(');
         }
@@ -295,6 +298,14 @@ class Field implements Cloneable {
         if (function) {
             result.append(")()");
         }
+        return result.toString();
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder result = new StringBuilder();
+        result.append(this.getFullName());
+
         //insert appropriate amount of spaces to format the output corrently
         int nameLength = result.length();
         result.append(' ');//at least one space is a must

+ 10 - 0
engine/src/blender/com/jme3/scene/plugins/blender/file/Structure.java

@@ -215,6 +215,16 @@ public class Structure implements Cloneable {
     public String getFieldName(int fieldIndex) {
         return fields[fieldIndex].name;
     }
+    
+    /**
+     * This method returns the full field name of the given index.
+     * @param fieldIndex
+     *        the index of the field
+     * @return the full field name of the given index
+     */
+    public String getFieldFullName(int fieldIndex) {
+        return fields[fieldIndex].getFullName();
+    }
 
     /**
      * This method returns the field type of the given index.