From: Tuukka Lehtonen Date: Mon, 5 Sep 2016 11:06:50 +0000 (+0300) Subject: Sync git svn branch with SVN repository r33166. X-Git-Tag: v1.25.0~140^2 X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=commitdiff_plain;h=4a2d762e1e33404d77eeec4542a4a10bfa738dd2 Sync git svn branch with SVN repository r33166. refs #6475 --- diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/TransferableGraphRequest2.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/TransferableGraphRequest2.java index 446786171..6678e71c6 100644 --- a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/TransferableGraphRequest2.java +++ b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/TransferableGraphRequest2.java @@ -60,6 +60,10 @@ import org.simantics.graph.representation.Value; import org.simantics.layer0.Layer0; import org.simantics.utils.datastructures.Pair; +/** + * @deprecated in favor of {@link ModelTransferableGraphSourceRequest} + */ +@Deprecated public class TransferableGraphRequest2 implements Read { public static String LOG_FILE = "transferableGraph.log"; diff --git a/bundles/org.simantics.diagram.ontology/graph.tg b/bundles/org.simantics.diagram.ontology/graph.tg index 543a0a3e3..ab1473989 100644 Binary files a/bundles/org.simantics.diagram.ontology/graph.tg and b/bundles/org.simantics.diagram.ontology/graph.tg differ diff --git a/bundles/org.simantics.diagram.ontology/graph/DiagramScenegraph.pgraph b/bundles/org.simantics.diagram.ontology/graph/DiagramScenegraph.pgraph index 0a7cc33ff..364b539fa 100644 --- a/bundles/org.simantics.diagram.ontology/graph/DiagramScenegraph.pgraph +++ b/bundles/org.simantics.diagram.ontology/graph/DiagramScenegraph.pgraph @@ -12,6 +12,7 @@ DIA.Scenegraph.Node -- DIA.Scenegraph.Composite.transform --> G2D.Transform "Vector Double" DIA.Scenegraph.Component -- DIA.Scenegraph.AbstractText.color --> DATATYPES.RGB.Integer -- DIA.Scenegraph.AbstractText.font --> DATATYPES.Font -- DIA.Scenegraph.AbstractText.transform --> G2D.Transform "DoubleArray" + ==> "Vector Double" >-- DIA.Scenegraph.AbstractText.borderWidth --> L0.Value "Float" >-- DIA.Scenegraph.AbstractText.borderColor --> DATATYPES.RGB.Integer -- DIA.Scenegraph.SVGImage.document --> L0.Value "String" >-- DIA.Scenegraph.SVGImage.transform --> G2D.Transform "Vector Double" @L0.assert DIA.Scenegraph.SVGImage.transform [1,0,0,1,0,0] : G2D.Transform \ No newline at end of file diff --git a/bundles/org.simantics.document.server/scl/Document/All.scl b/bundles/org.simantics.document.server/scl/Document/All.scl index 53124fb46..3d63eaf6a 100644 --- a/bundles/org.simantics.document.server/scl/Document/All.scl +++ b/bundles/org.simantics.document.server/scl/Document/All.scl @@ -115,6 +115,8 @@ importJava "org.simantics.document.server.Functions" where @JavaName getPropertyValueCached propertyValueCached_ :: Variable -> String -> Binding a -> a + stateVariable :: Variable -> Variable + propertyValueCached :: Serializable a => Typeable a => Variable -> String -> a propertyValueCached var prop = propertyValueCached_ var prop binding diff --git a/bundles/org.simantics.document.server/src/org/simantics/document/server/Functions.java b/bundles/org.simantics.document.server/src/org/simantics/document/server/Functions.java index 2fd422f5e..2ba85b733 100644 --- a/bundles/org.simantics.document.server/src/org/simantics/document/server/Functions.java +++ b/bundles/org.simantics.document.server/src/org/simantics/document/server/Functions.java @@ -185,6 +185,13 @@ public class Functions { return Variables.getVariable(graph, uri); } + public static Variable stateVariable(ReadGraph graph, Variable self) throws DatabaseException { + Variable session = graph.syncRequest(new ProxySessionRequest(self)); + if (session == null) + throw new DatabaseException("No state for " + self.getURI(graph)); + return session.getPossibleChild(graph, "__scl__"); + } + @SCLValue(type = "ReadGraph -> Resource -> Variable -> Variable") public static Variable state(ReadGraph graph, Resource converter, Variable context) throws DatabaseException { Variable session = graph.syncRequest(new ProxySessionRequest(context)); diff --git a/bundles/org.simantics.document/simantics-wiki-documents-default-model.css b/bundles/org.simantics.document/simantics-wiki-documents-default-model.css index 6fa388dae..47b66055e 100644 --- a/bundles/org.simantics.document/simantics-wiki-documents-default-model.css +++ b/bundles/org.simantics.document/simantics-wiki-documents-default-model.css @@ -15,7 +15,7 @@ div.description { font-family: "Times New Roman"; font-size: 1.5em; color: black; - margin-left: 10px; + margin-left: 0px; margin-bottom: 10px; margin-right: 0px; margin-top: 0px; @@ -27,7 +27,7 @@ p { font-size: 1.0em; color: black; margin-top: 10px; - margin-bottom: 10px; + margin-bottom: 15px; } /* Level 1 header */ @@ -35,17 +35,17 @@ h1 { font-family: "Times New Roman"; font-size: 1.6em; color: black; - margin-top: 16px; - margin-bottom: 2px; + margin-top: 16px; + margin-bottom: 2px; } /* Level 2 header */ h2 { font-family: "Times New Roman"; - font-size: 1.4em; + font-size: 1.4em; color: black; - margin-top: 14px; - margin-bottom: 2px; + margin-top: 14px; + margin-bottom: 2px; } /* Level 3 header */ @@ -53,8 +53,8 @@ h3 { font-family: "Times New Roman"; font-size: 1.2em; color: black; - margin-top: 12px; - margin-bottom: 2px; + margin-top: 12px; + margin-bottom: 2px; } /* Level 4 header */ @@ -62,8 +62,8 @@ h4 { font-family: "Times New Roman"; font-size: 1.0em; color: black; - margin-top: 10px; - margin-bottom: 2px; + margin-top: 10px; + margin-bottom: 2px; } /* Numbered list items */ @@ -84,23 +84,52 @@ ol li { margin-bottom: 1px; } +/* Links */ +a { + font-family: "Times New Roman"; + font-size: 1.0em; + margin-left: 2px; + margin-top: 1px; + margin-bottom: 1px; +} + /* Table items */ td div { font-family: "Times New Roman"; - font-size: 1.0em; + font-size: 0.6em; + line-height: 1.2; + padding: 2px; } /* Tables items */ table { + table-layout: auto; + width: auto; + margin-top: 10px; margin-bottom: 10px; + margin-left: 15px; + margin-right: 30px; + + border-collapse: collapse; + border: 0px solid black; + + -webkit-user-select: text; + -moz-user-select: text; + -ms-user-select: text; + user-select: text; } -/* Links */ -a { - font-family: "Times New Roman"; - font-size: 1.0em; - margin-left: 2px; - margin-top: 1px; - margin-bottom: 1px; +table div { + white-space: normal; +} + +th, td { + text-align: left; + border: 1px solid black; + padding: 2px; +} + +td div, th div { + border: none; } diff --git a/bundles/org.simantics.document/simantics-wiki-documents.css b/bundles/org.simantics.document/simantics-wiki-documents.css index 101e698c9..c28af5b17 100644 --- a/bundles/org.simantics.document/simantics-wiki-documents.css +++ b/bundles/org.simantics.document/simantics-wiki-documents.css @@ -37,18 +37,18 @@ div { } table { - border-collapse: collapse; - width: 100%; table-layout: fixed; + box-sizing: border-box; + width: 100%; + -webkit-user-select: text; -moz-user-select: text; -ms-user-select: text; user-select: text; + border: 0px; padding: 0px; - box-sizing: border-box; - } td { @@ -75,24 +75,23 @@ table th:first-child div { } table div { + height: auto; + width: auto; padding-left: 1px; border-right: 1px; border-left: 1px; - border-top: 1px; border-bottom: 1px; + margin-bottom: -1px; margin-left: -1px; border-style: solid; - text-overflow: ellipsis; overflow: hidden; + text-overflow: ellipsis; white-space: nowrap; - height: auto; - width: auto; page-break-inside: avoid; - box-sizing: border-box; - + box-sizing: border-box; } diff --git a/bundles/org.simantics.document/src/org/simantics/document/Exportable.java b/bundles/org.simantics.document/src/org/simantics/document/Exportable.java index 74a739352..637340b90 100644 --- a/bundles/org.simantics.document/src/org/simantics/document/Exportable.java +++ b/bundles/org.simantics.document/src/org/simantics/document/Exportable.java @@ -74,8 +74,7 @@ public class Exportable implements IExportable { this.settings = settings; MarkupParser markupParser = new MarkupParser(); - MediaWikiLanguage language = new MediaWikiLanguage(); - markupParser.setMarkupLanguage(language); + markupParser.setMarkupLanguage(new MediaWikiLanguage()); String html = markupParser.parseToHtml(wiki); String width = "width:" + (210-settings.marginLeft-settings.marginRight) + "mm;"; @@ -95,7 +94,7 @@ public class Exportable implements IExportable { html = html.replace("", "
"); html = html.replace("", "
"); html = html.replace("", ""); - html = html.replace("", ""); + html = html.replace("", "\n\n"); this.html = html; diff --git a/bundles/org.simantics.g2d.ontology/graph.tg b/bundles/org.simantics.g2d.ontology/graph.tg index c215a73cc..362c08c07 100644 Binary files a/bundles/org.simantics.g2d.ontology/graph.tg and b/bundles/org.simantics.g2d.ontology/graph.tg differ diff --git a/bundles/org.simantics.g2d.ontology/graph/G2D.pgraph b/bundles/org.simantics.g2d.ontology/graph/G2D.pgraph index e055f69cc..6f0de29e4 100644 --- a/bundles/org.simantics.g2d.ontology/graph/G2D.pgraph +++ b/bundles/org.simantics.g2d.ontology/graph/G2D.pgraph @@ -26,6 +26,7 @@ G2D.HasPoint2DArray