From: jsimomaa Date: Thu, 4 Aug 2016 07:17:21 +0000 (+0000) Subject: refs #6626 X-Git-Tag: v1.28.0~11 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=563333146aa4e9d2d19a44e1a643870f66b92189;p=simantics%2Fr.git refs #6626 Some minor improvements to Simantics R Environment RUI and RDB shared libraries for generic R user interface git-svn-id: https://www.simantics.org/svn/simantics/r/trunk@33067 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.r.feature/build.properties b/org.simantics.r.feature/build.properties index 82ab19c..6d71501 100644 --- a/org.simantics.r.feature/build.properties +++ b/org.simantics.r.feature/build.properties @@ -1 +1,2 @@ bin.includes = feature.xml +root=rootfiles/ \ No newline at end of file diff --git a/org.simantics.r.feature/feature.xml b/org.simantics.r.feature/feature.xml index 73f3997..729149d 100644 --- a/org.simantics.r.feature/feature.xml +++ b/org.simantics.r.feature/feature.xml @@ -6,7 +6,7 @@ provider-name="Association for Decentralized Information Management in Industry THTH ry"> - SCL tooling for Simantics to enable the use of R statistical computing environment with Simantics through RServe. + SCL tooling for Simantics to enable the use of R statistical computing environment with Simantics through RServe. Allows R code evaluation and reading the R data model through the Simantics Variable interface. @@ -132,4 +132,11 @@ This Agreement is governed by the laws of the State of New York and the intellec version="0.0.0" unpack="false"/> + + diff --git a/org.simantics.r.feature/rootfiles/sharedlibraries/RDB.sharedLibrary b/org.simantics.r.feature/rootfiles/sharedlibraries/RDB.sharedLibrary new file mode 100644 index 0000000..2bb8854 Binary files /dev/null and b/org.simantics.r.feature/rootfiles/sharedlibraries/RDB.sharedLibrary differ diff --git a/org.simantics.r.feature/rootfiles/sharedlibraries/RStandardLibrary-1.2.sharedLibrary b/org.simantics.r.feature/rootfiles/sharedlibraries/RStandardLibrary-1.2.sharedLibrary new file mode 100644 index 0000000..27842d3 Binary files /dev/null and b/org.simantics.r.feature/rootfiles/sharedlibraries/RStandardLibrary-1.2.sharedLibrary differ diff --git a/org.simantics.r.feature/rootfiles/sharedlibraries/RUI.sharedLibrary b/org.simantics.r.feature/rootfiles/sharedlibraries/RUI.sharedLibrary new file mode 100644 index 0000000..7c87041 Binary files /dev/null and b/org.simantics.r.feature/rootfiles/sharedlibraries/RUI.sharedLibrary differ diff --git a/org.simantics.r.ontology/META-INF/MANIFEST.MF b/org.simantics.r.ontology/META-INF/MANIFEST.MF index 9db08a6..db09daf 100644 --- a/org.simantics.r.ontology/META-INF/MANIFEST.MF +++ b/org.simantics.r.ontology/META-INF/MANIFEST.MF @@ -7,6 +7,7 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Require-Bundle: org.simantics.layer0;bundle-version="1.1.0", org.simantics.simulation.ontology;bundle-version="1.1.0", org.simantics.selectionview.ontology;bundle-version="1.2.0", - org.simantics.selectionview.ui.ontology;bundle-version="1.1.0" + org.simantics.selectionview.ui.ontology;bundle-version="1.1.0", + org.simantics.modeling.ontology;bundle-version="1.2.0" Export-Package: org.simantics.r Bundle-Vendor: Association for Decentralized Information Management in Industry THTH ry diff --git a/org.simantics.r.ontology/graph.tg b/org.simantics.r.ontology/graph.tg index 132a3d2..3ad1a74 100644 Binary files a/org.simantics.r.ontology/graph.tg and b/org.simantics.r.ontology/graph.tg differ diff --git a/org.simantics.r.ontology/graph/R.pgraph b/org.simantics.r.ontology/graph/R.pgraph index cd441bc..2aa6093 100644 --- a/org.simantics.r.ontology/graph/R.pgraph +++ b/org.simantics.r.ontology/graph/R.pgraph @@ -2,6 +2,7 @@ L0 = SIMU = SEL = SEL_UI = +MOD = R = : L0.Ontology @L0.new @@ -24,10 +25,12 @@ R.TabContribution : SEL.TypedVariableTabContribution SEL.VariableTabContribution.HasView SEL_UI.StandardProperties SEL.VariableTabContribution.HasPriority 1 L0.HasLabel "Variables" - + +R.RProperty -- L0.PartOf --> R.SessionConfiguration - >-- R.Session.hasValue --> L0.Value -- R.Session.hasValue --> L0.Value -- R.Script.text --> L0.String () { + + @Override + public Resource perform(WriteGraph graph) throws DatabaseException { + RResource R = RResource.getInstance(graph); + String fileName = file.getFileName().toString(); + String[] parts = fileName.split("/"); + String modelName = parts[parts.length - 1]; + + Resource model = createModel(graph, R.Model, target, modelName, sclMainContents); + return model; + } + }); + } catch (DatabaseException e) { + e.printStackTrace(); + } + } + return null; + } +}