]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
Add documentation support to Xmile import / export
authorjkauttio <jkauttio@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Fri, 6 Mar 2015 14:41:49 +0000 (14:41 +0000)
committerjkauttio <jkauttio@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Fri, 6 Mar 2015 14:41:49 +0000 (14:41 +0000)
THIS IS VERY WORK IN PROGRESS AND NOT FUNCTIONAL AT THE MOMENT.

refs #5645

git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@31049 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.sysdyn/src/org/simantics/sysdyn/representation/expressions/Expression.java
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/expressions/IExpression.java

index 98c51a57b131363a11ce391a1cdfde7d33d96ccd..005af14c566efce978ceacbded5f00ea94be5861 100644 (file)
@@ -89,4 +89,12 @@ public abstract class Expression implements IExpression {
     public String getDocumentationExpression(ReadGraph graph) throws DatabaseException {\r
         return getEquation();\r
     }\r
+    \r
+    public String[] getArrayIndices() {\r
+       String tmp = range;\r
+       if (tmp.startsWith("[") && tmp.endsWith("]")) {\r
+               tmp = tmp.substring(1, tmp.length() - 1);\r
+       }\r
+       return tmp.split(",");\r
+    }\r
 }\r
index 58de03cc19a943b30ca3d3bf409fbbcd890c94f4..434aae852455fd6e3d1e1176a6293567a39d8d8b 100644 (file)
@@ -84,4 +84,6 @@ public interface IExpression {
      * @return\r
      */\r
     String getDocumentationExpression(ReadGraph graph) throws DatabaseException;\r
+    \r
+    String[] getArrayIndices();\r
 }\r