import org.simantics.db.WriteGraph;\r
import org.simantics.db.common.request.WriteRequest;\r
import org.simantics.db.exception.DatabaseException;\r
-import org.simantics.sysdyn.modelImport.MdlParser2;\r
-import org.simantics.sysdyn.modelImport.model.Model2;\r
+import org.simantics.sysdyn.modelImport.MdlParser;\r
+import org.simantics.sysdyn.modelImport.model.Model;\r
import org.simantics.sysdyn.modelImport.model.WriteContext;\r
import org.simantics.sysdyn.ui.Activator;\r
import org.simantics.ui.SimanticsUI;\r
Activator.getDefault().getPreferenceStore().setValue(IMPORTMDLTPATH, (new File(selected)).getParent());\r
\r
// Convert Vensim model to Simantics SysDyn format using MdlParser\r
- final Model2 model = MdlParser2.parse(file);\r
+ final Model model = MdlParser.parse(file);\r
\r
SimanticsUI.getSession().asyncRequest(new WriteRequest() {\r
\r
import org.simantics.db.WriteGraph;\r
import org.simantics.db.common.request.WriteRequest;\r
import org.simantics.db.exception.DatabaseException;\r
-import org.simantics.sysdyn.modelImport.MdlParser2;\r
-import org.simantics.sysdyn.modelImport.model.Model2;\r
+import org.simantics.sysdyn.modelImport.MdlParser;\r
+import org.simantics.sysdyn.modelImport.model.Model;\r
import org.simantics.sysdyn.modelImport.model.WriteContext;\r
import org.simantics.ui.SimanticsUI;\r
\r
\r
File file = new File(selected);\r
\r
- final Model2 model = MdlParser2.parse(file);\r
+ final Model model = MdlParser.parse(file);\r
\r
SimanticsUI.getSession().asyncRequest(new WriteRequest() {\r
\r
import org.simantics.sysdyn.modelImport.mdl.SketchValve;\r
import org.simantics.sysdyn.modelImport.mdl.SketchVariable;\r
import org.simantics.sysdyn.modelImport.mdl.Subscript2;\r
-import org.simantics.sysdyn.modelImport.model.Model2;\r
+import org.simantics.sysdyn.modelImport.model.Model;\r
import org.simantics.sysdyn.modelImport.model.element.Auxiliary;\r
import org.simantics.sysdyn.modelImport.model.element.Cloud;\r
import org.simantics.sysdyn.modelImport.model.element.Comment;\r
import org.simantics.sysdyn.modelImport.model.expression.IntegralExpression;\r
import org.simantics.sysdyn.modelImport.model.support.Variable;\r
\r
-public class MdlParser2 {\r
+public class MdlParser {\r
\r
private static final String UTF_8 = "{UTF-8}";\r
private static final String SKETCH_VERSION = "V300";\r
private static final double H_SPACE = 0;\r
private static final double V_SPACE = 10;\r
\r
- public static Model2 parse(File file) {\r
+ public static Model parse(File file) {\r
// generate a mdl model based on the contents of the file\r
MdlModel mdl;\r
try {\r
}\r
\r
// generate a sysdyn model from the mdl model\r
- Model2 model = new Model2(file.getName());\r
+ Model model = new Model(file.getName());\r
\r
double offset = 0;\r
\r
import org.simantics.sysdyn.modelImport.model.support.Enumeration;\r
import org.simantics.sysdyn.utils.ModelUtils;\r
\r
-public class Model2 implements IWriteableObject {\r
+public class Model implements IWriteableObject {\r
\r
private String name;\r
// necessary simulation parameters\r
private ArrayList<Shadow> shadows;\r
private ArrayList<Connection> connections;\r
\r
- public Model2(String name) {\r
+ public Model(String name) {\r
this.name = name;\r
\r
enumerations = new HashMap<String, Enumeration>();\r