From 558c0e8604aadef30a9c60510dc41e872bb71e1a Mon Sep 17 00:00:00 2001 From: lehtonen Date: Mon, 10 Sep 2012 14:12:13 +0000 Subject: [PATCH] Merge until trunk@25704 to branches/simantics-1.7 on 2012-09-10. refs #3688 git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/branches@25705 ac1ea38d-2e2b-0410-8846-a27921b304fc --- .../META-INF/MANIFEST.MF | 2 +- .../graph.tg | Bin 8348 -> 8348 bytes .../graph/JFreeChart.pgraph | 12 +- .../META-INF/MANIFEST.MF | 3 +- .../simantics/modelica/ModelicaManager.java | 8 +- .../modelica/SimulationLocation.java | 5 + .../simantics/modelica/data/Mat4Reader.java | 2 +- .../modelica/reader/MatFileReader.java | 169 +++++++++------- .../org.simantics.sysdyn.ontology/graph.tg | Bin 66752 -> 66685 bytes .../graph/ChartViewpoints.pgraph | 14 +- .../graph/GeneralSymbols.pgraph | 6 +- .../graph/Profiles.pgraph | 6 +- .../graph/PropertyViewpoints.pgraph | 4 +- .../graph/Sysdyn.pgraph | 28 +-- .../graph/SysdynFunctions.pgraph | 2 +- .../graph/SysdynModelingViewpoint.pgraph | 20 +- .../graph/Validation.pgraph | 6 +- .../graph/VensimFunctions.pgraph | 2 +- .../graph/WorkModel.pgraph | 16 +- .../build/product.ant | 3 +- .../org.simantics.sysdyn.ui/adapters.xml | 2 +- .../sysdyn/ui/browser/SysdynBrowser.java | 4 +- .../sysdyn/ui/browser/SysdynModelBrowser.java | 2 +- .../newActions/NewModuleTypeAction.java | 76 +++++--- .../sysdyn/ui/browser/nodes/ModelNode.java | 2 +- .../ui/browser/nodes/ModuleTypeNode.java | 2 +- .../ui/editor/SysdynConnectionAdvisor.java | 19 +- .../sysdyn/ui/elements/connections/Arcs.java | 58 +++++- .../connections/DependencyEdgeClass.java | 3 +- .../elements/connections/DependencyNode.java | 78 +++++++- .../connections/FlowConnectionStyle.java | 1 - .../newComponents/NewModuleNodeHandler.java | 11 +- .../properties/widgets/ExpressionWidget.java | 18 +- .../expressions/AuxiliaryExpression.java | 21 ++ .../widgets/expressions/BasicExpression.java | 6 +- .../expressions/CompletionProcessor.java | 182 ++++++++++++++++++ .../expressions/ConstantExpression.java | 23 +++ .../widgets/expressions/DelayExpression.java | 10 +- .../widgets/expressions/EmptyExpression.java | 3 +- .../widgets/expressions/ExpressionField.java | 25 ++- .../ExpressionFieldConfiguration.java | 25 ++- .../widgets/expressions/IExpression.java | 3 +- .../widgets/expressions/LookupExpression.java | 3 +- .../expressions/ParameterExpression.java | 5 +- .../widgets/expressions/StockExpression.java | 5 +- .../expressions/WithLookupExpression.java | 8 +- .../widgets/functions/FunctionCodeWidget.java | 3 +- .../sysdyn/ui/utils/ExpressionUtils.java | 2 +- .../simantics/sysdyn/ui/utils/SheetUtils.java | 16 +- .../models/WizardModelsImportPage.java | 18 +- .../org.simantics.sysdyn/META-INF/MANIFEST.MF | 3 +- .../org.simantics.sysdyn/adapters.xml | 4 +- .../src/org/simantics/sysdyn/Functions.java | 6 +- .../sysdyn/adapter/IndexVariable.java | 2 +- .../expressionParser/ExpressionParser.java | 1 + .../expressionParser/ExpressionParser.jj | 2 +- .../sysdyn/refactoring/TGRefactoring.java | 91 +++++++++ .../sysdyn/refactoring/mappingSpec.txt | 38 ++++ .../simantics/sysdyn/representation/Book.java | 3 +- .../sysdyn/representation/Sheet.java | 3 +- 60 files changed, 855 insertions(+), 240 deletions(-) create mode 100644 simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/CompletionProcessor.java create mode 100644 simantics-1.7/org.simantics.sysdyn/src/org/simantics/sysdyn/refactoring/TGRefactoring.java create mode 100644 simantics-1.7/org.simantics.sysdyn/src/org/simantics/sysdyn/refactoring/mappingSpec.txt diff --git a/simantics-1.7/org.simantics.jfreechart.ontology/META-INF/MANIFEST.MF b/simantics-1.7/org.simantics.jfreechart.ontology/META-INF/MANIFEST.MF index c792a6a0..abb87370 100644 --- a/simantics-1.7/org.simantics.jfreechart.ontology/META-INF/MANIFEST.MF +++ b/simantics-1.7/org.simantics.jfreechart.ontology/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: JFreeChart Bundle-SymbolicName: org.simantics.jfreechart.ontology -Bundle-Version: 0.1.0.qualifier +Bundle-Version: 1.0.0.qualifier Require-Bundle: org.simantics.layer0, org.simantics.layer0x.ontology;bundle-version="1.0.0", org.simantics.g2d.ontology;bundle-version="1.0.0", diff --git a/simantics-1.7/org.simantics.jfreechart.ontology/graph.tg b/simantics-1.7/org.simantics.jfreechart.ontology/graph.tg index 261ca870640e92cd265999cb74957543789722bc..dd4f9f026fbfe31ebec9d47f0e1710959eb26639 100644 GIT binary patch delta 78 zcmbQ^ILC2AGo!8%0|Ns)BamR^3oa=tO)e=dO3cwU)B}k#fyKFe5-U@S41i*Wn>R2< YGcg)X=3!A~G~8^&;>Ql88o8xK0k$;}ApigX delta 78 zcmbQ^ILC2AGo!8{0|Ns)BamR^3oa=tO)e=dO3cwU)H47IF@eRod=e{DiwrR2< YGcg)Y=3!A~G}vs!;>Ql88o8xK0ku;R8UO$Q diff --git a/simantics-1.7/org.simantics.jfreechart.ontology/graph/JFreeChart.pgraph b/simantics-1.7/org.simantics.jfreechart.ontology/graph/JFreeChart.pgraph index 01933123..0b9fdbb1 100644 --- a/simantics-1.7/org.simantics.jfreechart.ontology/graph/JFreeChart.pgraph +++ b/simantics-1.7/org.simantics.jfreechart.ontology/graph/JFreeChart.pgraph @@ -1,9 +1,9 @@ -L0 = -L0X = -G2D = -DIA = -MOD = -STR = +L0 = +L0X = +G2D = +DIA = +MOD = +STR = //##################################################################### // Ontology for defining JFreeChart charts diff --git a/simantics-1.7/org.simantics.modelica/META-INF/MANIFEST.MF b/simantics-1.7/org.simantics.modelica/META-INF/MANIFEST.MF index a3c07a6a..7fd8c199 100644 --- a/simantics-1.7/org.simantics.modelica/META-INF/MANIFEST.MF +++ b/simantics-1.7/org.simantics.modelica/META-INF/MANIFEST.MF @@ -9,7 +9,8 @@ Require-Bundle: gnu.trove2;bundle-version="2.0.4", org.eclipse.core.runtime;bundle-version="3.6.0", org.simantics.history;bundle-version="1.0.0", org.simantics.databoard;bundle-version="0.6.3", - org.simantics.utils;bundle-version="1.1.0" + org.simantics.utils;bundle-version="1.1.0", + org.simantics.utils.datastructures;bundle-version="1.1.0" Export-Package: org.simantics.modelica, org.simantics.modelica.data, org.simantics.modelica.fmi, diff --git a/simantics-1.7/org.simantics.modelica/src/org/simantics/modelica/ModelicaManager.java b/simantics-1.7/org.simantics.modelica/src/org/simantics/modelica/ModelicaManager.java index 6445ce40..ff8170ad 100644 --- a/simantics-1.7/org.simantics.modelica/src/org/simantics/modelica/ModelicaManager.java +++ b/simantics-1.7/org.simantics.modelica/src/org/simantics/modelica/ModelicaManager.java @@ -318,7 +318,9 @@ public class ModelicaManager { try { // Find OMC - File openModelicaHome = getModelicaHome(); + File openModelicaHome = simulationLocation.omcHome; + if (openModelicaHome == null) + openModelicaHome = getModelicaHome(); // Create the build process ProcessBuilder processBuilder = new ProcessBuilder( @@ -384,7 +386,9 @@ public class ModelicaManager { // Set environment variables for the process Map env = processBuilder.environment(); - File openModelicaHome = getModelicaHome(); + File openModelicaHome = simulationLocation.omcHome; + if (openModelicaHome == null) + openModelicaHome = getModelicaHome(); env.put("OPENMODELICAHOME", openModelicaHome.getAbsolutePath()); env.put("OPENMODELICALIBRARY", openModelicaHome.getAbsolutePath() + "\\lib\\omlibrary"); env.put("OMPATH", openModelicaHome.getAbsolutePath() + "\\bin"); diff --git a/simantics-1.7/org.simantics.modelica/src/org/simantics/modelica/SimulationLocation.java b/simantics-1.7/org.simantics.modelica/src/org/simantics/modelica/SimulationLocation.java index c00bc77e..696d2e01 100644 --- a/simantics-1.7/org.simantics.modelica/src/org/simantics/modelica/SimulationLocation.java +++ b/simantics-1.7/org.simantics.modelica/src/org/simantics/modelica/SimulationLocation.java @@ -24,6 +24,7 @@ public class SimulationLocation { public File outputFile; public File initFile; public File simulatorFile; + public File omcHome; public SimulationLocation(File simulationDir, File inputFile, File outputFile, File initFile, File exeFile) { @@ -33,4 +34,8 @@ public class SimulationLocation { this.initFile = initFile; this.simulatorFile = exeFile; } + + public void setOMCHomeFolder(File omcHome) { + this.omcHome = omcHome; + } } \ No newline at end of file diff --git a/simantics-1.7/org.simantics.modelica/src/org/simantics/modelica/data/Mat4Reader.java b/simantics-1.7/org.simantics.modelica/src/org/simantics/modelica/data/Mat4Reader.java index ceafe6b0..0ed50f52 100644 --- a/simantics-1.7/org.simantics.modelica/src/org/simantics/modelica/data/Mat4Reader.java +++ b/simantics-1.7/org.simantics.modelica/src/org/simantics/modelica/data/Mat4Reader.java @@ -142,7 +142,7 @@ public class Mat4Reader { int size = values.columns % outputInterval != 0 ? values.columns / outputInterval + 1 : values.columns; double[] v = new double[size]; int sc = infoData[i*4+1]; - int c = sc > 0 ? sc-1 : 1-sc; + int c = sc > 0 ? sc-1 : -sc-1; //System.out.println("i=" + i + ", sc=" + sc + ", c=" + c); for(int j=0;j indices = new HashMap(); - int readBytes = 0; // tracking read data - int dataMark = 0; // mark for actual data + long readBytes = 0; // tracking read data + long dataMark = 0; // mark for actual data IntMatrix info; int[] infoData; @@ -51,7 +54,7 @@ public class MatFileReader implements ResultFileReader { Integer index = indices.get(item); if (index == null) throw new IOException("Unknown item: " + item); - InputStream in = new FileInputStream(file); + InputStream in = openStream(); skip(dataMark, in); Object data = readRow(dataHeader, index, in); @@ -76,7 +79,7 @@ public class MatFileReader implements ResultFileReader { Integer index = indices.get(item); if (index == null) throw new IOException("Unknown item: " + item); - InputStream in = new FileInputStream(file); + InputStream in = openStream(); skip(dataMark, in); Object data = readRow(dataHeader, index, start, count, skip, in); @@ -97,7 +100,7 @@ public class MatFileReader implements ResultFileReader { indexes.add(index); } - InputStream in = new FileInputStream(file); + InputStream in = openStream(); skip(dataMark, in); @@ -110,6 +113,10 @@ public class MatFileReader implements ResultFileReader { } + private InputStream openStream() throws FileNotFoundException { + return new BufferedInputStream(new FileInputStream(file)); + } + @Override public double[][] readData(List items, int start, int count, int skip) throws IOException { @@ -123,7 +130,7 @@ public class MatFileReader implements ResultFileReader { indexes.add(index); } - InputStream in = new FileInputStream(file); + InputStream in = openStream(); skip(dataMark, in); @@ -137,7 +144,7 @@ public class MatFileReader implements ResultFileReader { private void readVariables() throws IOException { - InputStream in = new FileInputStream(file); + InputStream in = openStream(); readMatrix(in); // Header StringMatrix names = (StringMatrix)readMatrix(in); // Variable names readMatrix(in); // Variable descriptions @@ -306,7 +313,7 @@ public class MatFileReader implements ResultFileReader { int rows = header.rows; double[] v = new double[size]; int sc = infoData[column * 4 + 1]; - int c = sc > 0 ? sc-1 : 1-sc; + int c = sc > 0 ? sc-1 : -sc-1; @@ -338,11 +345,11 @@ public class MatFileReader implements ResultFileReader { int rows = header.rows; double[] v = new double[count]; int sc = infoData[row * 4 + 1]; - int c = sc > 0 ? sc-1 : 1-sc; + long c = sc > 0 ? sc-1 : -sc-1; - skip((c+start*rows) * 8, in); + skip((c+((long)start*(long)rows)) * 8L, in); for (int j = 0; j < v.length; ++j) { double d = getDouble(in); @@ -359,9 +366,6 @@ public class MatFileReader implements ResultFileReader { private double[][] readRows(MatrixHeader header, List unSortedRows, InputStream in)throws IOException { - - ; - if (header.type != 0) throw new IOException("Only double type supported"); for (int row : unSortedRows) @@ -374,34 +378,42 @@ public class MatFileReader implements ResultFileReader { double vs[][] = new double[unSortedRows.size()][]; for (int i = 0; i < unSortedRows.size(); i++) { int row = unSortedRows.get(i); - vs[i] = new double[size]; + //vs[i] = new double[size]; usc[i] = infoData[row * 4 + 1]; - uc[i] = usc[i] > 0 ? usc[i]-1 : 1-usc[i]; + uc[i] = usc[i] > 0 ? usc[i]-1 : -usc[i]-1; } - Map cToRow = new HashMap(); + //Map cToRow = new HashMap(); + MapList cToRow = new MapList(); List sortedCs = new ArrayList(); for (int i = 0; i < unSortedRows.size(); i++) { - cToRow.put(uc[i], unSortedRows.get(i)); + //cToRow.put(uc[i], unSortedRows.get(i)); + cToRow.add(uc[i], unSortedRows.get(i)); sortedCs.add(uc[i]); } List sortedRows = new ArrayList(); - int sc[] = new int[unSortedRows.size()]; - int c[] = new int[unSortedRows.size()]; +// int sc[] = new int[unSortedRows.size()]; +// int c[] = new int[unSortedRows.size()]; + int sc[] = new int[sortedCs.size()]; + int c[] = new int[sortedCs.size()]; Collections.sort(sortedCs); - for (int i = 0; i < unSortedRows.size(); i++) { - int row = cToRow.get(sortedCs.get(i)); + + //for (int i = 0; i < unSortedRows.size(); i++) { + for (int i = 0; i < sortedCs.size(); i++) { + //int row = cToRow.get(sortedCs.get(i)); + int row = cToRow.getValues(sortedCs.get(i)).get(0); sortedRows.add(row); sc[i] = usc[unSortedRows.indexOf(row)]; c[i] = uc[unSortedRows.indexOf(row)]; + vs[i] = new double[size]; } - skip(c[0] * 8, in); + skip((long)c[0] * 8L, in); for (int j = 0; j < size; ++j) { for (int index = 0; index < sortedRows.size(); index++) { @@ -424,16 +436,37 @@ public class MatFileReader implements ResultFileReader { vs[i][j] = -vs[i][j]; } - for (int i = 0; i < sortedRows.size(); i++) { - int row = sortedRows.get(i); +// for (int i = 0; i < sortedRows.size(); i++) { +// int row = sortedRows.get(i); +// int rRow = unSortedRows.get(i); +// if (row != rRow) { +// int ri = sortedRows.indexOf(rRow); +// double v[] = vs[i]; +// vs[i] = vs[ri]; +// vs[ri] = v; +// sortedRows.set(i, rRow); +// sortedRows.set(ri, row); +// } +// } + for (int i = 0; i < unSortedRows.size(); i++) { int rRow = unSortedRows.get(i); - if (row != rRow) { - int ri = sortedRows.indexOf(rRow); - double v[] = vs[i]; + + if (i < sortedRows.size()) { + int row = sortedRows.get(i); + if (row != rRow) { + int ri = sortedRows.indexOf(rRow); + double v[] = vs[i]; + vs[i] = vs[ri]; + vs[ri] = v; + sortedRows.set(i, rRow); + sortedRows.set(ri, row); + + } + } else { + int uci = uc[i]; + int row = cToRow.getValues(uci).get(0); + int ri = sortedRows.indexOf(row); vs[i] = vs[ri]; - vs[ri] = v; - sortedRows.set(i, rRow); - sortedRows.set(ri, row); } } @@ -465,47 +498,44 @@ public class MatFileReader implements ResultFileReader { double vs[][] = new double[unSortedRows.size()][]; for (int i = 0; i < unSortedRows.size(); i++) { int row = unSortedRows.get(i); - vs[i] = new double[count]; + //vs[i] = new double[count]; usc[i] = infoData[row * 4 + 1]; - uc[i] = usc[i] > 0 ? usc[i]-1 : 1-usc[i]; + uc[i] = usc[i] > 0 ? usc[i]-1 : -usc[i]-1; } - Map cToRow = new HashMap(); + //Map cToRow = new HashMap(); + MapList cToRow = new MapList(); List sortedCs = new ArrayList(); for (int i = 0; i < unSortedRows.size(); i++) { - cToRow.put(uc[i], unSortedRows.get(i)); - sortedCs.add(uc[i]); + //cToRow.put(uc[i], unSortedRows.get(i)); + cToRow.add(uc[i], unSortedRows.get(i)); + if (!sortedCs.contains(uc[i])) + sortedCs.add(uc[i]); } List sortedRows = new ArrayList(); - int sc[] = new int[unSortedRows.size()]; - int c[] = new int[unSortedRows.size()]; +// int sc[] = new int[unSortedRows.size()]; +// int c[] = new int[unSortedRows.size()]; + int sc[] = new int[sortedCs.size()]; + int c[] = new int[sortedCs.size()]; Collections.sort(sortedCs); - for (int i = 0; i < unSortedRows.size(); i++) { - int row = cToRow.get(sortedCs.get(i)); + //for (int i = 0; i < unSortedRows.size(); i++) { + for (int i = 0; i < sortedCs.size(); i++) { + //int row = cToRow.get(sortedCs.get(i)); + int row = cToRow.getValues(sortedCs.get(i)).get(0); sortedRows.add(row); sc[i] = usc[unSortedRows.indexOf(row)]; c[i] = uc[unSortedRows.indexOf(row)]; + vs[i] = new double[count]; } -// skip((c+start*rows) * 8, in); -// for (int j = 0; j < v.length; ++j) { -// -// double d = getDouble(in); -// v[j] = d; -// skip((rows*skip + rows-1)*8,in); -// } -// -// -// if(sc < 0) -// for(int j=0;j&#ma?Y6G zK+ZV_6AdOu116gcCYqcxeD8azPW9=M%;jF+`~7wGJcI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b2o55L-)Z`&*f1d86B*iwt@x47(qpw%>w>8xE~)zlxsLe z#j624>(7+W_K|96;^lbGuTST7aW;4tBwrnuPcKBIkS~?QrEh6uu(n`8<=S3o<^hn4 zbE_@$K{F4(@F{PlY*RAR!}u;CQcV+Wrq{?=LpH<64;O7YtPA2J&0`hRkwZ^EI=2;L zU-j^PENX%Cl&QR7OoR-GFw`_PaEB*}F&w_&b;xwRDSKK@tk!-E=5n>sz}qJqyEdN$tzSCk7(s>&ijmlvgjv?>T|AOG3CgNf41(oU8zI0dh on|pOtg1Ol8(la=kum6BRy|vG~cnTv|vD791L}MyXrgZcF2bTHf6951J diff --git a/simantics-1.7/org.simantics.sysdyn.ontology/graph/ChartViewpoints.pgraph b/simantics-1.7/org.simantics.sysdyn.ontology/graph/ChartViewpoints.pgraph index a0d99b4b..6c8ab37b 100644 --- a/simantics-1.7/org.simantics.sysdyn.ontology/graph/ChartViewpoints.pgraph +++ b/simantics-1.7/org.simantics.sysdyn.ontology/graph/ChartViewpoints.pgraph @@ -1,10 +1,10 @@ -L0 = -VP = -PROJECT = -MOD = -IMAGE = -COLOR = -ACT = +L0 = +VP = +PROJECT = +MOD = +IMAGE = +COLOR = +ACT = JFREE = SYSDYN = diff --git a/simantics-1.7/org.simantics.sysdyn.ontology/graph/GeneralSymbols.pgraph b/simantics-1.7/org.simantics.sysdyn.ontology/graph/GeneralSymbols.pgraph index 74b383a7..0f6a24a3 100644 --- a/simantics-1.7/org.simantics.sysdyn.ontology/graph/GeneralSymbols.pgraph +++ b/simantics-1.7/org.simantics.sysdyn.ontology/graph/GeneralSymbols.pgraph @@ -1,6 +1,6 @@ -L0 = -G2D = -DIA = +L0 = +G2D = +DIA = SYSDYN = GENERAL = SYSDYN.SymbolReferences.GeneralSymbols : DIA.SymbolReferenceLibrary diff --git a/simantics-1.7/org.simantics.sysdyn.ontology/graph/Profiles.pgraph b/simantics-1.7/org.simantics.sysdyn.ontology/graph/Profiles.pgraph index 45a75dfc..fc537461 100644 --- a/simantics-1.7/org.simantics.sysdyn.ontology/graph/Profiles.pgraph +++ b/simantics-1.7/org.simantics.sysdyn.ontology/graph/Profiles.pgraph @@ -1,6 +1,6 @@ -L0 = -L0X = -DIA = +L0 = +L0X = +DIA = SYSDYN = PROFILES = SYSDYN.Profiles : L0.Library diff --git a/simantics-1.7/org.simantics.sysdyn.ontology/graph/PropertyViewpoints.pgraph b/simantics-1.7/org.simantics.sysdyn.ontology/graph/PropertyViewpoints.pgraph index e4bc5db4..c7d1d53b 100644 --- a/simantics-1.7/org.simantics.sysdyn.ontology/graph/PropertyViewpoints.pgraph +++ b/simantics-1.7/org.simantics.sysdyn.ontology/graph/PropertyViewpoints.pgraph @@ -1,5 +1,5 @@ -L0 = -VP = +L0 = +VP = SYSDYN = ///////////////////////////////// diff --git a/simantics-1.7/org.simantics.sysdyn.ontology/graph/Sysdyn.pgraph b/simantics-1.7/org.simantics.sysdyn.ontology/graph/Sysdyn.pgraph index e3f629d7..56e6f916 100644 --- a/simantics-1.7/org.simantics.sysdyn.ontology/graph/Sysdyn.pgraph +++ b/simantics-1.7/org.simantics.sysdyn.ontology/graph/Sysdyn.pgraph @@ -1,13 +1,13 @@ -L0 = -L0X = -G2D = -STR = -DIA = -SIMU = -MOD = -PROJ = +L0 = +L0X = +G2D = +STR = +DIA = +SIMU = +MOD = +PROJ = JFREE = -SHEET = +SHEET = //##################################################################### // Defines ontology and attaches it to SimanticsDomain @@ -21,9 +21,9 @@ SYSDYN.ImportedOntologies : PROJ.NamespaceRequirement L0.HasDescription "Specifies the ontologies required by a Sysdyn project." PROJ.RequiresNamespace "http://www.simantics.org/Sysdyn-1.1" : L0.URI - "http://www.simantics.org/Layer0-1.0" : L0.URI - "http://www.simantics.org/Documentation-1.0" : L0.URI // Experimental documentation tool - "http://www.simantics.org/SelectionView-1.1" : L0.URI + "http://www.simantics.org/Layer0-1.1" : L0.URI +// "http://www.simantics.org/Documentation-1.1" : L0.URI // Experimental documentation tool + "http://www.simantics.org/SelectionView-1.2" : L0.URI SYSDYN.SharedFunctionOntology -- SYSDYN.Variable.type --> L0.String -- SYSDYN.Variable.expressions --> SYSDYN.Expressions -- SYSDYN.Variable.arrayIndexes --> SYSDYN.ArrayIndexes -- SYSDYN.Variable.expressions --> SYSDYN.Expressions -- SYSDYN.Variable.arrayIndexes --> SYSDYN.ArrayIndexes -- SYSDYN.Variable.unit --> L0.String -- SYSDYN.Variable.variability --> L0.String -- SYSDYN.Variable.isTailOf --> STR.Connection +L0 = SYSDYN = FL = : SYSDYN.SysdynModelicaFunctionLibrary diff --git a/simantics-1.7/org.simantics.sysdyn.ontology/graph/SysdynModelingViewpoint.pgraph b/simantics-1.7/org.simantics.sysdyn.ontology/graph/SysdynModelingViewpoint.pgraph index 7836ac25..8267cfa4 100644 --- a/simantics-1.7/org.simantics.sysdyn.ontology/graph/SysdynModelingViewpoint.pgraph +++ b/simantics-1.7/org.simantics.sysdyn.ontology/graph/SysdynModelingViewpoint.pgraph @@ -1,14 +1,14 @@ -L0 = -VP = -SIMU = -PROJECT = -IMAGE = -ACT = -MOD = -STR = +L0 = +VP = +SIMU = +PROJECT = +IMAGE = +ACT = +MOD = +STR = SYSDYN = -SILK = -SHEET = +SILK = +SHEET = JFREE = diff --git a/simantics-1.7/org.simantics.sysdyn.ontology/graph/Validation.pgraph b/simantics-1.7/org.simantics.sysdyn.ontology/graph/Validation.pgraph index b44e5754..7aac4bab 100644 --- a/simantics-1.7/org.simantics.sysdyn.ontology/graph/Validation.pgraph +++ b/simantics-1.7/org.simantics.sysdyn.ontology/graph/Validation.pgraph @@ -1,6 +1,6 @@ -L0 = -L0X = -ISSUE = +L0 = +L0X = +ISSUE = SYSDYN = VALIDATIONS = SYSDYN.Validations : L0.Library diff --git a/simantics-1.7/org.simantics.sysdyn.ontology/graph/VensimFunctions.pgraph b/simantics-1.7/org.simantics.sysdyn.ontology/graph/VensimFunctions.pgraph index ee392f50..3e097bc5 100644 --- a/simantics-1.7/org.simantics.sysdyn.ontology/graph/VensimFunctions.pgraph +++ b/simantics-1.7/org.simantics.sysdyn.ontology/graph/VensimFunctions.pgraph @@ -1,5 +1,5 @@ -L0 = +L0 = SYSDYN = VF = : SYSDYN.SysdynModelicaFunctionLibrary diff --git a/simantics-1.7/org.simantics.sysdyn.ontology/graph/WorkModel.pgraph b/simantics-1.7/org.simantics.sysdyn.ontology/graph/WorkModel.pgraph index 6205b847..de9d0ea7 100644 --- a/simantics-1.7/org.simantics.sysdyn.ontology/graph/WorkModel.pgraph +++ b/simantics-1.7/org.simantics.sysdyn.ontology/graph/WorkModel.pgraph @@ -1,12 +1,12 @@ -L0 = -L0X = -G2D = -STR = -DIA = -SIMU = -MOD = +L0 = +L0X = +G2D = +STR = +DIA = +SIMU = +MOD = SYSDYN = -PROJ = +PROJ = //###################################################################### //# Example work model with two modules diff --git a/simantics-1.7/org.simantics.sysdyn.product.site.feature/build/product.ant b/simantics-1.7/org.simantics.sysdyn.product.site.feature/build/product.ant index 77b45fc6..9dd09c8c 100644 --- a/simantics-1.7/org.simantics.sysdyn.product.site.feature/build/product.ant +++ b/simantics-1.7/org.simantics.sysdyn.product.site.feature/build/product.ant @@ -30,6 +30,7 @@ + @@ -43,8 +44,6 @@ - - \ No newline at end of file diff --git a/simantics-1.7/org.simantics.sysdyn.ui/adapters.xml b/simantics-1.7/org.simantics.sysdyn.ui/adapters.xml index 89d50f37..e5efdca7 100644 --- a/simantics-1.7/org.simantics.sysdyn.ui/adapters.xml +++ b/simantics-1.7/org.simantics.sysdyn.ui/adapters.xml @@ -10,5 +10,5 @@ VTT Technical Research Centre of Finland - initial API and implementation --> - none 0 fill 1 + none 0 fill 1 \ No newline at end of file diff --git a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/SysdynBrowser.java b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/SysdynBrowser.java index 283655d9..754cd3b6 100644 --- a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/SysdynBrowser.java +++ b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/SysdynBrowser.java @@ -42,8 +42,8 @@ public class SysdynBrowser extends GraphExplorerView { "http://www.simantics.org/Sysdyn-1.1/Browser", /*"http://www.simantics.org/Operating-1.1/Browser", * Operating interfaces are not functioning properly. They have not been maintained. */ - "http://www.simantics.org/Documentation-1.0/OldBrowser", - "http://www.simantics.org/Image-1.0/Browser")); + "http://www.simantics.org/Documentation-1.1/OldBrowser", + "http://www.simantics.org/Image-1.1/Browser")); private BinaryFunction selectionTransformation = new BinaryFunction() { diff --git a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/SysdynModelBrowser.java b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/SysdynModelBrowser.java index 00115826..b2e0e0e2 100644 --- a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/SysdynModelBrowser.java +++ b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/SysdynModelBrowser.java @@ -28,7 +28,7 @@ import org.simantics.ui.workbench.IPropertyPage; */ public class SysdynModelBrowser extends ModelBrowser2 { - final private Set browseContexts = new HashSet(Arrays.asList(SysdynResource.URIs.ModelingBrowseContext, "http://www.simantics.org/Operating-1.1/Browser", "http://www.simantics.org/Image-1.0/Browser")); + final private Set browseContexts = new HashSet(Arrays.asList(SysdynResource.URIs.ModelingBrowseContext, "http://www.simantics.org/Operating-1.1/Browser", "http://www.simantics.org/Image-1.1/Browser")); @Override protected IPropertyPage getPropertyPage() { diff --git a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewModuleTypeAction.java b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewModuleTypeAction.java index 8b400bde..0bc57509 100644 --- a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewModuleTypeAction.java +++ b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewModuleTypeAction.java @@ -41,12 +41,12 @@ public class NewModuleTypeAction implements ActionFactory{ if(!(target instanceof Resource)) return null; final Resource model = (Resource)target; - + return new Runnable() { @Override public void run() { SimanticsUI.getSession().asyncRequest(new WriteRequest() { - + @Override public void perform(WriteGraph g) throws DatabaseException { SysdynResource sr = SysdynResource.getInstance(g); @@ -54,83 +54,109 @@ public class NewModuleTypeAction implements ActionFactory{ Layer0X L0X = Layer0X.getInstance(g); ModelingResources mr = ModelingResources.getInstance(g); StructuralResource2 sr2 = StructuralResource2.getInstance(g); - + String name = NameUtils.findFreshName(g, "ModuleType", model, l0.ConsistsOf, "%s%d"); - + Resource moduleType = g.newResource(); g.claimLiteral(moduleType, l0.HasName, name); g.claim(moduleType, l0.Inherits, sr.Module); g.claim(moduleType, l0.PartOf, model); - - - + + + Resource configuration = GraphUtils.create2(g, sr.Configuration, l0.HasName, name + "Configuration", l0.PartOf, moduleType); - + g.claim(moduleType, sr2.IsDefinedBy , configuration); - + Resource diagram = g.newResource(); g.adapt(sr.ConfigurationDiagramTemplate, Template.class).apply(g, ArrayMap .keys("", "diagram", "name") .values(configuration, diagram, "Diagrammi") - ); - - + ); + + // Remove default mapping and add sysdyn mapping for(Resource trigger : g.getObjects(diagram, L0X.HasTrigger)) { if(g.isInstanceOf(trigger, mr.DiagramToCompositeMapping)) { g.deny(diagram, L0X.HasTrigger, trigger); } } - + GraphUtils.create2(g, sr.Validations_Dependencies_MissingDependencyConnectionsIssueSource, L0X.IsActivatedBy, model, l0.PartOf, moduleType ); - + GraphUtils.create2(g, sr.Validations_Dependencies_DependencyConnectionsIssueSource, L0X.IsActivatedBy, model, l0.PartOf, moduleType ); - + GraphUtils.create2(g, sr.Validations_Expressions_ExpressionIssueSource, L0X.IsActivatedBy, model, l0.PartOf, moduleType ); - + Resource mapping = g.newResource(); g.claim(mapping, l0.InstanceOf, null, sr.DiagramToCompositeMapping); g.claim(diagram, L0X.HasTrigger, mapping); - + Resource moduleSymbol = g.newResource(); g.claimLiteral(moduleSymbol, l0.HasName, name + " Symbol"); g.claimLiteral(moduleSymbol, l0.HasLabel, name + " Symbol"); g.claim(moduleSymbol, l0.Inherits, sr.ModuleSymbol); g.claim(moduleSymbol, mr.SymbolToComponentType, moduleType); g.claim(moduleSymbol, l0.PartOf, moduleType); - + Resource terminal = g.newResource(); g.claim(terminal, l0.InstanceOf, sr.SysdynTerminal); - DiagramGraphUtil.addConnectionPoint(g, moduleSymbol, terminal, sr.IsHeadOfTerminal); - + Resource relation = createTerminalRelation(g, moduleSymbol, sr.IsHeadOfTerminal, sr.Variable_isHeadOf); + DiagramGraphUtil.addConnectionPoint(g, moduleSymbol, terminal, relation); + Resource terminal2 = g.newResource(); g.claim(terminal2, l0.InstanceOf, sr.SysdynTerminal); - DiagramGraphUtil.addConnectionPoint(g, moduleSymbol, terminal2, sr.IsTailOfTerminal); - + relation = createTerminalRelation(g, moduleSymbol, sr.IsTailOfTerminal, sr.Variable_isTailOf); + DiagramGraphUtil.addConnectionPoint(g, moduleSymbol, terminal2, relation); + g.claim(moduleSymbol, sr2.IsDefinedBy, OrderedSetUtils.create(g, sr2.Composite, terminal, terminal2)); - - - + + + } }); } }; } + public static Resource createTerminalRelation(WriteGraph graph, Resource symbol, Resource connectionRelation, Resource configurationRelation) throws DatabaseException { + StructuralResource2 STR = StructuralResource2.getInstance(graph); + ModelingResources MOD = ModelingResources.getInstance(graph); + Layer0 L0 = Layer0.getInstance(graph); + + + Resource terminalRelation = null; + terminalRelation = GraphUtils.create(graph, + MOD.DiagramConnectionRelationToConnectionRelation, configurationRelation, + L0.PartOf, symbol, + L0.HasName, NameUtils.getSafeName(graph, connectionRelation) + ); + + graph.claim(terminalRelation, L0.SubrelationOf, null, connectionRelation); + Resource inverse = GraphUtils.create(graph, + L0.PartOf, terminalRelation, + L0.HasName, "Inverse"); + + graph.claim(inverse, L0.SubrelationOf, null, STR.Connects); + graph.claim(terminalRelation, L0.InverseOf, inverse); + + return terminalRelation; + } + } diff --git a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/ModelNode.java b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/ModelNode.java index 0c77fa90..2652d552 100644 --- a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/ModelNode.java +++ b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/ModelNode.java @@ -75,7 +75,7 @@ public class ModelNode extends AbstractNode implements IDoubleClickabl @Override public String perform(ReadGraph graph) throws DatabaseException { - return graph.getRelatedValue(data, Layer0.getInstance(graph).HasLabel); + return graph.getPossibleRelatedValue(data, Layer0.getInstance(graph).HasLabel); } }, configurationNameSynchronizer); diff --git a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/ModuleTypeNode.java b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/ModuleTypeNode.java index ec6e58f7..a10c7c1f 100644 --- a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/ModuleTypeNode.java +++ b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/ModuleTypeNode.java @@ -168,7 +168,7 @@ public class ModuleTypeNode extends AbstractNode implements IDeletable IssueResource ISSUE = IssueResource.getInstance(graph); // Remove issues - for(Resource issueSource : graph.syncRequest(new ObjectsWithType(type, l0.ConsistsOf, ISSUE.DependencyIssueSource))) { + for(Resource issueSource : graph.syncRequest(new ObjectsWithType(type, l0.ConsistsOf, ISSUE.Sources_DependencyTracker))) { for(Resource issue : graph.syncRequest(new ObjectsWithType(issueSource, ISSUE.IssueSource_Manages, ISSUE.Issue))) { RemoverUtil.remove(graph, issue); } diff --git a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/SysdynConnectionAdvisor.java b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/SysdynConnectionAdvisor.java index 81e70e1f..ffcfd38e 100644 --- a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/SysdynConnectionAdvisor.java +++ b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/SysdynConnectionAdvisor.java @@ -79,19 +79,26 @@ public class SysdynConnectionAdvisor implements IConnectionAdvisor { if(element1 != null && term1 != null && element2 != null && term2 != null) { StaticObjectAdapter soa = element1.getElementClass().getSingleItem(StaticObjectAdapter.class); Resource startElementResource = soa.adapt(Resource.class); - soa = element2.getElementClass().getSingleItem(StaticObjectAdapter.class); - Resource endElementResource = soa.adapt(Resource.class); + Object r = ElementUtils.getObject(element2); + if(r == null || !(r instanceof Resource)) + return null; + Resource endElementResource = (Resource) r; DiagramResource dr = DiagramResource.getInstance(g); Resource terminal2 = ((ResourceTerminal) term2).getResource(); SysdynResource sr = SysdynResource.getInstance(g); + + + // Chech that end terminal has IsHeadOfTerminal relation + Resource connectionPoint = g.getPossibleObject(terminal2, dr.HasConnectionPoint); + if(connectionPoint == null || !g.isSubrelationOf(connectionPoint, sr.IsHeadOfTerminal)) { + return null; + } - if(!g.hasStatement(terminal2, dr.HasConnectionPoint, sr.IsHeadOfTerminal)) { - return null; - } + // If end element is input symbol, allow only one connection and only from a module if(g.isInstanceOf(endElementResource, sr.InputSymbol)) { - if(g.isInheritedFrom(startElementResource, sr.ModuleSymbol)) return null; + if(!g.isInheritedFrom(startElementResource, sr.ModuleSymbol)) return null; if(g.getObjects(endElementResource, sr.IsHeadOfTerminal).size() > 0) return null; } diff --git a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/connections/Arcs.java b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/connections/Arcs.java index 51d4240f..f9768fed 100644 --- a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/connections/Arcs.java +++ b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/connections/Arcs.java @@ -192,14 +192,15 @@ public class Arcs { double dy = y-cy; double dist = dx*dx + dy*dy; -// System.out.println("HitTest: x0=" + x0 + " y0=" + y0 + " y=" + y + " x=" + x + " dist=" + dist + " r2=" + r*r); + //System.out.println("HitTest: x0=" + x0 + " y0=" + y0 + " y=" + y + " x=" + x + " dist=" + dist + " r2=" + r*r); - if(dist < (r+tolerance)*(r+tolerance) && - dist > (r-tolerance)*(r-tolerance)) { + double tolerance2 = tolerance * tolerance; + if(dist < (r+tolerance2)*(r+tolerance2) && + dist > (r-tolerance2)*(r-tolerance2)) { double ang = Arcs.normalizeAngle(Math.atan2(-dy, dx)); -// System.out.println("test " + angle0 + " " + ang + " " + angle1); + //System.out.println("test " + angle0 + " " + ang + " " + angle1); if(Arcs.areClockwiseOrdered(angle0, ang, angle1) == clockWise) { -// System.out.println("hit"); + //System.out.println("hit"); return true; } } @@ -207,5 +208,52 @@ public class Arcs { return false; } + + /** + * Calculates the radial distance between an arc and a point + * @param beginBounds Begin coordinate of the arc + * @param endBounds End coordinate of the arc + * @param angle The central angle of the arc + * @param x x coordinate of the measured point + * @param y x coordinate of the measured point + * @return The radial distance between the the arc and (x,y); Double.NaN if the + * distance is not real. + */ + public static double getRadialDistance(Rectangle2D beginBounds, + Rectangle2D endBounds, double angle, double x, double y) { + + boolean clockWise = angle > 0; + + double x0 = beginBounds.getCenterX(); + double y0 = beginBounds.getCenterY(); + double x1 = endBounds.getCenterX(); + double y1 = endBounds.getCenterY(); + + double offset = + Math.abs(angle) < 1.0e-6 + ? 1e3 * Math.signum(angle) + : Math.tan(Math.PI*0.5-angle)*0.5; + double cx = 0.5*(x0+x1) + offset * (y1-y0); + double cy = 0.5*(y0+y1) + offset * (x0-x1); + double dx0 = x0 - cx; + double dy0 = y0 - cy; + double dx1 = x1 - cx; + double dy1 = y1 - cy; + double r = Math.sqrt(dx0*dx0 + dy0*dy0); + double angle0 = Arcs.nextIntersectingAngle(cx, cy, r, + Math.atan2(-dy0, dx0), beginBounds, angle < 0.0); + double angle1 = Arcs.nextIntersectingAngle(cx, cy, r, + Math.atan2(-dy1, dx1), endBounds, angle > 0.0); + + double dx = x-cx; + double dy = y-cy; + double dist2 = dx*dx + dy*dy; + + double ang = Arcs.normalizeAngle(Math.atan2(-dy, dx)); + if(!Arcs.areClockwiseOrdered(angle0, ang, angle1) == clockWise) { + return Double.NaN; + } + return Math.abs(Math.sqrt(dist2) - r); + } } diff --git a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/connections/DependencyEdgeClass.java b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/connections/DependencyEdgeClass.java index 64d98631..9e790aa4 100644 --- a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/connections/DependencyEdgeClass.java +++ b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/connections/DependencyEdgeClass.java @@ -79,10 +79,9 @@ public class DependencyEdgeClass { DependencyNode node = e.getHint(SysdynEdgeSceneGraph.KEY_SG_NODE); if(node == null) { - System.out.println("pickTest no node!"); return false; } - return Arcs.hitTest(node.getBeginBounds(), node.getEndBounds(), node.getAngle(), pickRect.getCenterX(), pickRect.getCenterY(), 3.0); + return Arcs.hitTest(node.getBeginBounds(), node.getEndBounds(), node.getAngle(), pickRect.getCenterX(), pickRect.getCenterY(), 1.7); } diff --git a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/connections/DependencyNode.java b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/connections/DependencyNode.java index 3c00d95d..0eacd1b7 100644 --- a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/connections/DependencyNode.java +++ b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/connections/DependencyNode.java @@ -22,15 +22,19 @@ import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; +import java.util.Collection; import org.simantics.diagram.elements.TextNode; import org.simantics.g2d.utils.Alignment; import org.simantics.scenegraph.ISelectionPainterNode; +import org.simantics.scenegraph.g2d.IG2DNode; import org.simantics.scenegraph.g2d.events.EventTypes; import org.simantics.scenegraph.g2d.events.MouseEvent.MouseButtonPressedEvent; import org.simantics.scenegraph.g2d.events.MouseEvent.MouseButtonReleasedEvent; import org.simantics.scenegraph.g2d.events.MouseEvent.MouseDragBegin; import org.simantics.scenegraph.g2d.events.MouseEvent.MouseMovedEvent; +import org.simantics.scenegraph.g2d.nodes.ConnectionNode; +import org.simantics.scenegraph.g2d.nodes.SingleElementNode; import org.simantics.scenegraph.utils.NodeUtil; import org.simantics.sysdyn.ui.editor.routing.DependencyRouter; import org.simantics.utils.datastructures.Pair; @@ -45,6 +49,8 @@ public class DependencyNode extends TextNode implements ISelectionPainterNode { public static final String INSIDE = "Inside"; public static final String OUTSIDE = "Outside"; + public static final double HITMARGIN = 1.7; + private static final long serialVersionUID = 1294351381209071074L; private static final BasicStroke STROKE = new BasicStroke(1.0f); @@ -235,6 +241,12 @@ public class DependencyNode extends TextNode implements ISelectionPainterNode { Point2D localPos = NodeUtil.worldToLocal(this, event.controlPosition, new Point2D.Double()); return Arcs.hitTest(beginBounds, endBounds, angle, localPos.getX(), localPos.getY(), tolerance); } + + protected double getRadialDistanse(Point2D coord) { + if(beginBounds == null || endBounds == null) return Double.NaN; + Point2D localPos = NodeUtil.worldToLocal(this, coord, new Point2D.Double()); + return Arcs.getRadialDistance(beginBounds, endBounds, angle, localPos.getX(), localPos.getY()); + } @Override public Rectangle2D getBoundsInLocal() { @@ -251,7 +263,7 @@ public class DependencyNode extends TextNode implements ISelectionPainterNode { @Override protected boolean mouseMoved(MouseMovedEvent event) { - boolean hit = hitTest(event, 3.0); + boolean hit = hitTest(event, HITMARGIN); if(dragging) { Point2D localPos = NodeUtil.worldToLocal(this, event.controlPosition, new Point2D.Double()); @@ -269,14 +281,62 @@ public class DependencyNode extends TextNode implements ISelectionPainterNode { return false; } + private static boolean isEventDummy(MouseDragBegin e) { + if (e.controlPosition.distance(0, 0) == 0 + && e.screenPosition.distance(0, 0) == 0 + && e.buttons == 0) { + return true; + } else { + return false; + } + } + @Override protected boolean mouseDragged(MouseDragBegin e) { - if(!dragging && hitTest(e, 3.0)) { - dragging = true; - return true; // consume event - } else { - return false; - } + // Get rid of dummy events from dragGestureRecognized + if (isEventDummy(e)) { + return false; + } + //System.out.println(this.toString() + " event: " + e.toString()); + boolean selected = NodeUtil.isSelected(this, 2); + double myRadialDistance = this.getRadialDistanse(e.controlPosition); + Collection nodes = this.getParent().getParent().getParent().getNodes(); + if (!selected) { + for (Object temp1 : nodes) { + if (temp1 instanceof ConnectionNode) { + for ( IG2DNode temp2 : ((ConnectionNode)temp1).getNodes()) { + if (temp2 instanceof SingleElementNode) { + for ( IG2DNode temp3 : ((SingleElementNode)temp2).getNodes()) { + if (temp3 instanceof DependencyNode){ + DependencyNode otherDependencyNode = (DependencyNode)temp3; + if (otherDependencyNode == this) { + continue; + } + double otherNodeDist = otherDependencyNode.getRadialDistanse(e.controlPosition); + if (Double.isNaN(otherNodeDist)) { + continue; + } + if (otherDependencyNode.isDragging()) { + return true; + } + if (NodeUtil.isSelected(otherDependencyNode, 2) && (otherNodeDist < HITMARGIN)) { + return false; + } + if (otherNodeDist < myRadialDistance) { + return false; + } + } + } + } + } + } + } + } + if ( (myRadialDistance < HITMARGIN) && !dragging) { + dragging = true; + return true; + } + return false; } @Override @@ -291,4 +351,8 @@ public class DependencyNode extends TextNode implements ISelectionPainterNode { } return false; } + + protected boolean isDragging() { + return dragging; + } } diff --git a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/connections/FlowConnectionStyle.java b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/connections/FlowConnectionStyle.java index a57511e3..036a4556 100644 --- a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/connections/FlowConnectionStyle.java +++ b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/connections/FlowConnectionStyle.java @@ -26,7 +26,6 @@ public class FlowConnectionStyle extends BasicConnectionStyle { @Override public void drawLine(Graphics2D g, double x1, double y1, double x2, double y2, boolean isTransient) { - System.out.println("DrawLine"); } @Override diff --git a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/newComponents/NewModuleNodeHandler.java b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/newComponents/NewModuleNodeHandler.java index 4c16319b..6bfc3767 100644 --- a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/newComponents/NewModuleNodeHandler.java +++ b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/newComponents/NewModuleNodeHandler.java @@ -23,7 +23,6 @@ import org.simantics.db.common.utils.NameUtils; import org.simantics.db.common.utils.OrderedSetUtils; import org.simantics.db.exception.DatabaseException; import org.simantics.db.layer0.adapter.Template; -import org.simantics.diagram.stubs.DiagramResource; import org.simantics.diagram.synchronization.graph.DiagramGraphUtil; import org.simantics.layer0.Layer0; import org.simantics.layer0.utils.direct.GraphUtils; @@ -31,6 +30,7 @@ import org.simantics.modeling.ModelingResources; import org.simantics.operation.Layer0X; import org.simantics.structural.stubs.StructuralResource2; import org.simantics.sysdyn.SysdynResource; +import org.simantics.sysdyn.ui.browser.actions.newActions.NewModuleTypeAction; import org.simantics.sysdyn.ui.browser.nodes.ModulesNode; import org.simantics.ui.SimanticsUI; import org.simantics.ui.utils.AdaptionUtils; @@ -67,7 +67,6 @@ public class NewModuleNodeHandler extends AbstractHandler { Layer0X L0X = Layer0X.getInstance(g); ModelingResources mr = ModelingResources.getInstance(g); StructuralResource2 sr2 = StructuralResource2.getInstance(g); - DiagramResource dr = DiagramResource.getInstance(g); String name = NameUtils.findFreshName(g, "ModuleType", model, l0.ConsistsOf, "%s%d"); @@ -131,11 +130,13 @@ public class NewModuleNodeHandler extends AbstractHandler { Resource terminal = g.newResource(); g.claim(terminal, l0.InstanceOf, sr.SysdynTerminal); - DiagramGraphUtil.addConnectionPoint(g, moduleSymbol, terminal, sr.IsHeadOfTerminal); + Resource relation = NewModuleTypeAction.createTerminalRelation(g, moduleSymbol, sr.IsHeadOfTerminal, sr.Variable_isHeadOf); + DiagramGraphUtil.addConnectionPoint(g, moduleSymbol, terminal, relation); Resource terminal2 = g.newResource(); g.claim(terminal2, l0.InstanceOf, sr.SysdynTerminal); - DiagramGraphUtil.addConnectionPoint(g, moduleSymbol, terminal2, sr.IsTailOfTerminal); + relation = NewModuleTypeAction.createTerminalRelation(g, moduleSymbol, sr.IsTailOfTerminal, sr.Variable_isTailOf); + DiagramGraphUtil.addConnectionPoint(g, moduleSymbol, terminal2, relation); g.claim(moduleSymbol, sr2.IsDefinedBy, OrderedSetUtils.create(g, sr2.Composite, terminal, terminal2)); @@ -144,6 +145,6 @@ public class NewModuleNodeHandler extends AbstractHandler { }); return null; } - + } diff --git a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ExpressionWidget.java b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ExpressionWidget.java index 5b9b66e0..0b1c36cf 100644 --- a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ExpressionWidget.java +++ b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ExpressionWidget.java @@ -16,23 +16,31 @@ import java.awt.event.ActionListener; import java.util.Collection; import java.util.HashMap; import java.util.Map; +import java.util.concurrent.CopyOnWriteArrayList; import javax.swing.Timer; +import org.eclipse.jface.fieldassist.SimpleContentProposalProvider; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.swt.SWT; import org.eclipse.swt.custom.VerifyKeyListener; import org.eclipse.swt.events.FocusListener; import org.eclipse.swt.events.ModifyListener; +import org.eclipse.swt.graphics.Color; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Table; +import org.eclipse.swt.widgets.TableItem; import org.simantics.browsing.ui.swt.widgets.impl.Widget; import org.simantics.browsing.ui.swt.widgets.impl.WidgetSupport; +import org.simantics.db.AsyncReadGraph; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.common.utils.OrderedSetUtils; import org.simantics.db.exception.DatabaseException; import org.simantics.db.layer0.variable.Variable; import org.simantics.db.management.ISessionContext; +import org.simantics.db.procedure.AsyncListener; import org.simantics.db.request.Read; import org.simantics.layer0.Layer0; import org.simantics.sysdyn.SysdynResource; @@ -47,9 +55,12 @@ import org.simantics.sysdyn.ui.properties.widgets.expressions.LookupExpression; import org.simantics.sysdyn.ui.properties.widgets.expressions.ParameterExpression; import org.simantics.sysdyn.ui.properties.widgets.expressions.StockExpression; import org.simantics.sysdyn.ui.properties.widgets.expressions.WithLookupExpression; +import org.simantics.sysdyn.ui.trend.chart.properties.VariableProposalProvider; import org.simantics.sysdyn.ui.utils.ExpressionUtils; +import org.simantics.sysdyn.ui.validation.ValidationUtils; import org.simantics.ui.SimanticsUI; import org.simantics.ui.utils.AdaptionUtils; +import org.simantics.utils.ui.ISelectionUtils; /** * Widget for displaying an expression. Widget creates the IExpression for displaying @@ -57,6 +68,7 @@ import org.simantics.ui.utils.AdaptionUtils; * to the active IExpression. * * @author Teemu Lempinen + * @author Tuomas Miettinen * */ public class ExpressionWidget implements Widget { @@ -105,7 +117,7 @@ public class ExpressionWidget implements Widget { }); validationTimer.setRepeats(false); } - + @Override public void setInput(ISessionContext context, Object input) { // Update IExpression based on the newly selected expression @@ -163,7 +175,7 @@ public class ExpressionWidget implements Widget { exp.readData(expr, data); // Create the visual representation of the expression type - exp.createExpressionFields(parent, data); + exp.createExpressionFields(parent, data, variableTable); // Add listeners if(modifyListener != null) @@ -253,7 +265,7 @@ public class ExpressionWidget implements Widget { public void addVerifyKeyListener(VerifyKeyListener listener) { this.verifyKeyListener = listener; } - + public void addFocusListener(FocusListener listener) { this.focusListener = listener; } diff --git a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/AuxiliaryExpression.java b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/AuxiliaryExpression.java index 85c7ec14..abfa3e4a 100644 --- a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/AuxiliaryExpression.java +++ b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/AuxiliaryExpression.java @@ -11,6 +11,14 @@ *******************************************************************************/ package org.simantics.sysdyn.ui.properties.widgets.expressions; +import java.util.Map; + +import org.eclipse.jface.layout.GridDataFactory; +import org.eclipse.jface.layout.GridLayoutFactory; +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Table; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.exception.DatabaseException; @@ -33,5 +41,18 @@ public class AuxiliaryExpression extends BasicExpression { e.printStackTrace(); } } + + @Override + public void createExpressionFields(Composite parent, Map data, Table allowedVariables) { + // Create the single field + GridLayoutFactory.fillDefaults().numColumns(2).applyTo(parent); + String equation = data.get("equation") != null ? (String)data.get("equation") : ""; + + Label l = new Label(parent, SWT.NONE); + l.setText("="); + expression = new ExpressionField(parent, SWT.BORDER, allowedVariables, true); + expression.setExpression(equation); + GridDataFactory.fillDefaults().grab(true, true).applyTo(expression); + } } diff --git a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/BasicExpression.java b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/BasicExpression.java index cc66c5dc..062d452a 100644 --- a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/BasicExpression.java +++ b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/BasicExpression.java @@ -28,6 +28,7 @@ import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Table; import org.simantics.databoard.Bindings; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; @@ -46,6 +47,7 @@ import org.simantics.ui.SimanticsUI; /** * Basic expression that is used with parameter, auxiliary and constant * @author Teemu Lempinen + * @author Tuomas Miettinen * */ public class BasicExpression implements IExpression { @@ -54,7 +56,7 @@ public class BasicExpression implements IExpression { protected Resource expressionType; @Override - public void createExpressionFields(Composite parent, Map data) { + public void createExpressionFields(Composite parent, Map data, Table allowedVariables) { // Create the single field GridLayoutFactory.fillDefaults().numColumns(2).applyTo(parent); String equation = data.get("equation") != null ? (String)data.get("equation") : ""; @@ -62,7 +64,7 @@ public class BasicExpression implements IExpression { Label l = new Label(parent, SWT.NONE); l.setText("="); - expression = new ExpressionField(parent, SWT.BORDER); + expression = new ExpressionField(parent, SWT.BORDER, null, false); expression.setExpression(equation); GridDataFactory.fillDefaults().grab(true, true).applyTo(expression); diff --git a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/CompletionProcessor.java b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/CompletionProcessor.java new file mode 100644 index 00000000..d0966676 --- /dev/null +++ b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/CompletionProcessor.java @@ -0,0 +1,182 @@ +/******************************************************************************* + * Copyright (c) 2010 Association for Decentralized Information Management in + * Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.sysdyn.ui.properties.widgets.expressions; + +import java.util.ArrayList; +import java.util.Collections; + +import org.eclipse.jface.text.ITextViewer; +import org.eclipse.jface.text.contentassist.CompletionProposal; +import org.eclipse.jface.text.contentassist.ICompletionProposal; +import org.eclipse.jface.text.contentassist.IContentAssistProcessor; +import org.eclipse.jface.text.contentassist.IContextInformation; +import org.eclipse.jface.text.contentassist.IContextInformationValidator; +import org.eclipse.swt.widgets.Table; +import org.eclipse.swt.widgets.TableItem; +import org.simantics.db.ReadGraph; +import org.simantics.db.Resource; +import org.simantics.db.common.request.ObjectsWithType; +import org.simantics.db.common.utils.NameUtils; +import org.simantics.db.exception.DatabaseException; +import org.simantics.db.request.Read; +import org.simantics.layer0.Layer0; +import org.simantics.sysdyn.SysdynResource; +import org.simantics.ui.SimanticsUI; + + +/** + * IContentAssistProcessor to determine which options (the functions and + * variables available) are shown for ContentAssistant; this assist of + * text field allows long variable names to be selected from a popup menu. + * @author Tuomas Miettinen + * + */ +public class CompletionProcessor implements IContentAssistProcessor { + + private Table allowedVariables; + private ArrayList functions; + private ArrayList variables = null; + + private char[] allowedCharacters = { + 'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','å','ä','ö', + 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','Å','Ä','Ö', + '1','2','3','4','5','6','7','8','9','0','.', + '(',')'}; + + public CompletionProcessor(Table allowedVariables, boolean allowFunctions){ + this.allowedVariables = allowedVariables; + + //Finding functions + functions = new ArrayList(); + if (allowFunctions) { + try { + functions = SimanticsUI.getSession().syncRequest(new Read>() { + @Override + public ArrayList perform(ReadGraph graph) + throws DatabaseException { + SysdynResource sr = SysdynResource.getInstance(graph); + Layer0 l0 = Layer0.getInstance(graph); + ArrayList functions = new ArrayList(); + + Resource funktionlibrary = graph.getPossibleResource(SysdynResource.URIs.Built$in_Functions); + for(Resource r : graph.syncRequest(new ObjectsWithType(funktionlibrary, l0.ConsistsOf, sr.SysdynModelicaFunction))) { + String name = NameUtils.getSafeName(graph, r); + functions.add(name); + } + + Resource subfunktionlibrary = graph.getPossibleResource(SysdynResource.URIs.Built$in_Functions_Vensim_Functions); + for(Resource r : graph.syncRequest(new ObjectsWithType(subfunktionlibrary, l0.ConsistsOf, sr.SysdynModelicaFunction))) { + String name = NameUtils.getSafeName(graph, r); + functions.add(name); + } + + return functions; + } + }); + } + catch (DatabaseException e) { + e.printStackTrace(); + } + } + Collections.sort(functions); + } + + private ICompletionProposal[] collectProposals(String token, int offset) { + //Finding variables + if (variables == null) { + variables = new ArrayList(); + if(allowedVariables != null && !allowedVariables.isDisposed()) { + TableItem[] connectedVariables = allowedVariables.getItems(); + for(TableItem ti : connectedVariables) { + this.variables.add(ti.getText()); + } + } + Collections.sort(variables); + } + + ArrayList resultArray = new ArrayList(); + for (String function : functions) { + if (token.length() == 0 || function.toUpperCase().startsWith(token.toUpperCase())) { + resultArray.add(new CompletionProposal(function, + offset - token.length(), + token.length(), + function.length())); + } + } + for (String variable : variables) { + if (token.length() == 0 || variable.toUpperCase().startsWith(token.toUpperCase())) { + resultArray.add(new CompletionProposal(variable, + offset - token.length(), + token.length(), + variable.length())); + } + } + ICompletionProposal[] result = new ICompletionProposal[resultArray.size()]; + for (int i = 0; i < result.length; ++i) { + result[i] = resultArray.get(i); + } + return result; + } + + @Override + public ICompletionProposal[] computeCompletionProposals( + ITextViewer viewer, int offset) { + String equation = viewer.getDocument().get(); +// System.out.println(equation + "\noffset = " + offset); + + if (equation.length() == 0 + || offset == 0 + || Character.isWhitespace(equation.charAt(offset - 1))) { + return collectProposals("", offset); + } + + equation = equation.substring(0, offset); +// System.out.println(equation + "\noffset = " + offset); + + // Split into tokens on whitespace characters + String[] tokens = equation.split("\\s+"); + if (tokens.length == 0) { + return collectProposals("", offset); + } + String token = tokens[tokens.length - 1]; +// System.out.println(token + "\noffset = " + offset); + + return collectProposals(token, offset); + } + + @Override + public IContextInformation[] computeContextInformation( + ITextViewer viewer, int offset) { + return null; + } + + @Override + public char[] getCompletionProposalAutoActivationCharacters() { + return allowedCharacters; + } + + @Override + public char[] getContextInformationAutoActivationCharacters() { + return null; + } + + @Override + public String getErrorMessage() { + return "Error in CompletionProcessor"; + } + + @Override + public IContextInformationValidator getContextInformationValidator() { + return null; + } + +} diff --git a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/ConstantExpression.java b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/ConstantExpression.java index d1c1fbd9..8ca2a5fa 100644 --- a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/ConstantExpression.java +++ b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/ConstantExpression.java @@ -11,6 +11,14 @@ *******************************************************************************/ package org.simantics.sysdyn.ui.properties.widgets.expressions; +import java.util.Map; + +import org.eclipse.jface.layout.GridDataFactory; +import org.eclipse.jface.layout.GridLayoutFactory; +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Table; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.exception.DatabaseException; @@ -33,4 +41,19 @@ public class ConstantExpression extends BasicExpression { e.printStackTrace(); } } + + @Override + public void createExpressionFields(Composite parent, Map data, Table allowedVariables) { + // Create the single field + GridLayoutFactory.fillDefaults().numColumns(2).applyTo(parent); + String equation = data.get("equation") != null ? (String)data.get("equation") : ""; + + Label l = new Label(parent, SWT.NONE); + l.setText("="); +System.out.println("ConstantExpression"); + expression = new ExpressionField(parent, SWT.BORDER, null, false); + expression.setExpression(equation); + GridDataFactory.fillDefaults().grab(true, true).applyTo(expression); + + } } \ No newline at end of file diff --git a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/DelayExpression.java b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/DelayExpression.java index d9401442..ab5f6749 100644 --- a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/DelayExpression.java +++ b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/DelayExpression.java @@ -32,6 +32,7 @@ import org.eclipse.swt.graphics.Point; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Spinner; +import org.eclipse.swt.widgets.Table; import org.simantics.databoard.Bindings; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; @@ -49,6 +50,7 @@ import org.simantics.ui.SimanticsUI; /** * IExpression for displaying fields of DelayExpression * @author Teemu Lempinen + * @author Tuomas Miettinen * */ public class DelayExpression implements IExpression { @@ -70,7 +72,7 @@ public class DelayExpression implements IExpression { * Displays the fields for delayExpression */ @Override - public void createExpressionFields(Composite parent, final Map data) { + public void createExpressionFields(Composite parent, final Map data, Table allowedVariables) { // Get possible existing data GridLayoutFactory.fillDefaults().numColumns(2).applyTo(parent); String eq = data.get("equation") != null ? (String)data.get("equation") : ""; @@ -82,7 +84,7 @@ public class DelayExpression implements IExpression { l.setText("expression"); // Equation that is delayed - equation = new ExpressionField(parent, SWT.BORDER); + equation = new ExpressionField(parent, SWT.BORDER, allowedVariables, true); equation.setExpression(eq); GridDataFactory.fillDefaults().grab(true, true).applyTo(equation); equation.getSourceViewer().getTextWidget().addFocusListener(new FocusAdapter() { @@ -97,7 +99,7 @@ public class DelayExpression implements IExpression { l.setText("delay time"); // How much the equation is delayed - delayTime = new ExpressionField(parent, SWT.BORDER); + delayTime = new ExpressionField(parent, SWT.BORDER, allowedVariables, true); delayTime.setExpression(dt); GridDataFactory.fillDefaults().grab(true, true).applyTo(delayTime); @@ -113,7 +115,7 @@ public class DelayExpression implements IExpression { l.setText("initial value"); // What is the initial value of the delay (empty == same as equation) - initialValue = new ExpressionField(parent, SWT.BORDER); + initialValue = new ExpressionField(parent, SWT.BORDER, allowedVariables, true); initialValue.setExpression(iv); GridDataFactory.fillDefaults().grab(true, true).applyTo(initialValue); diff --git a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/EmptyExpression.java b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/EmptyExpression.java index 6de6e82a..f36fac96 100644 --- a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/EmptyExpression.java +++ b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/EmptyExpression.java @@ -19,12 +19,13 @@ import org.eclipse.swt.events.FocusListener; import org.eclipse.swt.events.KeyListener; import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Table; import org.simantics.db.Resource; public class EmptyExpression implements IExpression { @Override - public void createExpressionFields(Composite parent, Map data) { + public void createExpressionFields(Composite parent, Map data, Table allowedVariables) { // TODO Auto-generated method stub } diff --git a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/ExpressionField.java b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/ExpressionField.java index 2904c0d0..696c960a 100644 --- a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/ExpressionField.java +++ b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/ExpressionField.java @@ -29,14 +29,17 @@ import org.eclipse.jface.text.source.MatchingCharacterPainter; import org.eclipse.jface.text.source.SourceViewer; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.StyledText; +import org.eclipse.swt.custom.VerifyKeyListener; import org.eclipse.swt.events.FocusEvent; import org.eclipse.swt.events.FocusListener; import org.eclipse.swt.events.KeyEvent; import org.eclipse.swt.events.KeyListener; +import org.eclipse.swt.events.VerifyEvent; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.RGB; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Table; import org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess; import org.eclipse.swt.graphics.Point; import org.simantics.sysdyn.expressionParser.Token; @@ -47,6 +50,7 @@ import org.simantics.sysdyn.expressionParser.Token; * source viewer in eclipse. * * @author Teemu Lempinen + * @author Tuomas Miettinen * */ public class ExpressionField extends Composite { @@ -70,7 +74,7 @@ public class ExpressionField extends Composite { * @param parent * @param style */ - public ExpressionField(Composite parent, int style) { + public ExpressionField(Composite parent, int style, Table allowedVariables, boolean allowFunctions) { super(parent, style); GridLayoutFactory.fillDefaults().applyTo(this); @@ -94,7 +98,7 @@ public class ExpressionField extends Composite { styles); // Configuration for color management - _sourceViewer.configure(new ExpressionFieldConfiguration(cManager)); + _sourceViewer.configure(new ExpressionFieldConfiguration(cManager, allowedVariables, allowFunctions)); AnnotationPainter painter = new AnnotationPainter(_sourceViewer, annotationAccess); _sourceViewer.addPainter(painter); @@ -153,6 +157,23 @@ public class ExpressionField extends Composite { ((StyledText)e.widget).setSelection(selection); } }); + + _sourceViewer.appendVerifyKeyListener(new VerifyKeyListener() { + @Override + public void verifyKey(VerifyEvent event) { + // Check for Ctrl+Spacebar + if (event.stateMask == SWT.CTRL && event.character == ' ') { + // Check if source viewer is able to perform operation + if (_sourceViewer.canDoOperation(SourceViewer.CONTENTASSIST_PROPOSALS)) { + // Perform operation + _sourceViewer.doOperation(SourceViewer.CONTENTASSIST_PROPOSALS); + } + // Veto this key press to avoid further processing + event.doit = false; + } + } + + }); } /** diff --git a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/ExpressionFieldConfiguration.java b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/ExpressionFieldConfiguration.java index ba5d08be..11c82ee1 100644 --- a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/ExpressionFieldConfiguration.java +++ b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/ExpressionFieldConfiguration.java @@ -15,6 +15,8 @@ import org.eclipse.jface.text.DefaultTextHover; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.ITextHover; import org.eclipse.jface.text.TextAttribute; +import org.eclipse.jface.text.contentassist.ContentAssistant; +import org.eclipse.jface.text.contentassist.IContentAssistant; import org.eclipse.jface.text.presentation.IPresentationReconciler; import org.eclipse.jface.text.presentation.PresentationReconciler; import org.eclipse.jface.text.rules.DefaultDamagerRepairer; @@ -31,18 +33,23 @@ import org.eclipse.jface.text.source.ISourceViewer; import org.eclipse.jface.text.source.SourceViewerConfiguration; import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.RGB; +import org.eclipse.swt.widgets.Table; import org.simantics.sysdyn.ui.utils.VariableNameUtils; public class ExpressionFieldConfiguration extends SourceViewerConfiguration { ColorManager colorManager; - - public ExpressionFieldConfiguration(ColorManager colorManager) { + Table allowedVariables; + Boolean allowFunctions; + + public ExpressionFieldConfiguration(ColorManager colorManager, Table allowedVariables, boolean allowFunctions) { super(); this.colorManager = colorManager; + this.allowedVariables = allowedVariables; + this.allowFunctions = allowFunctions; } - + public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) { return new String[] { IDocument.DEFAULT_CONTENT_TYPE @@ -112,4 +119,16 @@ public class ExpressionFieldConfiguration extends SourceViewerConfiguration { return new DefaultAnnotationHover(); } + @Override + public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) { + ContentAssistant assistant = new ContentAssistant(); + assistant.setContentAssistProcessor(new CompletionProcessor(allowedVariables, allowFunctions), "__dftl_partition_content_type"); + assistant.enableAutoActivation(true); + assistant.enableAutoInsert(true); + assistant.setAutoActivationDelay(0); + assistant.setProposalPopupOrientation(IContentAssistant.PROPOSAL_OVERLAY); + assistant.setContextInformationPopupOrientation(IContentAssistant.CONTEXT_INFO_ABOVE); + return assistant; + } + } diff --git a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/IExpression.java b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/IExpression.java index 1491cd32..c2c6eff0 100644 --- a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/IExpression.java +++ b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/IExpression.java @@ -19,11 +19,12 @@ import org.eclipse.swt.events.FocusListener; import org.eclipse.swt.events.KeyListener; import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Table; import org.simantics.db.Resource; public interface IExpression { - public void createExpressionFields(Composite parent, Map data); + public void createExpressionFields(Composite parent, Map data, Table allowedVaribles); public void readData(final Resource expression, Map data); diff --git a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/LookupExpression.java b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/LookupExpression.java index 3cebc8c0..cf0f2304 100644 --- a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/LookupExpression.java +++ b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/LookupExpression.java @@ -19,6 +19,7 @@ import org.eclipse.swt.events.FocusListener; import org.eclipse.swt.events.KeyListener; import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Table; import org.simantics.db.Resource; public class LookupExpression implements IExpression { @@ -60,7 +61,7 @@ public class LookupExpression implements IExpression { } @Override - public void createExpressionFields(Composite parent, Map data) { + public void createExpressionFields(Composite parent, Map data, Table allowedVariables) { // TODO Auto-generated method stub } diff --git a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/ParameterExpression.java b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/ParameterExpression.java index c181f5fc..6ccda38a 100644 --- a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/ParameterExpression.java +++ b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/ParameterExpression.java @@ -19,6 +19,7 @@ import org.eclipse.jface.layout.GridLayoutFactory; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Table; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.WriteGraph; @@ -56,7 +57,7 @@ public class ParameterExpression extends BasicExpression { @Override - public void createExpressionFields(Composite parent, Map data) { + public void createExpressionFields(Composite parent, Map data, Table allowedVariables) { // Create the single field GridLayoutFactory.fillDefaults().numColumns(2).applyTo(parent); String equation = data.get("equation") != null ? (String)data.get("equation") : ""; @@ -64,7 +65,7 @@ public class ParameterExpression extends BasicExpression { Label l = new Label(parent, SWT.NONE); l.setText("="); - expression = new ExpressionField(parent, SWT.BORDER); + expression = new ExpressionField(parent, SWT.BORDER, null, false); expression.setExpression(equation); GridDataFactory.fillDefaults().grab(true, true).applyTo(expression); diff --git a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/StockExpression.java b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/StockExpression.java index ec2caa18..0e3e7f5d 100644 --- a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/StockExpression.java +++ b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/StockExpression.java @@ -27,6 +27,7 @@ import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.Text; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; @@ -49,7 +50,7 @@ public class StockExpression implements IExpression { private ExpressionField expression; @Override - public void createExpressionFields(Composite parent, Map data) { + public void createExpressionFields(Composite parent, Map data, Table allowedVariables) { GridLayoutFactory.fillDefaults().numColumns(2).applyTo(parent); String initialEquation = data.get("initialEquation") != null ? (String)data.get("initialEquation") : ""; String integralEquation = data.get("integral") != null ? (String)data.get("integral") : ""; @@ -67,7 +68,7 @@ public class StockExpression implements IExpression { label = new Label(parent, SWT.NONE); label.setText("Initial\nValue"); - expression = new ExpressionField(parent, SWT.BORDER); + expression = new ExpressionField(parent, SWT.BORDER, allowedVariables, true); expression.setExpression(initialEquation); GridDataFactory.fillDefaults().grab(true, true).applyTo(expression); diff --git a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/WithLookupExpression.java b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/WithLookupExpression.java index c8e10962..5d2fa12e 100644 --- a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/WithLookupExpression.java +++ b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/WithLookupExpression.java @@ -40,6 +40,7 @@ import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Table; import org.jfree.chart.ChartFactory; import org.jfree.chart.ChartPanel; import org.jfree.chart.JFreeChart; @@ -82,7 +83,7 @@ public class WithLookupExpression implements IExpression { } @Override - public void createExpressionFields(Composite parent, final Map data) { + public void createExpressionFields(Composite parent, final Map data, Table allowedVariables) { GridLayoutFactory.fillDefaults().numColumns(3).applyTo(parent); updateChartTimer = new Timer(1000, new ActionListener() { @@ -100,7 +101,7 @@ public class WithLookupExpression implements IExpression { Label l = new Label(parent, SWT.NONE); l.setText("With\nLookup"); - expression = new ExpressionField(parent, SWT.BORDER); + expression = new ExpressionField(parent, SWT.BORDER, allowedVariables, true); expression.setExpression(equation); GridDataFactory.fillDefaults().grab(true, true).applyTo(expression); @@ -119,7 +120,7 @@ public class WithLookupExpression implements IExpression { l = new Label(parent, SWT.NONE); l.setText("Lookup\ntable"); - lookup = new ExpressionField(parent, SWT.BORDER); + lookup = new ExpressionField(parent, SWT.BORDER, null, false); lookup.setExpression(lookupTable); GridDataFactory.fillDefaults().grab(true, true).applyTo(lookup); @@ -404,5 +405,4 @@ public class WithLookupExpression implements IExpression { smallPanel.getChart().getXYPlot().setDataset(dataset); } - } diff --git a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/functions/FunctionCodeWidget.java b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/functions/FunctionCodeWidget.java index 9bbd115f..8fd7bdb8 100644 --- a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/functions/FunctionCodeWidget.java +++ b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/functions/FunctionCodeWidget.java @@ -56,8 +56,7 @@ public class FunctionCodeWidget implements Widget { public FunctionCodeWidget(Composite parent, WidgetSupport support, int style) { support.register(this); - - modelicaCode = new ExpressionField(parent, SWT.BORDER); + modelicaCode = new ExpressionField(parent, SWT.BORDER, null, false); GridDataFactory.fillDefaults().grab(true, true).applyTo(modelicaCode); diff --git a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/ExpressionUtils.java b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/ExpressionUtils.java index fa3d62ab..c9419675 100644 --- a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/ExpressionUtils.java +++ b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/ExpressionUtils.java @@ -186,7 +186,7 @@ public class ExpressionUtils { current = getElement(current, parts[i]); } - if(current == null) { + if(current == null && conf.getModuleType() != null) { // Sheets are currently located in the model root. Try to find the sheet. current = conf.getModuleType().getParent(); // Get module type parent (should be a model) if(current instanceof Model) diff --git a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/SheetUtils.java b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/SheetUtils.java index c593f278..229aff9b 100644 --- a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/SheetUtils.java +++ b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/SheetUtils.java @@ -37,21 +37,21 @@ public class SheetUtils { { Resource newCell = graph.newResource(); - graph.claim(newCell, L0.InstanceOf, null, sr.Cell); + graph.claim(newCell, L0.InstanceOf, null, sr.Dimensions); graph.claimLiteral(newCell, L0.HasName, L0.NameOf, L0.String, "Dimensions", Bindings.STRING); - graph.addLiteral(newCell, sr.FitColumns, sr.FitColumnsOf, L0.Boolean, false, Bindings.BOOLEAN); - graph.addLiteral(newCell, sr.FitRows, sr.FitRowsOf, L0.Boolean, false, Bindings.BOOLEAN); - graph.addLiteral(newCell, sr.ColumnCount, sr.ColumnCountOf, L0.Integer, 128, Bindings.INTEGER); - graph.addLiteral(newCell, sr.RowCount, sr.RowCountOf, L0.Integer, 256, Bindings.INTEGER); + graph.addLiteral(newCell, sr.Dimensions_fitColumns, sr.Dimensions_fitColumns_Inverse, L0.Boolean, false, Bindings.BOOLEAN); + graph.addLiteral(newCell, sr.Dimensions_fitRows, sr.Dimensions_fitRows_Inverse, L0.Boolean, false, Bindings.BOOLEAN); + graph.addLiteral(newCell, sr.Dimensions_columnCount, sr.Dimensions_columnCount_Inverse, L0.Integer, 128, Bindings.INTEGER); + graph.addLiteral(newCell, sr.Dimensions_rowCount, sr.Dimensions_rowCount_Inverse, L0.Integer, 256, Bindings.INTEGER); graph.claim(result, L0.ConsistsOf, L0.PartOf, newCell); } { Resource newCell = graph.newResource(); - graph.claim(newCell, L0.InstanceOf, null, sr.Cell); + graph.claim(newCell, L0.InstanceOf, null, sr.Headers); graph.claimLiteral(newCell, L0.HasName, L0.NameOf, L0.String, "Headers", Bindings.STRING); - graph.addLiteral(newCell, sr.ColumnLabels, sr.ColumnLabelsOf, L0.StringArray, colNames, Bindings.STRING_ARRAY); - graph.addLiteral(newCell, sr.ColumnWidths, sr.ColumnWidthsOf, L0.IntegerArray, colWidths, Bindings.INT_ARRAY); + graph.addLiteral(newCell, sr.Headers_columnLabels, sr.Headers_columnLabels_Inverse, L0.StringArray, colNames, Bindings.STRING_ARRAY); + graph.addLiteral(newCell, sr.Headers_columnWidths, sr.Headers_columnWidths_Inverse, L0.IntegerArray, colWidths, Bindings.INT_ARRAY); graph.claim(result, L0.ConsistsOf, L0.PartOf, newCell); } diff --git a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/wizards/models/WizardModelsImportPage.java b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/wizards/models/WizardModelsImportPage.java index 39a6487f..6de98d7a 100644 --- a/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/wizards/models/WizardModelsImportPage.java +++ b/simantics-1.7/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/wizards/models/WizardModelsImportPage.java @@ -308,7 +308,7 @@ public class WizardModelsImportPage extends WizardPage{ Layer0 l0 = Layer0.getInstance(graph); // The links should be exported and imported automatically Resource sysdyn = graph.getResource("http://www.simantics.org/Sysdyn-1.1"); - Resource layer0 = graph.getResource("http://www.simantics.org/Layer0-1.0"); + Resource layer0 = graph.getResource("http://www.simantics.org/Layer0-1.1"); if(!graph.hasStatement(model, l0.IsLinkedTo, sysdyn)) graph.claim(model, l0.IsLinkedTo, sysdyn); if(!graph.hasStatement(model, l0.IsLinkedTo, layer0)) @@ -408,21 +408,21 @@ public class WizardModelsImportPage extends WizardPage{ { Resource newCell = graph.newResource(); - graph.claim(newCell, L0.InstanceOf, null, sr.Cell); + graph.claim(newCell, L0.InstanceOf, null, sr.Dimensions); graph.claimLiteral(newCell, L0.HasName, L0.NameOf, L0.String, "Dimensions", Bindings.STRING); - graph.addLiteral(newCell, sr.FitColumns, sr.FitColumnsOf, L0.Boolean, false, Bindings.BOOLEAN); - graph.addLiteral(newCell, sr.FitRows, sr.FitRowsOf, L0.Boolean, false, Bindings.BOOLEAN); - graph.addLiteral(newCell, sr.ColumnCount, sr.ColumnCountOf, L0.Integer, 128, Bindings.INTEGER); - graph.addLiteral(newCell, sr.RowCount, sr.RowCountOf, L0.Integer, 256, Bindings.INTEGER); + graph.addLiteral(newCell, sr.Dimensions_fitColumns, sr.Dimensions_fitColumns_Inverse, L0.Boolean, false, Bindings.BOOLEAN); + graph.addLiteral(newCell, sr.Dimensions_fitRows, sr.Dimensions_fitRows_Inverse, L0.Boolean, false, Bindings.BOOLEAN); + graph.addLiteral(newCell, sr.Dimensions_columnCount, sr.Dimensions_columnCount_Inverse, L0.Integer, 128, Bindings.INTEGER); + graph.addLiteral(newCell, sr.Dimensions_rowCount, sr.Dimensions_rowCount_Inverse, L0.Integer, 256, Bindings.INTEGER); graph.claim(result, L0.ConsistsOf, L0.PartOf, newCell); } { Resource newCell = graph.newResource(); - graph.claim(newCell, L0.InstanceOf, null, sr.Cell); + graph.claim(newCell, L0.InstanceOf, null, sr.Dimensions); graph.claimLiteral(newCell, L0.HasName, L0.NameOf, L0.String, "Headers", Bindings.STRING); - graph.addLiteral(newCell, sr.ColumnLabels, sr.ColumnLabelsOf, L0.StringArray, colNames, Bindings.STRING_ARRAY); - graph.addLiteral(newCell, sr.ColumnWidths, sr.ColumnWidthsOf, L0.IntegerArray, colWidths, Bindings.INT_ARRAY); + graph.addLiteral(newCell, sr.Headers_columnLabels, sr.Headers_columnLabels_Inverse, L0.StringArray, colNames, Bindings.STRING_ARRAY); + graph.addLiteral(newCell, sr.Headers_columnWidths, sr.Headers_columnWidths_Inverse, L0.IntegerArray, colWidths, Bindings.INT_ARRAY); graph.claim(result, L0.ConsistsOf, L0.PartOf, newCell); } diff --git a/simantics-1.7/org.simantics.sysdyn/META-INF/MANIFEST.MF b/simantics-1.7/org.simantics.sysdyn/META-INF/MANIFEST.MF index 419e69b2..b96a03dc 100644 --- a/simantics-1.7/org.simantics.sysdyn/META-INF/MANIFEST.MF +++ b/simantics-1.7/org.simantics.sysdyn/META-INF/MANIFEST.MF @@ -24,7 +24,8 @@ Require-Bundle: org.simantics.objmap;bundle-version="0.1.0", org.simantics.db.layer0;bundle-version="1.1.0", org.simantics.spreadsheet.common;bundle-version="1.1.0", org.simantics.spreadsheet;bundle-version="1.1.0", - org.eclipse.jface.text;bundle-version="3.6.1" + org.eclipse.jface.text;bundle-version="3.6.1", + org.simantics.spreadsheet.ontology;bundle-version="1.2.0" Export-Package: org.simantics.sysdyn, org.simantics.sysdyn.adapter, org.simantics.sysdyn.expressionParser, diff --git a/simantics-1.7/org.simantics.sysdyn/adapters.xml b/simantics-1.7/org.simantics.sysdyn/adapters.xml index c5cb3a95..74013f11 100644 --- a/simantics-1.7/org.simantics.sysdyn/adapters.xml +++ b/simantics-1.7/org.simantics.sysdyn/adapters.xml @@ -26,7 +26,7 @@ class="org.simantics.sysdyn.adapter.ConfigurationVariable" > - @@ -44,7 +44,7 @@ - diff --git a/simantics-1.7/org.simantics.sysdyn/src/org/simantics/sysdyn/Functions.java b/simantics-1.7/org.simantics.sysdyn/src/org/simantics/sysdyn/Functions.java index 44fcc4a0..e87f4c57 100644 --- a/simantics-1.7/org.simantics.sysdyn/src/org/simantics/sysdyn/Functions.java +++ b/simantics-1.7/org.simantics.sysdyn/src/org/simantics/sysdyn/Functions.java @@ -9,6 +9,7 @@ import org.simantics.db.WriteGraph; import org.simantics.db.common.request.ResourceRead; import org.simantics.db.common.uri.UnescapedChildMapOfResource; import org.simantics.db.exception.DatabaseException; +import org.simantics.db.layer0.function.All; import org.simantics.db.layer0.variable.StandardGraphChildVariable; import org.simantics.db.layer0.variable.ValueAccessor; import org.simantics.db.layer0.variable.Variable; @@ -104,13 +105,16 @@ public class Functions { StandardGraphChildVariable variable = (StandardGraphChildVariable)context; Map children = graph.syncRequest(new StructuralChildMapOfResource(getConfiguration(graph, variable))); Resource child = children.get(name); - if(child == null) return null; + if(child == null) return All.getStandardChildDomainChildVariable(graph, context, name); return graph.getPossibleContextualAdapter(child, variable, Variable.class, Variable.class); } @Override public void getVariables(ReadGraph graph, Variable context, Map map) throws DatabaseException { StandardGraphChildVariable variable = (StandardGraphChildVariable)context; + + All.getStandardChildDomainChildVariables(graph, context, map); + for(Map.Entry entry : graph.syncRequest(new StructuralChildMapOfResource(getConfiguration(graph, variable))).entrySet()) { String name = entry.getKey(); Resource child = entry.getValue(); diff --git a/simantics-1.7/org.simantics.sysdyn/src/org/simantics/sysdyn/adapter/IndexVariable.java b/simantics-1.7/org.simantics.sysdyn/src/org/simantics/sysdyn/adapter/IndexVariable.java index dbfb5c45..08a0107e 100644 --- a/simantics-1.7/org.simantics.sysdyn/src/org/simantics/sysdyn/adapter/IndexVariable.java +++ b/simantics-1.7/org.simantics.sysdyn/src/org/simantics/sysdyn/adapter/IndexVariable.java @@ -208,7 +208,7 @@ public abstract class IndexVariable extends AbstractPropertyVariable { String test = rvi; if(indexes != null && !indexes.isEmpty()) { - String regexIndexes = indexes.trim().replace('.', ',').replaceAll("\\b_\\b", "[a-zA-Z0-9_]*"); + String regexIndexes = indexes.trim().replaceAll("\\b_\\b", "[a-zA-Z0-9_]*"); // Why was there was ".replace('.', ',')" ? - Removed by Teemu 2.9.2012 test = rvi + "\\[" + regexIndexes + "\\]"; } else { test = rvi + "(\\[.*\\])?"; diff --git a/simantics-1.7/org.simantics.sysdyn/src/org/simantics/sysdyn/expressionParser/ExpressionParser.java b/simantics-1.7/org.simantics.sysdyn/src/org/simantics/sysdyn/expressionParser/ExpressionParser.java index 0a4682b7..74bd7544 100644 --- a/simantics-1.7/org.simantics.sysdyn/src/org/simantics/sysdyn/expressionParser/ExpressionParser.java +++ b/simantics-1.7/org.simantics.sysdyn/src/org/simantics/sysdyn/expressionParser/ExpressionParser.java @@ -364,6 +364,7 @@ public class ExpressionParser implements ExpressionParserConstants { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case 84: jj_consume_token(84); + primary(); break; case 85: jj_consume_token(85); diff --git a/simantics-1.7/org.simantics.sysdyn/src/org/simantics/sysdyn/expressionParser/ExpressionParser.jj b/simantics-1.7/org.simantics.sysdyn/src/org/simantics/sysdyn/expressionParser/ExpressionParser.jj index 6d9c3579..a62133f6 100644 --- a/simantics-1.7/org.simantics.sysdyn/src/org/simantics/sysdyn/expressionParser/ExpressionParser.jj +++ b/simantics-1.7/org.simantics.sysdyn/src/org/simantics/sysdyn/expressionParser/ExpressionParser.jj @@ -185,7 +185,7 @@ void term() : { void factor() : { } { - primary() ( "^" | ".^" primary() )? + primary() ( "^" primary() | ".^" primary() )? } void mul_op() : { diff --git a/simantics-1.7/org.simantics.sysdyn/src/org/simantics/sysdyn/refactoring/TGRefactoring.java b/simantics-1.7/org.simantics.sysdyn/src/org/simantics/sysdyn/refactoring/TGRefactoring.java new file mode 100644 index 00000000..0c9a0e53 --- /dev/null +++ b/simantics-1.7/org.simantics.sysdyn/src/org/simantics/sysdyn/refactoring/TGRefactoring.java @@ -0,0 +1,91 @@ +package org.simantics.sysdyn.refactoring; + +import gnu.trove.set.hash.TIntHashSet; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.net.URLDecoder; +import java.util.ArrayList; + +import org.simantics.databoard.binding.mutable.Variant; +import org.simantics.databoard.container.DataContainer; +import org.simantics.databoard.container.DataContainers; +import org.simantics.graph.query.Path; +import org.simantics.graph.query.TransferableGraphConversion; +import org.simantics.graph.query.UriUtils; +import org.simantics.graph.refactoring.GraphRefactoringUtils; +import org.simantics.graph.refactoring.MappingSpecification; +import org.simantics.graph.refactoring.MappingSpecification.MappingRule; +import org.simantics.graph.representation.TransferableGraph1; +import org.simantics.graph.store.IdentityStore; + +public class TGRefactoring { + + public static void main(String[] args) throws Exception { + // Select the directory where this file is + File dir = new File(URLDecoder.decode(TGRefactoring.class.getResource(".").getPath(), "UTF-8")).getAbsoluteFile(); + System.out.println(dir); + + // Choose input and output files for refactoring. Files are relative to the selected directory. + File input = new File(dir, "ServiceModel_2012-08-28b.tg"); // use your own file names + File mappingSpec = new File(dir, "mappingSpec.txt"); + File output = new File(dir, "ServiceModel_2012-08-28b-refactored.tg"); + + // Get a map containing the changed names + + // Read input file + DataContainer dc = DataContainers.readFile(input); + + // Get transferable graph from the input file + TransferableGraph1 tg1 = (TransferableGraph1) dc.content.getValue(TransferableGraph1.BINDING); + + MappingSpecification spec = readMappingSpec(mappingSpec); + boolean fixed = GraphRefactoringUtils.fixIncorrectRoot(tg1.identities); + IdentityStore idStore = TransferableGraphConversion.extractIdentities(tg1); + TIntHashSet parentsAffected = new TIntHashSet(); + GraphRefactoringUtils.refactor(idStore, spec, parentsAffected); + tg1.resourceCount = idStore.getResourceCount(); + tg1.identities = idStore.toArray(); +// GraphRefactoringUtils.compactify(tg1, parentsAffected); + if(fixed) + GraphRefactoringUtils.unfixIncorrectRoot(tg1.identities); + + // Rewrite DataContainer content + dc.content = new Variant(TransferableGraph1.BINDING, tg1); + + // Write the refactored graph to output file + DataContainers.writeFile(output, dc); + } + + private static MappingSpecification readMappingSpec(File mappingSpec) throws IOException { + BufferedReader reader = new BufferedReader(new FileReader(mappingSpec)); + ArrayList rules = new ArrayList(); + while(true) { + String line = reader.readLine(); + if(line == null) + break; + line = line.trim(); + if(line.isEmpty()) + continue; + String[] parts = line.trim().split(" "); + if(parts.length == 2) { + Path from = UriUtils.uriToPath(parts[0]); + Path to = UriUtils.uriToPath(parts[1]); + rules.add(new MappingRule(from, to)); + } else { + if(line.trim().startsWith("//") || (line.trim().startsWith("/*") && line.trim().endsWith("/*"))) { + // Comment + } else { + reader.close(); + throw new IOException("Invalid mapping spec format. Every non-empty line should contain two URIs or comment"); + } + } + } + reader.close(); + + return new MappingSpecification(rules); + } + +} diff --git a/simantics-1.7/org.simantics.sysdyn/src/org/simantics/sysdyn/refactoring/mappingSpec.txt b/simantics-1.7/org.simantics.sysdyn/src/org/simantics/sysdyn/refactoring/mappingSpec.txt new file mode 100644 index 00000000..51835211 --- /dev/null +++ b/simantics-1.7/org.simantics.sysdyn/src/org/simantics/sysdyn/refactoring/mappingSpec.txt @@ -0,0 +1,38 @@ + +// 4.9.2012 ontology changes +http://www.simantics.org/Layer0-1.0 http://www.simantics.org/Layer0-1.1 +http://www.simantics.org/Layer0X-1.0 http://www.simantics.org/Layer0X-1.1 +http://www.simantics.org/G2D-1.0 http://www.simantics.org/G2D-1.1 +http://www.simantics.org/Structural-1.0 http://www.simantics.org/Structural-1.2 +http://www.simantics.org/Diagram-2.1 http://www.simantics.org/Diagram-2.2 +http://www.simantics.org/Simulation-1.0 http://www.simantics.org/Simulation-1.1 +http://www.simantics.org/Modeling-1.1 http://www.simantics.org/Modeling-1.2 +http://www.simantics.org/Project-1.1 http://www.simantics.org/Project-1.2 +http://www.simantics.org/Spreadsheet-1.1 http://www.simantics.org/Spreadsheet-1.2 +http://www.simantics.org/Viewpoint-1.1 http://www.simantics.org/Viewpoint-1.2 +http://www.simantics.org/Image2-1.1 http://www.simantics.org/Image2-1.2 +http://www.simantics.org/Color-1.0 http://www.simantics.org/Color-1.1 +http://www.simantics.org/Action-1.0 http://www.simantics.org/Action-1.1 +http://www.simantics.org/Silk-1.0 http://www.simantics.org/Silk-1.1 +http://www.simantics.org/Issue-1.1 http://www.simantics.org/Issue-1.2 +http://www.simantics.org/User-1.0 http://www.simantics.org/User-1.1 +http://www.simantics.org/Documentation-1.0 http://www.simantics.org/Documentation-1.1 +http://www.simantics.org/Document-1.1 http://www.simantics.org/Document-1.2 +http://www.simantics.org/SelectionView-1.1 http://www.simantics.org/SelectionView-1.2 + +// Spreadsheet changes +http://www.simantics.org/Spreadsheet-1.2/HasContent http://www.simantics.org/Spreadsheet-1.2/Cell/content +http://www.simantics.org/Spreadsheet-1.2/FitRows http://www.simantics.org/Spreadsheet-1.2/Dimensions/fitRows +http://www.simantics.org/Spreadsheet-1.2/FitColumns http://www.simantics.org/Spreadsheet-1.2/Dimensions/fitColumns +http://www.simantics.org/Spreadsheet-1.2/ColumnCount http://www.simantics.org/Spreadsheet-1.2/Dimensions/columnCount +http://www.simantics.org/Spreadsheet-1.2/ColumnLabels http://www.simantics.org/Spreadsheet-1.2/Headers/columnLabels +http://www.simantics.org/Spreadsheet-1.2/RowCount http://www.simantics.org/Spreadsheet-1.2/Dimensions/rowCount +http://www.simantics.org/Spreadsheet-1.2/ColumnWidths http://www.simantics.org/Spreadsheet-1.2/Headers/columnWidths + +http://www.simantics.org/Spreadsheet-1.2/ContentOf http://www.simantics.org/Spreadsheet-1.2/Cell/content/Inverse +http://www.simantics.org/Spreadsheet-1.2/FitRowsOf http://www.simantics.org/Spreadsheet-1.2/Dimensions/fitRows/Inverse +http://www.simantics.org/Spreadsheet-1.2/FitColumnsOf http://www.simantics.org/Spreadsheet-1.2/Dimensions/fitColumns/Inverse +http://www.simantics.org/Spreadsheet-1.2/ColumnCountOf http://www.simantics.org/Spreadsheet-1.2/Dimensions/columnCount/Inverse +http://www.simantics.org/Spreadsheet-1.2/ColumnLabelsOf http://www.simantics.org/Spreadsheet-1.2/Headers/columnLabels/Inverse +http://www.simantics.org/Spreadsheet-1.2/RowCountOf http://www.simantics.org/Spreadsheet-1.2/Dimensions/rowCount/Inverse +http://www.simantics.org/Spreadsheet-1.2/ColumnWidthsOf http://www.simantics.org/Spreadsheet-1.2/Headers/columnWidths/Inverse \ No newline at end of file diff --git a/simantics-1.7/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Book.java b/simantics-1.7/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Book.java index 031d4f43..fa794788 100644 --- a/simantics-1.7/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Book.java +++ b/simantics-1.7/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Book.java @@ -6,9 +6,10 @@ import java.util.List; import org.simantics.layer0.Layer0; import org.simantics.objmap.annotations.GraphType; import org.simantics.objmap.annotations.RelatedElements; +import org.simantics.spreadsheet.resource.SpreadsheetResource; import org.simantics.sysdyn.representation.visitors.IElementVisitorVoid; -@GraphType("http://www.simantics.org/Spreadsheet-1.1/Book") +@GraphType(SpreadsheetResource.URIs.Book) public class Book extends Variable { @RelatedElements( diff --git a/simantics-1.7/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Sheet.java b/simantics-1.7/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Sheet.java index 71a3b756..4df9bcdb 100644 --- a/simantics-1.7/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Sheet.java +++ b/simantics-1.7/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Sheet.java @@ -23,8 +23,9 @@ import org.simantics.spreadsheet.common.exception.CellParseException; import org.simantics.spreadsheet.common.matrix.VariantMatrix; import org.simantics.spreadsheet.util.SpreadsheetUtils; import org.simantics.sysdyn.representation.visitors.IElementVisitorVoid; +import org.simantics.spreadsheet.resource.SpreadsheetResource; -@GraphType("http://www.simantics.org/Spreadsheet-1.1/Spreadsheet") +@GraphType(SpreadsheetResource.URIs.Spreadsheet) public class Sheet extends org.simantics.sysdyn.representation.Variable { @RelatedElement(Layer0.URIs.PartOf) -- 2.47.1