]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Sync git svn branch with SVN repository r33166.
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Mon, 5 Sep 2016 11:06:50 +0000 (14:06 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Mon, 5 Sep 2016 11:06:50 +0000 (14:06 +0300)
refs #6475

12 files changed:
bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/TransferableGraphRequest2.java
bundles/org.simantics.diagram.ontology/graph.tg
bundles/org.simantics.diagram.ontology/graph/DiagramScenegraph.pgraph
bundles/org.simantics.document.server/scl/Document/All.scl
bundles/org.simantics.document.server/src/org/simantics/document/server/Functions.java
bundles/org.simantics.document/simantics-wiki-documents-default-model.css
bundles/org.simantics.document/simantics-wiki-documents.css
bundles/org.simantics.document/src/org/simantics/document/Exportable.java
bundles/org.simantics.g2d.ontology/graph.tg
bundles/org.simantics.g2d.ontology/graph/G2D.pgraph
bundles/org.simantics.modeling.ontology/graph.tg
bundles/org.simantics.modeling.ontology/graph/Modeling.pgraph

index 446786171fca84d578aae9a452a0f0a4d214a3b6..6678e71c68dcf4939ee9a48a28d2b0060ea5d0ba 100644 (file)
@@ -60,6 +60,10 @@ import org.simantics.graph.representation.Value;
 import org.simantics.layer0.Layer0;\r
 import org.simantics.utils.datastructures.Pair;\r
 \r
 import org.simantics.layer0.Layer0;\r
 import org.simantics.utils.datastructures.Pair;\r
 \r
+/**\r
+ * @deprecated in favor of {@link ModelTransferableGraphSourceRequest}\r
+ */\r
+@Deprecated\r
 public class TransferableGraphRequest2 implements Read<TransferableGraph1> {\r
 \r
        public static String LOG_FILE = "transferableGraph.log";\r
 public class TransferableGraphRequest2 implements Read<TransferableGraph1> {\r
 \r
        public static String LOG_FILE = "transferableGraph.log";\r
index 543a0a3e3fdef857a646da16cfbd547742a35a5d..ab1473989a6c62d35bca5b833272126c1d841a7e 100644 (file)
Binary files a/bundles/org.simantics.diagram.ontology/graph.tg and b/bundles/org.simantics.diagram.ontology/graph.tg differ
index 0a7cc33fff20ae08e20360f64a66913cab5574d9..364b539faa44eedc5cc760694e606d64424bf5b7 100644 (file)
@@ -12,6 +12,7 @@ DIA.Scenegraph.Node <T SG.Node
 \r
 DIA.Scenegraph.Composite <T DIA.Scenegraph.Node\r
   >-- DIA.Scenegraph.Composite.transform --> G2D.Transform <R SG.Node.HasProperty : SEL.GenericParameterType\r
 \r
 DIA.Scenegraph.Composite <T DIA.Scenegraph.Node\r
   >-- DIA.Scenegraph.Composite.transform --> G2D.Transform <R SG.Node.HasProperty : SEL.GenericParameterType\r
+    ==> "Vector Double"\r
 \r
 DIA.Scenegraph.Component <T DIA.Scenegraph.Node\r
 \r
 \r
 DIA.Scenegraph.Component <T DIA.Scenegraph.Node\r
 \r
@@ -26,7 +27,7 @@ DIA.Scenegraph.AbstractText <T DIA.Scenegraph.Component
   >-- DIA.Scenegraph.AbstractText.color --> DATATYPES.RGB.Integer <R SG.Node.HasProperty : SEL.ColorParameterType\r
   >-- DIA.Scenegraph.AbstractText.font --> DATATYPES.Font <R SG.Node.HasProperty : SEL.FontParameterType\r
   >-- DIA.Scenegraph.AbstractText.transform --> G2D.Transform <R SG.Node.HasProperty : SEL.GenericParameterType\r
   >-- DIA.Scenegraph.AbstractText.color --> DATATYPES.RGB.Integer <R SG.Node.HasProperty : SEL.ColorParameterType\r
   >-- DIA.Scenegraph.AbstractText.font --> DATATYPES.Font <R SG.Node.HasProperty : SEL.FontParameterType\r
   >-- DIA.Scenegraph.AbstractText.transform --> G2D.Transform <R SG.Node.HasProperty : SEL.GenericParameterType\r
-    ==> "DoubleArray"\r
+    ==> "Vector Double"\r
   >-- DIA.Scenegraph.AbstractText.borderWidth --> L0.Value <R SG.Node.HasProperty : SEL.GenericParameterType\r
     ==> "Float"\r
   >-- DIA.Scenegraph.AbstractText.borderColor --> DATATYPES.RGB.Integer <R SG.Node.HasProperty : SEL.ColorParameterType\r
   >-- DIA.Scenegraph.AbstractText.borderWidth --> L0.Value <R SG.Node.HasProperty : SEL.GenericParameterType\r
     ==> "Float"\r
   >-- DIA.Scenegraph.AbstractText.borderColor --> DATATYPES.RGB.Integer <R SG.Node.HasProperty : SEL.ColorParameterType\r
@@ -74,6 +75,7 @@ DIA.Scenegraph.SVGImage <T DIA.Scenegraph.Component
   >-- DIA.Scenegraph.SVGImage.document --> L0.Value <R SG.Node.HasProperty : SEL.GenericParameterType\r
     ==> "String"\r
   >-- DIA.Scenegraph.SVGImage.transform --> G2D.Transform <R SG.Node.HasProperty : SEL.GenericParameterType\r
   >-- DIA.Scenegraph.SVGImage.document --> L0.Value <R SG.Node.HasProperty : SEL.GenericParameterType\r
     ==> "String"\r
   >-- DIA.Scenegraph.SVGImage.transform --> G2D.Transform <R SG.Node.HasProperty : SEL.GenericParameterType\r
+    ==> "Vector Double"\r
   @L0.assert DIA.Scenegraph.SVGImage.transform\r
     [1,0,0,1,0,0] : G2D.Transform\r
   
\ No newline at end of file
   @L0.assert DIA.Scenegraph.SVGImage.transform\r
     [1,0,0,1,0,0] : G2D.Transform\r
   
\ No newline at end of file
index 53124fb464194fcbbf53eab3cfc04c3d1e6fab8c..3d63eaf6a9463ade923a41b168ac0ba78a4d9fd5 100644 (file)
@@ -115,6 +115,8 @@ importJava "org.simantics.document.server.Functions" where
     @JavaName getPropertyValueCached\r
     propertyValueCached_ :: Variable -> String -> Binding a -> <ReadGraph> a\r
     \r
     @JavaName getPropertyValueCached\r
     propertyValueCached_ :: Variable -> String -> Binding a -> <ReadGraph> a\r
     \r
+    stateVariable :: Variable -> <ReadGraph> Variable\r
+    \r
 propertyValueCached :: Serializable a => Typeable a => Variable -> String -> <ReadGraph> a\r
 propertyValueCached var prop = propertyValueCached_ var prop binding\r
     \r
 propertyValueCached :: Serializable a => Typeable a => Variable -> String -> <ReadGraph> a\r
 propertyValueCached var prop = propertyValueCached_ var prop binding\r
     \r
index 2fd422f5eb5447df01bbe491fd5349e5b861f0c8..2ba85b733adc1d10d8888afe9cb0f27f6161c1bd 100644 (file)
@@ -185,6 +185,13 @@ public class Functions {
        return Variables.getVariable(graph, uri);\r
     }\r
     \r
        return Variables.getVariable(graph, uri);\r
     }\r
     \r
+    public static Variable stateVariable(ReadGraph graph, Variable self) throws DatabaseException {\r
+       Variable session = graph.syncRequest(new ProxySessionRequest(self));\r
+       if (session == null)\r
+               throw new DatabaseException("No state for " + self.getURI(graph));\r
+       return session.getPossibleChild(graph, "__scl__");\r
+    }\r
+    \r
     @SCLValue(type = "ReadGraph -> Resource -> Variable -> Variable")\r
     public static Variable state(ReadGraph graph, Resource converter, Variable context) throws DatabaseException {\r
        Variable session = graph.syncRequest(new ProxySessionRequest(context));\r
     @SCLValue(type = "ReadGraph -> Resource -> Variable -> Variable")\r
     public static Variable state(ReadGraph graph, Resource converter, Variable context) throws DatabaseException {\r
        Variable session = graph.syncRequest(new ProxySessionRequest(context));\r
index 6fa388daebd3789ff9030ca3a613caafd9edec6f..47b66055eb545de8d2505822d14af837df43f000 100644 (file)
@@ -15,7 +15,7 @@ div.description {
     font-family: "Times New Roman";\r
     font-size: 1.5em;\r
     color: black;\r
     font-family: "Times New Roman";\r
     font-size: 1.5em;\r
     color: black;\r
-    margin-left: 10px;\r
+    margin-left: 0px;\r
     margin-bottom: 10px;\r
     margin-right: 0px;\r
     margin-top: 0px;\r
     margin-bottom: 10px;\r
     margin-right: 0px;\r
     margin-top: 0px;\r
@@ -27,7 +27,7 @@ p {
     font-size: 1.0em;\r
     color: black;\r
     margin-top: 10px;\r
     font-size: 1.0em;\r
     color: black;\r
     margin-top: 10px;\r
-    margin-bottom: 10px;\r
+    margin-bottom: 15px;\r
 }\r
 \r
 /* Level 1 header */\r
 }\r
 \r
 /* Level 1 header */\r
@@ -35,17 +35,17 @@ h1 {
     font-family: "Times New Roman";\r
     font-size: 1.6em;\r
     color: black;\r
     font-family: "Times New Roman";\r
     font-size: 1.6em;\r
     color: black;\r
-       margin-top: 16px;\r
-       margin-bottom: 2px;\r
+    margin-top: 16px;\r
+    margin-bottom: 2px;\r
 }\r
 \r
 /* Level 2 header */\r
 h2 {\r
     font-family: "Times New Roman";\r
 }\r
 \r
 /* Level 2 header */\r
 h2 {\r
     font-family: "Times New Roman";\r
-       font-size: 1.4em;\r
+    font-size: 1.4em;\r
     color: black;\r
     color: black;\r
-       margin-top: 14px;\r
-       margin-bottom: 2px;\r
+    margin-top: 14px;\r
+    margin-bottom: 2px;\r
 }\r
 \r
 /* Level 3 header */\r
 }\r
 \r
 /* Level 3 header */\r
@@ -53,8 +53,8 @@ h3 {
     font-family: "Times New Roman";\r
     font-size: 1.2em;\r
     color: black;\r
     font-family: "Times New Roman";\r
     font-size: 1.2em;\r
     color: black;\r
-       margin-top: 12px;\r
-       margin-bottom: 2px;\r
+    margin-top: 12px;\r
+    margin-bottom: 2px;\r
 }\r
 \r
 /* Level 4 header */\r
 }\r
 \r
 /* Level 4 header */\r
@@ -62,8 +62,8 @@ h4 {
     font-family: "Times New Roman";\r
     font-size: 1.0em;\r
     color: black;\r
     font-family: "Times New Roman";\r
     font-size: 1.0em;\r
     color: black;\r
-       margin-top: 10px;\r
-       margin-bottom: 2px;\r
+    margin-top: 10px;\r
+    margin-bottom: 2px;\r
 }\r
 \r
 /* Numbered list items */\r
 }\r
 \r
 /* Numbered list items */\r
@@ -84,23 +84,52 @@ ol li {
     margin-bottom: 1px;\r
 }\r
 \r
     margin-bottom: 1px;\r
 }\r
 \r
+/* Links */\r
+a {\r
+    font-family: "Times New Roman";\r
+    font-size: 1.0em;\r
+    margin-left: 2px;\r
+    margin-top: 1px;\r
+    margin-bottom: 1px;\r
+}\r
+\r
 /* Table items */\r
 td div {\r
     font-family: "Times New Roman";\r
 /* Table items */\r
 td div {\r
     font-family: "Times New Roman";\r
-    font-size: 1.0em;\r
+    font-size: 0.6em;\r
+    line-height: 1.2;\r
+    padding: 2px;\r
 }\r
 \r
 /* Tables items */\r
 table {\r
 }\r
 \r
 /* Tables items */\r
 table {\r
+    table-layout: auto;\r
+    width: auto;\r
+\r
     margin-top: 10px;\r
     margin-bottom: 10px;\r
     margin-top: 10px;\r
     margin-bottom: 10px;\r
+    margin-left: 15px;\r
+    margin-right: 30px;\r
+\r
+    border-collapse: collapse;\r
+    border: 0px solid black;\r
+\r
+    -webkit-user-select: text;\r
+    -moz-user-select: text;\r
+    -ms-user-select: text;\r
+    user-select: text;\r
 }\r
 \r
 }\r
 \r
-/* Links */\r
-a {\r
-    font-family: "Times New Roman";\r
-    font-size: 1.0em;\r
-    margin-left: 2px;\r
-    margin-top: 1px;\r
-    margin-bottom: 1px;\r
+table div {\r
+    white-space: normal;\r
+}\r
+\r
+th, td {\r
+    text-align: left;\r
+    border: 1px solid black;\r
+    padding: 2px;\r
+}\r
+\r
+td div, th div {\r
+    border: none;\r
 }\r
 }\r
index 101e698c927fe547bb1a634a8ad8ab48df22bc93..c28af5b17e9ad164f93482b1ac0350a629d20b05 100644 (file)
@@ -37,18 +37,18 @@ div {
 }\r
 \r
 table {\r
 }\r
 \r
 table {\r
-       \r
        border-collapse: collapse;\r
        border-collapse: collapse;\r
-       width: 100%;\r
        table-layout: fixed;\r
        table-layout: fixed;\r
+       box-sizing: border-box;\r
+       width: 100%;\r
+\r
        -webkit-user-select: text;\r
        -moz-user-select: text;\r
        -ms-user-select: text;\r
        user-select: text;\r
        -webkit-user-select: text;\r
        -moz-user-select: text;\r
        -ms-user-select: text;\r
        user-select: text;\r
+\r
        border: 0px;\r
        padding: 0px;\r
        border: 0px;\r
        padding: 0px;\r
-       box-sizing: border-box;\r
-\r
 }\r
 \r
 td {\r
 }\r
 \r
 td {\r
@@ -75,24 +75,23 @@ table th:first-child div {
 }\r
 \r
 table div {\r
 }\r
 \r
 table div {\r
+       height: auto;\r
+       width: auto;\r
 \r
        padding-left: 1px;\r
 \r
        border-right: 1px;\r
        border-left: 1px;\r
 \r
        padding-left: 1px;\r
 \r
        border-right: 1px;\r
        border-left: 1px;\r
-\r
        border-top: 1px;\r
        border-bottom: 1px;\r
        border-top: 1px;\r
        border-bottom: 1px;\r
+       \r
        margin-bottom: -1px;\r
        margin-left: -1px;\r
        \r
        border-style: solid;\r
        margin-bottom: -1px;\r
        margin-left: -1px;\r
        \r
        border-style: solid;\r
-       text-overflow: ellipsis;\r
        overflow: hidden;\r
        overflow: hidden;\r
+       text-overflow: ellipsis;\r
        white-space: nowrap;\r
        white-space: nowrap;\r
-       height: auto;\r
-       width: auto;\r
        page-break-inside: avoid;\r
        page-break-inside: avoid;\r
-    box-sizing: border-box;\r
-               \r
+       box-sizing: border-box;\r
 }\r
 }\r
index 74a739352a27ae2ba951b3ed18cac2574196fd55..637340b909b0379dc46f7d2812d9d18fe03816d2 100644 (file)
@@ -74,8 +74,7 @@ public class Exportable implements IExportable {
                this.settings = settings;\r
                \r
                MarkupParser markupParser = new MarkupParser();\r
                this.settings = settings;\r
                \r
                MarkupParser markupParser = new MarkupParser();\r
-               MediaWikiLanguage language = new MediaWikiLanguage();\r
-               markupParser.setMarkupLanguage(language);\r
+               markupParser.setMarkupLanguage(new MediaWikiLanguage());\r
                String html = markupParser.parseToHtml(wiki);\r
                \r
                String width = "width:" + (210-settings.marginLeft-settings.marginRight) + "mm;";\r
                String html = markupParser.parseToHtml(wiki);\r
                \r
                String width = "width:" + (210-settings.marginLeft-settings.marginRight) + "mm;";\r
@@ -95,7 +94,7 @@ public class Exportable implements IExportable {
                html = html.replace("<th>", "<th><div>");\r
                html = html.replace("</td>", "</div></td>");\r
                html = html.replace("</th>", "</div></th>");\r
                html = html.replace("<th>", "<th><div>");\r
                html = html.replace("</td>", "</div></td>");\r
                html = html.replace("</th>", "</div></th>");\r
-               html = html.replace("</head>", "<style type=\"text/css\">" + DEFAULT_CSS + css +  "</style></head>");\r
+               html = html.replace("</head>", "<style type=\"text/css\">\n" + DEFAULT_CSS + css +  "\n</style>\n</head>\n");\r
                \r
                this.html = html;\r
                \r
                \r
                this.html = html;\r
                \r
index c215a73ccd3c34537d95647fac75e11a81766ea1..362c08c0753448e2524f8a6fb4865baf0d1efb51 100644 (file)
Binary files a/bundles/org.simantics.g2d.ontology/graph.tg and b/bundles/org.simantics.g2d.ontology/graph.tg differ
index e055f69cce1aa5d401b849dfceeaddd68a397dfc..6f0de29e4e770f4236373e971a4e487c4d5ed97e 100644 (file)
@@ -26,6 +26,7 @@ G2D.HasPoint2DArray <R L0.DependsOn
 // FIXME: use proper datatypes\r
 G2D.Transform <T L0.Literal\r
     @L0.assert L0.HasDataType $(Double[6])\r
 // FIXME: use proper datatypes\r
 G2D.Transform <T L0.Literal\r
     @L0.assert L0.HasDataType $(Double[6])\r
+    @L0.assert L0.HasValueType "Vector Double"\r
     L0.HasDescription "A 2x3 matrix of six doubles representing an affine 2D transformation in column-major order."\r
 \r
 G2D.Transform."i-0" <R L0.HasProperty : L0.FunctionalRelation : SEL.GenericParameterType\r
     L0.HasDescription "A 2x3 matrix of six doubles representing an affine 2D transformation in column-major order."\r
 \r
 G2D.Transform."i-0" <R L0.HasProperty : L0.FunctionalRelation : SEL.GenericParameterType\r
index 011801300faaceaa4a09d7fd28eecc0d90914ac3..e07cd6b11b928adca1ce721d835b9440f14604d2 100644 (file)
Binary files a/bundles/org.simantics.modeling.ontology/graph.tg and b/bundles/org.simantics.modeling.ontology/graph.tg differ
index 1bd459db5b94c296171b02414bfdda76aba4f170..b8ab1cbfa2017cb5d3ab1f13664a4d1eb9e50f53 100644 (file)
@@ -121,7 +121,7 @@ MOD.ConnectionMappingSpecification <T L0.Entity
     // MOD.DiagramConnectionRelationToConnectionRelationC\r
     // MOD.DiagramConnectionRelationToComponentType\r
 MOD.ConnectionRelationToConnectionMappingSpecification <R L0.IsRelatedTo\r
     // MOD.DiagramConnectionRelationToConnectionRelationC\r
     // MOD.DiagramConnectionRelationToComponentType\r
 MOD.ConnectionRelationToConnectionMappingSpecification <R L0.IsRelatedTo\r
-    L0.HasDomain DIA.Connector\r
+    L0.HasDomain STR.ConnectionRelation\r
     L0.HasRange MOD.ConnectionMappingSpecification\r
 MOD.NeedsConnectionMappingSpecification <R L0.IsRelatedTo : L0.Tag : L0.FunctionalRelation\r
     L0.HasDescription "Tells a connection relation that a diagram connection using it will require a DIA.Connector that has MOD.HasConnectionMappingSpecification statement attached to it if the used connection type has a MOD.ConnectionTypeToConnectionMappingSpecification specified. It guides connection creation."\r
     L0.HasRange MOD.ConnectionMappingSpecification\r
 MOD.NeedsConnectionMappingSpecification <R L0.IsRelatedTo : L0.Tag : L0.FunctionalRelation\r
     L0.HasDescription "Tells a connection relation that a diagram connection using it will require a DIA.Connector that has MOD.HasConnectionMappingSpecification statement attached to it if the used connection type has a MOD.ConnectionTypeToConnectionMappingSpecification specified. It guides connection creation."\r