From 5383773763b86ec4cfa5f2842d271d48d0e0cca5 Mon Sep 17 00:00:00 2001 From: lempinen Date: Fri, 27 Apr 2012 06:36:15 +0000 Subject: [PATCH] Removed old OpenModelica 1.8.0 (refs #2925) git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@24827 ac1ea38d-2e2b-0410-8846-a27921b304fc --- .../src/org/simantics/modelica/ModelicaManager.java | 2 +- .../src/org/simantics/sysdyn/representation/Function.java | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/org.simantics.modelica/src/org/simantics/modelica/ModelicaManager.java b/org.simantics.modelica/src/org/simantics/modelica/ModelicaManager.java index e0a12318..6445ce40 100644 --- a/org.simantics.modelica/src/org/simantics/modelica/ModelicaManager.java +++ b/org.simantics.modelica/src/org/simantics/modelica/ModelicaManager.java @@ -106,7 +106,7 @@ public class ModelicaManager { if(entry != null) { URL fileURL = FileLocator.toFileURL(entry); File root = new File( URLDecoder.decode(fileURL.getPath(), "UTF-8") ); - File f = new File(root, "OpenModelica1.8.0"); + File f = new File(root, "OpenModelica1.8.1"); return f; } } diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Function.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Function.java index 59243839..7210ddc1 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Function.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Function.java @@ -59,9 +59,13 @@ public class Function { */ @UpdateMethod public boolean update(ReadGraph g, Resource r) throws DatabaseException { + hasTimeReference = false; + String code = g.getPossibleRelatedValue(r, SysdynResource.getInstance(g).SysdynModelicaFunction_modelicaFunctionCode); + if(code == null) + return true; + String[] elements = code.split("[\\+\\-\\*\\/\\(\\)\\[\\]\\{\\}=;\\s]"); - hasTimeReference = false; for(String element : elements) { if("time".equals(element)) { hasTimeReference = true; -- 2.47.1