]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Sync git svn branch with SVN repository r33153.
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Mon, 29 Aug 2016 10:25:38 +0000 (13:25 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Mon, 29 Aug 2016 10:25:38 +0000 (13:25 +0300)
refs #6475

56 files changed:
bundles/org.simantics.databoard/build.properties
bundles/org.simantics.desktop.product/src/.keep [new file with mode: 0644]
bundles/org.simantics.desktop.ui.ontology/src/.keep [new file with mode: 0644]
bundles/org.simantics.document.server/build.properties
bundles/org.simantics.document.ui.ontology/graph.tg
bundles/org.simantics.document.ui.ontology/graph/DocumentUI.pgraph
bundles/org.simantics.document.ui.ontology/src/org/simantics/document/ui/DocumentUIResource.java
bundles/org.simantics.document.ui/src/org/simantics/document/ui/DocumentView.java
bundles/org.simantics.document.ui/src/org/simantics/document/ui/function/All.java
bundles/org.simantics.document/src/org/simantics/document/DocumentDialect.java
bundles/org.simantics.document/src/org/simantics/document/function/All.java
bundles/org.simantics.help.core/src/org/simantics/help/core/SimanticsTocProvider.java
bundles/org.simantics.history/build.properties
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/ComponentTypeScriptDocumentProvider.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/ComponentTypeViewer.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/PGraphEditorDocumentProvider.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/SCLModuleEditorDocumentProvider.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/SCLQueryEditorDocumentProvider.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/DiagramViewerSelectionProvider.java
bundles/org.simantics.modeling/src/org/simantics/modeling/scl/GraphModuleSourceRepository.java
bundles/org.simantics.scl.data/build.properties
bundles/org.simantics.scl.reflection/src/org/simantics/scl/reflection/internal/registry/Namespace.java
bundles/org.simantics.scl.ui/plugin.xml
bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/CellValueVisitor.java
bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/GraphUI.java
bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/SpreadsheetBook.java
bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/SpreadsheetCell.java
bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/formula/SpreadsheetEvaluationEnvironment.java
bundles/org.simantics.spreadsheet.ui/src/org/simantics/spreadsheet/ui/SpreadsheetModel.java
bundles/org.simantics.structural2/src/org/simantics/structural2/utils/StructuralUtils.java
bundles/org.simantics.utils.datastructures/build.properties
bundles/org.simantics.views.ontology/graph.tg
bundles/org.simantics.views.ontology/graph/Views.pgraph
bundles/org.simantics.views.ontology/src/org/simantics/views/ontology/ViewsResources.java
bundles/org.simantics.views.swt.client/src/org/simantics/views/swt/client/base/SWTViewUtils.java
bundles/org.simantics.views.swt.client/src/org/simantics/views/swt/client/base/SingleSWTViewNode.java
bundles/org.simantics.views.swt.client/src/org/simantics/views/swt/client/impl/SWTBrowser.java
bundles/org.simantics.views.swt.client/src/org/simantics/views/swt/client/impl/SWTComposite.java
bundles/org.simantics.views.swt.client/src/org/simantics/views/swt/client/impl/SWTExplorer.java
bundles/org.simantics.views.swt.client/src/org/simantics/views/swt/client/impl/SWTSashForm.java
bundles/org.simantics.views.swt.client/src/org/simantics/views/swt/client/impl/SWTScrolledComposite.java
bundles/org.simantics.views.swt.client/src/org/simantics/views/swt/client/impl/SWTTabFolder.java
bundles/org.simantics.views/src/org/simantics/views/All.java
bundles/org.simantics.views/src/org/simantics/views/ViewUtils.java
bundles/org.simantics/build.properties
bundles/pom.xml
bundles/winterwell.markdown/build.properties
features/org.simantics.eclipsec.launcher.feature/build.properties
features/org.simantics.rcp.feature/feature.xml
features/pom.xml
releng/org.simantics.sdk.build.p2.site/README.md [new file with mode: 0644]
releng/org.simantics.sdk.build.p2.site/pom.xml
releng/org.simantics.sdk.build.targetdefinition/org.simantics.sdk.build.targetdefinition.target
releng/org.simantics.sdk.repository/category.xml
releng/org.simantics.sdk.repository/pom.xml
releng/org.simantics.tycho.configuration/pom.xml

index 46daf3633da1862c9cf0ed89425a13af1e1d9b8e..8a93306079747dc9bb8573ffa0f45358184c1812 100644 (file)
@@ -11,4 +11,4 @@ src.includes = src/org/simantics/databoard/baseUnits.txt,\
                src/org/simantics/databoard/standardTypes.dbt,\\r
                examples/,\\r
                testcases/,\\r
-               doc-isv/\r
+               src-isv/\r
diff --git a/bundles/org.simantics.desktop.product/src/.keep b/bundles/org.simantics.desktop.product/src/.keep
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/bundles/org.simantics.desktop.ui.ontology/src/.keep b/bundles/org.simantics.desktop.ui.ontology/src/.keep
new file mode 100644 (file)
index 0000000..e69de29
index 34f26f88677e827fb40b842f67bd47b7e2136e1d..5a15a6576dd2ac865af5604684be3c1320537021 100644 (file)
@@ -4,6 +4,6 @@ bin.includes = META-INF/,\
                .,\\r
                plugin.xml,\\r
                webdefault.xml,\\r
-               scl/,\\r
+               scl/\r
 src.includes = scl/\r
 \r
index 0501da80502987c0dafd4f487d754a5686c2a3cf..a32cf12e7b099dd425525150c5fb82651e506854 100644 (file)
Binary files a/bundles/org.simantics.document.ui.ontology/graph.tg and b/bundles/org.simantics.document.ui.ontology/graph.tg differ
index 914bdca44c3ec39c24bf7760ab8b1df83691614a..cb7cd6498d3139072b14268adac3cff8d40ccbcc 100644 (file)
@@ -38,8 +38,12 @@ UI.WikitextContribution.View : VIEWS.Composite
   SG.Node.children _ : L0.List
     @L0.list
       _ : VIEWS.Composite
-        VIEWS.Composite.layout _ : VIEWS.GridLayout
-          VIEWS.GridLayout.columnCount 19
+        VIEWS.Composite.layout _ : VIEWS.RowLayout
+          //VIEWS.RowLayout.type VIEWS.Control.Style.Constant.Horizontal
+          //VIEWS.RowLayout.spacing 0
+          //VIEWS.RowLayout.justify true
+          //VIEWS.RowLayout.pack true
+          //VIEWS.RowLayout.wrap true
         VIEWS.Control.layoutData _ : VIEWS.GridLayout.GridData
           VIEWS.GridLayout.GridData.horizontalGrab true
         SG.Node.children _ : L0.List
@@ -49,135 +53,102 @@ UI.WikitextContribution.View : VIEWS.Composite
               VIEWS.Button.tooltip "Makes selection bold or inserts some bold text at cursor"
               VIEWS.Button.modifier UI.Functions.boldModifier : L0.Function
               VIEWS.Button.image SILK.text_bold
-              VIEWS.Control.layoutData _ : VIEWS.GridLayout.GridData
-                VIEWS.GridLayout.GridData.horizontalAlignment VIEWS.GridLayout.GridData.BEGINNING
-                VIEWS.GridLayout.GridData.verticalAlignment VIEWS.GridLayout.GridData.BEGINNING
+              VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
             _ : VIEWS.Button
               VIEWS.Button.tooltip "Makes selection italic or inserts some italic text at cursor"
               VIEWS.Button.modifier UI.Functions.italicModifier : L0.Function
               VIEWS.Button.image SILK.text_italic
-              VIEWS.Control.layoutData _ : VIEWS.GridLayout.GridData
-                VIEWS.GridLayout.GridData.horizontalAlignment VIEWS.GridLayout.GridData.BEGINNING
-                VIEWS.GridLayout.GridData.verticalAlignment VIEWS.GridLayout.GridData.BEGINNING
+              VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
             _ : VIEWS.Button
               VIEWS.Button.tooltip "Makes selection strikethrough or inserts some strikethrough text at cursor"
               VIEWS.Button.modifier UI.Functions.strikethroughModifier : L0.Function
               VIEWS.Button.image SILK.text_strikethrough
-              VIEWS.Control.layoutData _ : VIEWS.GridLayout.GridData
-                VIEWS.GridLayout.GridData.horizontalAlignment VIEWS.GridLayout.GridData.BEGINNING
-                VIEWS.GridLayout.GridData.verticalAlignment VIEWS.GridLayout.GridData.BEGINNING
+              VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
             _ : VIEWS.Button
               VIEWS.Button.tooltip "Makes selection underlined or inserts some underlined text at cursor"
               VIEWS.Button.modifier UI.Functions.underlineModifier : L0.Function
               VIEWS.Button.image SILK.text_underline
-              VIEWS.Control.layoutData _ : VIEWS.GridLayout.GridData
-                VIEWS.GridLayout.GridData.horizontalAlignment VIEWS.GridLayout.GridData.BEGINNING
-                VIEWS.GridLayout.GridData.verticalAlignment VIEWS.GridLayout.GridData.BEGINNING
+              VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
             _ : VIEWS.Button
               VIEWS.Button.tooltip "Inserts a horizontal ruler at cursor"
               VIEWS.Button.modifier UI.Functions.horizontalRulerModifier : L0.Function
               VIEWS.Button.image SILK.text_horizontalrule
-              VIEWS.Control.layoutData _ : VIEWS.GridLayout.GridData
-                VIEWS.GridLayout.GridData.horizontalAlignment VIEWS.GridLayout.GridData.BEGINNING
-                VIEWS.GridLayout.GridData.verticalAlignment VIEWS.GridLayout.GridData.BEGINNING
+              VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
             _ : VIEWS.Button
               VIEWS.Button.tooltip "Indents text"
               VIEWS.Button.modifier UI.Functions.indentModifier : L0.Function
               VIEWS.Button.image SILK.text_indent
-              VIEWS.Control.layoutData _ : VIEWS.GridLayout.GridData
-                VIEWS.GridLayout.GridData.horizontalAlignment VIEWS.GridLayout.GridData.BEGINNING
-                VIEWS.GridLayout.GridData.verticalAlignment VIEWS.GridLayout.GridData.BEGINNING
+              VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
             _ : VIEWS.Button
               VIEWS.Button.tooltip "Modifies selection font or inserts text with font settings"
               VIEWS.Button.modifier UI.Functions.fontModifier : L0.Function
               VIEWS.Button.image SILK.font
-              VIEWS.Control.layoutData _ : VIEWS.GridLayout.GridData
-                VIEWS.GridLayout.GridData.horizontalAlignment VIEWS.GridLayout.GridData.BEGINNING
-                VIEWS.GridLayout.GridData.verticalAlignment VIEWS.GridLayout.GridData.BEGINNING
+              VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
             _ : VIEWS.Button
               VIEWS.Button.tooltip "Inserts an image"
               VIEWS.Button.modifier UI.Functions.imageModifier : L0.Function
               VIEWS.Button.image SILK.image
-              VIEWS.Control.layoutData _ : VIEWS.GridLayout.GridData
-                VIEWS.GridLayout.GridData.horizontalAlignment VIEWS.GridLayout.GridData.BEGINNING
-                VIEWS.GridLayout.GridData.verticalAlignment VIEWS.GridLayout.GridData.BEGINNING
+              VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
+            _ : VIEWS.Button
+              VIEWS.Button.tooltip "Inserts an internal model-specific document link"
+              VIEWS.Button.modifier UI.Functions.internalLinkModifier : L0.Function
+              VIEWS.Button.image SILK.database_link
+              VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
+            _ : VIEWS.Button
+              VIEWS.Button.tooltip "Inserts an external website link"
+              VIEWS.Button.modifier UI.Functions.linkModifier : L0.Function
+              VIEWS.Button.image SILK.world_link
+              VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
             _ : VIEWS.Button
               VIEWS.Button.tooltip "Inserts a 1st level header"
               VIEWS.Button.modifier UI.Functions.header1Modifier : L0.Function
               VIEWS.Button.image SILK.text_heading_1
-              VIEWS.Control.layoutData _ : VIEWS.GridLayout.GridData
-                VIEWS.GridLayout.GridData.horizontalAlignment VIEWS.GridLayout.GridData.BEGINNING
-                VIEWS.GridLayout.GridData.verticalAlignment VIEWS.GridLayout.GridData.BEGINNING
+              VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
             _ : VIEWS.Button
               VIEWS.Button.tooltip "Inserts a 2nd level header"
               VIEWS.Button.modifier UI.Functions.header2Modifier : L0.Function
               VIEWS.Button.image SILK.text_heading_2
-              VIEWS.Control.layoutData _ : VIEWS.GridLayout.GridData
-                VIEWS.GridLayout.GridData.horizontalAlignment VIEWS.GridLayout.GridData.BEGINNING
-                VIEWS.GridLayout.GridData.verticalAlignment VIEWS.GridLayout.GridData.BEGINNING
+              VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
             _ : VIEWS.Button
               VIEWS.Button.tooltip "Inserts a 3rd level header"
               VIEWS.Button.modifier UI.Functions.header3Modifier : L0.Function
               VIEWS.Button.image SILK.text_heading_3
-              VIEWS.Control.layoutData _ : VIEWS.GridLayout.GridData
-                VIEWS.GridLayout.GridData.horizontalAlignment VIEWS.GridLayout.GridData.BEGINNING
-                VIEWS.GridLayout.GridData.verticalAlignment VIEWS.GridLayout.GridData.BEGINNING
+              VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
             _ : VIEWS.Button
               VIEWS.Button.tooltip "Inserts a 4th level header"
               VIEWS.Button.modifier UI.Functions.header4Modifier : L0.Function
               VIEWS.Button.image SILK.text_heading_4
-              VIEWS.Control.layoutData _ : VIEWS.GridLayout.GridData
-                VIEWS.GridLayout.GridData.horizontalAlignment VIEWS.GridLayout.GridData.BEGINNING
-                VIEWS.GridLayout.GridData.verticalAlignment VIEWS.GridLayout.GridData.BEGINNING
+              VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
             _ : VIEWS.Button
               VIEWS.Button.tooltip "Inserts a numbered list"
               VIEWS.Button.modifier UI.Functions.numberedListModifier : L0.Function
               VIEWS.Button.image SILK.text_list_numbers
-              VIEWS.Control.layoutData _ : VIEWS.GridLayout.GridData
-                VIEWS.GridLayout.GridData.horizontalAlignment VIEWS.GridLayout.GridData.BEGINNING
-                VIEWS.GridLayout.GridData.verticalAlignment VIEWS.GridLayout.GridData.BEGINNING
+              VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
             _ : VIEWS.Button
               VIEWS.Button.tooltip "Inserts a bullet list"
               VIEWS.Button.modifier UI.Functions.bulletListModifier : L0.Function
               VIEWS.Button.image SILK.text_list_bullets
-              VIEWS.Control.layoutData _ : VIEWS.GridLayout.GridData
-                VIEWS.GridLayout.GridData.horizontalAlignment VIEWS.GridLayout.GridData.BEGINNING
-                VIEWS.GridLayout.GridData.verticalAlignment VIEWS.GridLayout.GridData.BEGINNING
+              VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
             _ : VIEWS.Button
               VIEWS.Button.tooltip "Inserts a table"
               VIEWS.Button.modifier UI.Functions.tableModifier : L0.Function
               VIEWS.Button.image SILK.table
-              VIEWS.Control.layoutData _ : VIEWS.GridLayout.GridData
-                VIEWS.GridLayout.GridData.horizontalAlignment VIEWS.GridLayout.GridData.BEGINNING
-                VIEWS.GridLayout.GridData.verticalAlignment VIEWS.GridLayout.GridData.BEGINNING
-            _ : VIEWS.Button
-              VIEWS.Button.tooltip "Inserts an external website link"
-              VIEWS.Button.modifier UI.Functions.linkModifier : L0.Function
-              VIEWS.Button.image SILK.link
-              VIEWS.Control.layoutData _ : VIEWS.GridLayout.GridData
-                VIEWS.GridLayout.GridData.horizontalAlignment VIEWS.GridLayout.GridData.BEGINNING
-                VIEWS.GridLayout.GridData.verticalAlignment VIEWS.GridLayout.GridData.BEGINNING
+              VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
             _ : VIEWS.Button
               VIEWS.Button.text "&Styles"
               VIEWS.Button.tooltip "Edits document styles"
               VIEWS.Button.modifier UI.Functions.styleModifier : L0.Function
-              VIEWS.Control.layoutData _ : VIEWS.GridLayout.GridData
-                VIEWS.GridLayout.GridData.horizontalAlignment VIEWS.GridLayout.GridData.BEGINNING
-                VIEWS.GridLayout.GridData.verticalAlignment VIEWS.GridLayout.GridData.BEGINNING
+              VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
             _ : VIEWS.Button
               VIEWS.Button.text "&Apply changes"
               VIEWS.Button.tooltip "Applies any changes in the wiki markup into the document"
               VIEWS.Button.modifier UI.Functions.wikitextModifier : L0.Function
-              VIEWS.Control.layoutData _ : VIEWS.GridLayout.GridData
-                VIEWS.GridLayout.GridData.horizontalAlignment VIEWS.GridLayout.GridData.BEGINNING
-                VIEWS.GridLayout.GridData.verticalAlignment VIEWS.GridLayout.GridData.BEGINNING
+              VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
             _ : VIEWS.Button
               VIEWS.Button.text "Delete document"
               VIEWS.Button.tooltip "Deletes the document"
               VIEWS.Button.modifier UI.Functions.onDeleteDocumentButton : L0.Function
-              VIEWS.Control.layoutData _ : VIEWS.GridLayout.GridData
-                VIEWS.GridLayout.GridData.horizontalAlignment VIEWS.GridLayout.GridData.BEGINNING
-                VIEWS.GridLayout.GridData.verticalAlignment VIEWS.GridLayout.GridData.BEGINNING
+              VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
 
       UI.WikitextContribution.View.TextContainer : VIEWS.Composite
         VIEWS.Control.layoutData _ : VIEWS.GridLayout.GridData
@@ -242,6 +213,8 @@ UI.Sash : VIEWS.SashForm
             VIEWS.GridLayout.GridData.verticalGrab true
         VIEWS.Browser.variable DOC.Functions.documentationRootVariable
         VIEWS.Browser.document DOC.Functions.documentationText
+        VIEWS.Browser.locationChanging UI.Functions.locationChanging : L0.Function
+            L0.HasValueType "a -> Boolean"
       UI.WikitextContribution.View
 
 UI.NoDocument : VIEWS.Composite
index 7c5b0f4559e520d83077c26b75f32b053f35f2a4..82375ae2a99d9615d457247acc404e568a538a7f 100644 (file)
@@ -34,9 +34,11 @@ public class DocumentUIResource {
     public final Resource Functions_horizontalRulerModifier;\r
     public final Resource Functions_imageModifier;\r
     public final Resource Functions_indentModifier;\r
+    public final Resource Functions_internalLinkModifier;\r
     public final Resource Functions_isWikitext;\r
     public final Resource Functions_italicModifier;\r
     public final Resource Functions_linkModifier;\r
+    public final Resource Functions_locationChanging;\r
     public final Resource Functions_noDocumentText;\r
     public final Resource Functions_numberedListModifier;\r
     public final Resource Functions_onCreateDocumentButton;\r
@@ -83,9 +85,11 @@ public class DocumentUIResource {
         public static final String Functions_horizontalRulerModifier = "http://www.simantics.org/DocumentUI-1.1/Functions/horizontalRulerModifier";\r
         public static final String Functions_imageModifier = "http://www.simantics.org/DocumentUI-1.1/Functions/imageModifier";\r
         public static final String Functions_indentModifier = "http://www.simantics.org/DocumentUI-1.1/Functions/indentModifier";\r
+        public static final String Functions_internalLinkModifier = "http://www.simantics.org/DocumentUI-1.1/Functions/internalLinkModifier";\r
         public static final String Functions_isWikitext = "http://www.simantics.org/DocumentUI-1.1/Functions/isWikitext";\r
         public static final String Functions_italicModifier = "http://www.simantics.org/DocumentUI-1.1/Functions/italicModifier";\r
         public static final String Functions_linkModifier = "http://www.simantics.org/DocumentUI-1.1/Functions/linkModifier";\r
+        public static final String Functions_locationChanging = "http://www.simantics.org/DocumentUI-1.1/Functions/locationChanging";\r
         public static final String Functions_noDocumentText = "http://www.simantics.org/DocumentUI-1.1/Functions/noDocumentText";\r
         public static final String Functions_numberedListModifier = "http://www.simantics.org/DocumentUI-1.1/Functions/numberedListModifier";\r
         public static final String Functions_onCreateDocumentButton = "http://www.simantics.org/DocumentUI-1.1/Functions/onCreateDocumentButton";\r
@@ -142,9 +146,11 @@ public class DocumentUIResource {
         Functions_horizontalRulerModifier = getResourceOrNull(graph, URIs.Functions_horizontalRulerModifier);\r
         Functions_imageModifier = getResourceOrNull(graph, URIs.Functions_imageModifier);\r
         Functions_indentModifier = getResourceOrNull(graph, URIs.Functions_indentModifier);\r
+        Functions_internalLinkModifier = getResourceOrNull(graph, URIs.Functions_internalLinkModifier);\r
         Functions_isWikitext = getResourceOrNull(graph, URIs.Functions_isWikitext);\r
         Functions_italicModifier = getResourceOrNull(graph, URIs.Functions_italicModifier);\r
         Functions_linkModifier = getResourceOrNull(graph, URIs.Functions_linkModifier);\r
+        Functions_locationChanging = getResourceOrNull(graph, URIs.Functions_locationChanging);\r
         Functions_noDocumentText = getResourceOrNull(graph, URIs.Functions_noDocumentText);\r
         Functions_numberedListModifier = getResourceOrNull(graph, URIs.Functions_numberedListModifier);\r
         Functions_onCreateDocumentButton = getResourceOrNull(graph, URIs.Functions_onCreateDocumentButton);\r
index ccbfbd5083fe415a6b570274ddeaee431934d0bd..025b88b0808348357691bbb9c0f169f3eb65c7f6 100644 (file)
  *******************************************************************************/\r
 package org.simantics.document.ui;\r
 \r
+import org.eclipse.jface.action.Action;\r
+import org.eclipse.jface.action.IAction;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.ui.IWorkbenchPart;\r
 import org.simantics.ui.workbench.IPropertyPage;\r
+import org.simantics.utils.ui.BundleUtils;\r
 import org.simantics.views.swt.ModelledView;\r
 \r
 /**\r
@@ -19,6 +24,8 @@ import org.simantics.views.swt.ModelledView;
  */\r
 public class DocumentView extends ModelledView {\r
 \r
+    private boolean pinSelection = false;\r
+\r
     @Override\r
     protected String configurationURI() {\r
         return DocumentUIResource.URIs.View;\r
@@ -29,4 +36,32 @@ public class DocumentView extends ModelledView {
         return null;\r
     }\r
 \r
+    @Override\r
+    protected void inputChanged(IWorkbenchPart provider, Object input) {\r
+        if (pinSelection)\r
+            return;\r
+        super.inputChanged(provider, input);\r
+    }\r
+\r
+    @Override\r
+    public void createPartControl(Composite parent) {\r
+        super.createPartControl(parent);\r
+        getViewSite().getActionBars().getToolBarManager().add(new PinSelection());\r
+    }\r
+\r
+    private class PinSelection extends Action {\r
+        public PinSelection() {\r
+            super("Pin Selection", IAction.AS_CHECK_BOX);\r
+            setImageDescriptor(\r
+                    BundleUtils.getImageDescriptorFromPlugin(\r
+                            "org.eclipse.ui",\r
+                            "icons/full/etool16/pin_editor.png"));\r
+        }\r
+\r
+        @Override\r
+        public void run() {\r
+            pinSelection = isChecked();\r
+        }\r
+    }\r
+\r
 }\r
index 20b8d3d0e66cb050670b0d701330300b670d9ded..e5f8b439238c9b1709a2f4d13e6d3df38527e831 100644 (file)
@@ -13,8 +13,11 @@ package org.simantics.document.ui.function;
 \r
 import java.util.TreeMap;\r
 \r
+import org.eclipse.core.runtime.IStatus;\r
+import org.eclipse.core.runtime.Status;\r
 import org.eclipse.jface.viewers.ISelectionProvider;\r
 import org.eclipse.jface.viewers.StructuredSelection;\r
+import org.eclipse.swt.browser.LocationEvent;\r
 import org.eclipse.swt.graphics.FontData;\r
 import org.eclipse.swt.graphics.Point;\r
 import org.eclipse.swt.graphics.RGB;\r
@@ -30,19 +33,26 @@ import org.simantics.browsing.ui.NodeContext;
 import org.simantics.databoard.Bindings;\r
 import org.simantics.db.ReadGraph;\r
 import org.simantics.db.Resource;\r
+import org.simantics.db.Session;\r
 import org.simantics.db.WriteGraph;\r
 import org.simantics.db.common.request.ReadRequest;\r
+import org.simantics.db.common.request.UnaryRead;\r
 import org.simantics.db.common.request.WriteRequest;\r
 import org.simantics.db.common.utils.Logger;\r
 import org.simantics.db.common.utils.NameUtils;\r
+import org.simantics.db.common.utils.RequestUtil;\r
 import org.simantics.db.exception.DatabaseException;\r
 import org.simantics.db.layer0.adapter.Instances;\r
 import org.simantics.db.layer0.request.PossibleModel;\r
+import org.simantics.db.layer0.request.PossibleResource;\r
 import org.simantics.db.layer0.util.RemoverUtil;\r
 import org.simantics.db.layer0.variable.RVI;\r
 import org.simantics.db.layer0.variable.Variable;\r
+import org.simantics.db.layer0.variable.Variables;\r
+import org.simantics.document.DocumentDialect;\r
 import org.simantics.document.DocumentResource;\r
 import org.simantics.document.DocumentUtils;\r
+import org.simantics.document.ui.Activator;\r
 import org.simantics.document.ui.CSSEditor;\r
 import org.simantics.layer0.Layer0;\r
 import org.simantics.scenegraph.INode;\r
@@ -50,9 +60,12 @@ import org.simantics.scenegraph.loader.ScenegraphLoaderProcess;
 import org.simantics.scenegraph.loader.ScenegraphLoaderUtils;\r
 import org.simantics.scenegraph.loader.ScenegraphLoaderUtils.ScenegraphPropertyReference;\r
 import org.simantics.scl.reflection.annotations.SCLValue;\r
+import org.simantics.scl.runtime.function.Function1;\r
 import org.simantics.scl.runtime.function.FunctionImpl1;\r
 import org.simantics.scl.runtime.function.FunctionImpl3;\r
+import org.simantics.ui.SimanticsUI;\r
 import org.simantics.ui.workbench.ResourceEditorInput2;\r
+import org.simantics.ui.workbench.action.DefaultActions;\r
 import org.simantics.utils.threads.SWTThread;\r
 import org.simantics.utils.ui.workbench.WorkbenchUtils;\r
 \r
@@ -546,7 +559,7 @@ public class All {
                        @Override\r
                        void perform(String before, String selected, String after, Point selection) {\r
 \r
-                               textReference.setValue(before + "[[Image:root://Library/image.png|100px]]" + selected + after);\r
+                               textReference.setValue(before + "[[Image:root://Library/image.png|100px]]" + "\r\n" + selected + after);\r
                                \r
                        }\r
                        \r
@@ -683,6 +696,18 @@ public class All {
         \r
     }\r
 \r
+    @SCLValue(type = "ReadGraph -> Resource -> Variable -> b")\r
+    public static Object internalLinkModifier(ReadGraph graph, Resource resource, final Variable context) throws DatabaseException {\r
+        return new WikiButtonModifier(graph, context) {\r
+            @Override\r
+            void perform(String before, String selected, String after, Point selection) {\r
+                textReference.setValue(before +\r
+                        "[[Media:root://Documents/Document.pdf|Link to a file within the model]]\r\n" + selected + after);\r
+                \r
+            }\r
+        };\r
+    }\r
+    \r
     @SCLValue(type = "ReadGraph -> Resource -> Variable -> b")\r
     public static Object linkModifier(ReadGraph graph, Resource resource, final Variable context) throws DatabaseException {\r
 \r
@@ -691,8 +716,8 @@ public class All {
                        @Override\r
                        void perform(String before, String selected, String after, Point selection) {\r
 \r
-                               textReference.setValue(before + "\r\n" +\r
-                                               "[http://www.simantics.org External Website Link]\r\n"  + selected + after);\r
+                               textReference.setValue(before +\r
+                                               "[http://www.simantics.org External Website Link]\r\n" + selected + after);\r
                                \r
                        }\r
                        \r
@@ -815,5 +840,51 @@ public class All {
        return true;\r
        \r
     }\r
-    \r
+\r
+    private static class ResolveURI extends UnaryRead<String, Object> {\r
+        public ResolveURI(String uri) {\r
+            super(uri);\r
+        }\r
+        @Override\r
+        public Object perform(ReadGraph graph) throws DatabaseException {\r
+            Object result = graph.syncRequest(new PossibleResource(parameter));\r
+            if (result == null)\r
+                result = Variables.getPossibleVariable(graph, parameter);\r
+            return result;\r
+        }\r
+    }\r
+\r
+    private static final Function1<Object, Boolean> PERFORM_DEFAULT_ACTION_FOR_URI_RESOURCE = new Function1<Object, Boolean>() {\r
+        @Override\r
+        public Boolean apply(Object p0) {\r
+            LocationEvent le = (LocationEvent) p0;\r
+            if (le.location.startsWith(DocumentDialect.SIMANTICS_INTERNAL_URI_PREFIX)) {\r
+                // This is not a valid URL anyway so deny relocation.\r
+                le.doit = false;\r
+\r
+                // Try to execute default action for the resource or variable\r
+                // that the URI represents.\r
+                String uri = le.location.substring(DocumentDialect.SIMANTICS_INTERNAL_URI_PREFIX.length());\r
+                try {\r
+                    Session s = Simantics.getSession();\r
+                    Object input = RequestUtil.trySyncRequest(s,\r
+                            SimanticsUI.UI_THREAD_REQUEST_START_TIMEOUT,\r
+                            SimanticsUI.UI_THREAD_REQUEST_EXECUTION_TIMEOUT,\r
+                            new ResolveURI(uri));\r
+                    if (input != null) {\r
+                        DefaultActions.asyncPerformDefaultAction(s, input, false, false, false);\r
+                    }\r
+                } catch (DatabaseException | InterruptedException e) {\r
+                    Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Failed to resolve URI to a database resource or variable: " + uri, e));\r
+                }\r
+            }\r
+            return true;\r
+        }\r
+    };\r
+\r
+    @SCLValue(type = "ReadGraph -> Resource -> Variable -> b")\r
+    public static Function1<Object, Boolean> locationChanging(ReadGraph graph, Resource variable, Variable context) throws DatabaseException {\r
+        return PERFORM_DEFAULT_ACTION_FOR_URI_RESOURCE;\r
+    }\r
+\r
 }\r
index 9fc8e98a7ebb85927f2e76b13dcf8fc9b0094959..7cb6bbee0f669a1f7d2b65536edf87b014a0a475 100644 (file)
  *******************************************************************************/\r
 package org.simantics.document;\r
 \r
-import java.io.File;\r
 import java.io.IOException;\r
 import java.math.BigInteger;\r
+import java.nio.file.Files;\r
+import java.nio.file.Path;\r
 import java.security.MessageDigest;\r
 import java.security.NoSuchAlgorithmException;\r
 import java.util.regex.Matcher;\r
@@ -26,78 +27,109 @@ import org.simantics.db.Resource;
 import org.simantics.db.common.request.PossibleIndexRoot;\r
 import org.simantics.db.exception.DatabaseException;\r
 import org.simantics.image2.ontology.ImageResource;\r
-import org.simantics.utils.FileUtils;\r
-\r
 \r
 public class DocumentDialect {\r
-    \r
-    final Pattern imagePattern = Pattern.compile("\\[\\[Image(?::([^\\]]+))?\\]\\]");\r
 \r
        final static public DocumentDialect INSTANCE = new DocumentDialect();\r
 \r
-       public String transform(ReadGraph graph, Resource res, String options) {\r
-               \r
+       public static final String SIMANTICS_INTERNAL_URI_PREFIX = "http://simantics-internal/";\r
+\r
+       private static final String HTTP = "http://";\r
+       private static final String ROOT = "root:/";\r
+       private static final String IMAGE = "image";\r
+       private static final String MEDIA = "media";\r
+\r
+       final Pattern imageOrMediaPattern = Pattern.compile("\\[\\[([Ii]mage|[Mm]edia)(?::([^\\]]+))?\\]\\]");\r
+\r
+       private static String digest(byte[] bytes) throws NoSuchAlgorithmException {\r
+               MessageDigest md = MessageDigest.getInstance("MD5");\r
+               md.update(bytes);\r
+               BigInteger number = new BigInteger(1, md.digest());\r
+               return number.toString(16);\r
+       }\r
+\r
+       private static String imageExtension(ReadGraph graph, Resource image) throws DatabaseException {\r
+                  ImageResource IMAGE = ImageResource.getInstance(graph);\r
+               if (graph.isInstanceOf(image, IMAGE.PngImage))\r
+                       return ".png";\r
+               else if (graph.isInstanceOf(image, IMAGE.JpegImage))\r
+                       return ".jpg";\r
+               return null;\r
+       }\r
+\r
+       public String transform(ReadGraph graph, Resource res, String type, String options) {\r
                try {\r
-                       \r
                        String[] parts = options.split("\\|");\r
-                       if(parts.length > 0) {\r
-                               \r
+                       if (parts.length > 0) {\r
                                String uri = parts[0];\r
+\r
                                Resource indexRoot = graph.syncRequest(new PossibleIndexRoot(res));\r
-                               if(indexRoot == null) return null;\r
+                               if (indexRoot == null) return null;\r
                                String rootURI = graph.getURI(indexRoot);\r
-                               uri = uri.replace("root:/", rootURI);\r
-                               // (Apros #12268) For easier image linking, allow users to\r
-                               // write white space as ' ' in the wiki-style image links.\r
+\r
+                               uri = uri.replace(ROOT, rootURI);\r
+\r
+                               // (Apros #12268) For more user-friendly linking, allow users to\r
+                               // write white space as ' ' in the wiki-style image links instead\r
+                               // of having to write %20.\r
                                uri = uri.replace(" ", "%20");\r
-                               Resource image = graph.getPossibleResource(uri);\r
-                               if(image == null) return null;\r
-                               byte[] bytes = graph.getValue(image, Bindings.BYTE_ARRAY);\r
-                               MessageDigest md;\r
-                               md = MessageDigest.getInstance("MD5");\r
-                               md.update(bytes);\r
-                               BigInteger number = new BigInteger(1, md.digest());\r
-                               String digest = number.toString(16);\r
-                               File dir = Simantics.getTemporaryDirectory("documentImages");\r
-                               dir.mkdirs();\r
-                               \r
-                               ImageResource IMAGE = ImageResource.getInstance(graph);\r
-                               \r
-                               String extension;\r
-                               if(graph.isInstanceOf(image, IMAGE.PngImage)) extension = ".png";\r
-                               else if(graph.isInstanceOf(image, IMAGE.JpegImage)) extension = ".jpg";\r
-                               else return null;\r
-                               \r
-                               File f = new File(dir, digest + extension);\r
-                               if(!f.exists())\r
-                                       FileUtils.writeFile(f, bytes);\r
-                               StringBuilder sb = new StringBuilder();\r
-                               sb.append("[[File: " + f.toURI());\r
-                               for(int i=1;i<parts.length;i++) {\r
-                                       sb.append("|");\r
-                                       sb.append(parts[i]);\r
+\r
+                               if (IMAGE.equals(type)) {\r
+                                       Resource image = graph.getPossibleResource(uri);\r
+                                       if (image == null)\r
+                                               return null;\r
+\r
+                                       String extension = imageExtension(graph, image);\r
+                                       if (extension == null)\r
+                                               return null;\r
+\r
+                                       byte[] bytes = graph.getValue(image, Bindings.BYTE_ARRAY);\r
+                                       String digest = digest(bytes);\r
+\r
+                                       Path dir = Simantics.getTemporaryDirectory("documentImages").toPath();\r
+                                       Files.createDirectories(dir);\r
+\r
+                                       Path f = dir.resolve(digest + extension);\r
+                                       if (!Files.exists(f))\r
+                                               Files.write(f, bytes);\r
+\r
+                                       StringBuilder sb = new StringBuilder(128);\r
+                                       sb.append("[[File: ").append(f.toUri());\r
+                                       for (int i = 1; i < parts.length; i++)\r
+                                               sb.append("|").append(parts[i]);\r
+                                       sb.append("]]");\r
+                                       return sb.toString();\r
+                               } else if (MEDIA.equals(type)) {\r
+                                       Resource image = graph.getPossibleResource(uri);\r
+                                       if (image == null)\r
+                                               return null;\r
+\r
+                                       StringBuilder sb = new StringBuilder();\r
+                                       sb.append("[").append(SIMANTICS_INTERNAL_URI_PREFIX).append(uri);\r
+                                       for (int i = 1; i < parts.length; i++)\r
+                                               sb.append(" ").append(parts[i]);\r
+                                       sb.append("]");\r
+                                       return sb.toString();\r
                                }\r
-                               sb.append("]]");\r
-                               return sb.toString();\r
+\r
                        }\r
-                       \r
                } catch (DatabaseException e) {\r
                } catch (NoSuchAlgorithmException e) {\r
                } catch (IOException e) {\r
                }\r
                \r
                return null;\r
-               \r
        }\r
 \r
        public String apply(ReadGraph graph, Resource res, String markup) throws DatabaseException {\r
 \r
                StringBuffer sb = new StringBuffer();\r
-               Matcher matcher = imagePattern.matcher(markup);\r
+               Matcher matcher = imageOrMediaPattern.matcher(markup);\r
                while(matcher.find()) {\r
                        matcher.appendReplacement(sb, "");\r
-                       String options = matcher.group(1);\r
-                       String match = transform(graph, res, options);\r
+                       String type = matcher.group(1);\r
+                       String options = matcher.group(2);\r
+                       String match = transform(graph, res, type.toLowerCase(), options);\r
                        if(match != null) sb.append(match);\r
                        else sb.append("[[Image:" + options + "]]");\r
                }\r
index 3a71cafb7d76a26d26058d9c2b445f02e147d9ce..37f8e0481f7eff1ade2636fb6e855b930e130fe7 100644 (file)
@@ -70,5 +70,4 @@ public class All {
        return result.toString();\r
     }\r
 \r
-    \r
 }\r
index 559ef55ea816746816867887877ad72a1084c287..d9a31a4e3b274bc4df6d32d39ff42556402bb8e2 100644 (file)
@@ -114,7 +114,7 @@ public class SimanticsTocProvider extends AbstractTocProvider {
             contribution.setCategoryId("category_" + toc.getLabel());\r
             contribution.setPrimary(true);\r
             contribution.setContributorId(Activator.PLUGIN_ID);\r
-            \r
+            contribution.setExtraDocuments(new String[0]);\r
             contribution.setToc(toc);\r
             contributions.add(contribution);\r
         }\r
index f68e9a0aa2d037abb977c2aef105b65869f7583d..b55c7d489558ac3fab5c889e0373dc47d5b7ab17 100644 (file)
@@ -6,4 +6,4 @@ bin.includes = META-INF/,\
 src.includes = history.txt,\\r
                examples/,\\r
                test/,\\r
-               doc-isv/\r
+               src-isv/\r
index 0129b2bb6040fa836102b39cf950513baf4de453..b31ccb109fbedc0847c97f095f968424ef00a9ce 100644 (file)
@@ -28,6 +28,7 @@ import org.simantics.modeling.ComponentTypeScriptResult;
 import org.simantics.scl.compiler.errors.CompilationError;\r
 import org.simantics.scl.compiler.errors.Locations;\r
 import org.simantics.structural.stubs.StructuralResource2;\r
+import org.simantics.structural2.utils.StructuralUtils;\r
 import org.simantics.ui.workbench.ResourceEditorInput;\r
 import org.simantics.utils.logging.TimeLogger;\r
 \r
@@ -37,6 +38,7 @@ public class ComponentTypeScriptDocumentProvider extends AbstractDocumentProvide
     \r
     protected Resource resource;\r
     protected String currentText;\r
+    protected boolean immutable;\r
     protected boolean errorHappened;\r
     \r
     protected AnnotationModel annotationModel = new AnnotationModel();\r
@@ -57,6 +59,8 @@ public class ComponentTypeScriptDocumentProvider extends AbstractDocumentProvide
                 public Document perform(ReadGraph graph) throws DatabaseException {\r
                     StructuralResource2 STR = StructuralResource2.getInstance(graph);\r
                     currentText = graph.getRelatedValue(resource, STR.ComponentTypeScript_code, Bindings.STRING);\r
+                    Resource owner = graph.getPossibleObject(resource, STR.ComponentType_hasScript_Inverse);\r
+                    immutable = owner != null && StructuralUtils.isImmutable(graph, owner);\r
                     errorHappened = false;\r
                     return new Document(currentText != null ? currentText : "");\r
                 }\r
@@ -139,17 +143,12 @@ public class ComponentTypeScriptDocumentProvider extends AbstractDocumentProvide
     \r
     @Override\r
     public boolean isModifiable(Object element) {\r
-        return !errorHappened;\r
+        return !errorHappened && !immutable;\r
     }\r
 \r
     @Override\r
     public boolean isReadOnly(Object element) {\r
-        return errorHappened;\r
+        return errorHappened || immutable;\r
     }\r
 \r
-    @Override\r
-    public boolean canSaveDocument(Object element) {\r
-        return !errorHappened && !getDocument(element).get().equals(currentText);\r
-    }\r
-    \r
 }\r
index 3cc4bbbf3ce68aa6d08f2b99438fad0190e134bc..f88ad39fa5bd351732044e6feaa028624068ac71 100644 (file)
@@ -45,9 +45,9 @@ import org.simantics.db.common.NamedResource;
 import org.simantics.db.common.request.UniqueRead;\r
 import org.simantics.db.common.utils.NameUtils;\r
 import org.simantics.db.exception.DatabaseException;\r
+import org.simantics.db.layer0.util.Layer0Utils;\r
 import org.simantics.db.procedure.Listener;\r
 import org.simantics.db.request.Read;\r
-import org.simantics.db.service.XSupport;\r
 import org.simantics.layer0.Layer0;\r
 import org.simantics.modeling.ui.Activator;\r
 import org.simantics.operation.Layer0X;\r
@@ -173,6 +173,12 @@ public class ComponentTypeViewer {
                 Layer0 L0 = Layer0.getInstance(graph);\r
                 Layer0X L0X = Layer0X.getInstance(graph);\r
                 StructuralResource2 STR = StructuralResource2.getInstance(graph);\r
+\r
+                boolean typeIsImmutable = graph.isImmutable(data.componentType)\r
+                        || graph.hasStatement(data.componentType, STR.ComponentType_Locked)\r
+                        || Layer0Utils.isPublished(graph, data.componentType)\r
+                        || Layer0Utils.isContainerPublished(graph, data.componentType);\r
+\r
                 for(Resource relation : graph.getObjects(data.componentType, L0.DomainOf)) {\r
                     if(graph.isSubrelationOf(relation, L0.HasProperty)) {\r
                         String name = graph.getRelatedValue(relation, L0.HasName);\r
@@ -216,7 +222,7 @@ public class ComponentTypeViewer {
                         \r
                         String valid = expression != null ? DerivedPropertiesSection.validateMonitorExpression(graph, data.componentType, relation, expression) : null; \r
 \r
-                        boolean immutable = graph.isImmutable(relation);\r
+                        boolean immutable = typeIsImmutable || graph.isImmutable(relation);\r
                         ComponentTypeViewerPropertyInfo info =\r
                                 new ComponentTypeViewerPropertyInfo(relation, name, type, defaultValue, numberType, unit, label, description, expression, valid, immutable);\r
                         \r
@@ -242,9 +248,7 @@ public class ComponentTypeViewer {
                     }\r
                 }\r
                 Collections.sort(result);\r
-                XSupport xs = graph.peekService(XSupport.class);\r
-                boolean immutable = xs != null ? xs.getImmutable(data.componentType) : false;\r
-                return new ComponentTypePropertiesResult(result, connectionPoints, immutable);\r
+                return new ComponentTypePropertiesResult(result, connectionPoints, typeIsImmutable);\r
             }\r
         }, new Listener<ComponentTypePropertiesResult>() {\r
             @Override\r
index e59d3da0a5dfb2e81adfe3c1a4026b6d56e8576e..2bb8fbf7699a80841351d04d60573f9a9950da8f 100644 (file)
@@ -2,7 +2,6 @@ package org.simantics.modeling.ui.componentTypeEditor;
 \r
 import java.io.PrintWriter;\r
 import java.io.StringWriter;\r
-import java.util.Arrays;\r
 import java.util.Collections;\r
 import java.util.List;\r
 \r
@@ -28,13 +27,7 @@ import org.simantics.db.exception.DatabaseException;
 import org.simantics.db.layer0.util.Layer0Utils;\r
 import org.simantics.layer0.Layer0;\r
 import org.simantics.scl.compiler.errors.CompilationError;\r
-import org.simantics.scl.compiler.errors.Failable;\r
-import org.simantics.scl.compiler.errors.Failure;\r
 import org.simantics.scl.compiler.errors.Locations;\r
-import org.simantics.scl.compiler.module.Module;\r
-import org.simantics.scl.compiler.module.repository.UpdateListener;\r
-import org.simantics.scl.osgi.SCLOsgi;\r
-import org.simantics.scl.runtime.SCLContext;\r
 import org.simantics.ui.workbench.ResourceEditorInput;\r
 import org.simantics.utils.logging.TimeLogger;\r
 \r
@@ -69,31 +62,11 @@ public class PGraphEditorDocumentProvider extends AbstractDocumentProvider {
         }\r
     }\r
 \r
-    // While this editor is active we do not want that this listener gets collected\r
-    private UpdateListener listener = new UpdateListener() {\r
-        @Override\r
-        public void notifyAboutUpdate() {\r
-            updateAnnotations();\r
-        }\r
-    };\r
-\r
     protected void updateAnnotations() {\r
         Simantics.getSession().asyncRequest(new ReadRequest() {\r
             @Override\r
             public void run(ReadGraph graph) throws DatabaseException {\r
-//                String moduleName = graph.getURI(resource);\r
-//                SCLContext context = SCLContext.getCurrent();\r
-//                context.put("graph", graph);\r
-//                Failable<Module> result = SCLOsgi.MODULE_REPOSITORY.getModule(moduleName, listener);\r
-//                \r
-//                if(result instanceof Failure) {\r
-//                    Failure failure = (Failure)result;\r
-//                    setAnnotations(Arrays.asList(failure.errors));\r
-//                }\r
-//                else {\r
-//                    setAnnotations(Collections.<CompilationError>emptyList());\r
-//                }\r
-               setAnnotations(Collections.<CompilationError>emptyList());\r
+                setAnnotations(Collections.emptyList());\r
             }\r
         });\r
     }\r
@@ -155,9 +128,4 @@ public class PGraphEditorDocumentProvider extends AbstractDocumentProvider {
         return errorHappened;\r
     }\r
 \r
-    @Override\r
-    public boolean canSaveDocument(Object element) {\r
-        return !errorHappened && !getDocument(element).get().equals(currentText);\r
-    }\r
-\r
 }\r
index 35265ce509f56cc66011a6f2c6c6232b1d9ee5df..c634f89b38b3a2d73075c99639b4eb20866ca570 100644 (file)
@@ -36,6 +36,7 @@ import org.simantics.scl.compiler.module.repository.UpdateListener;
 import org.simantics.scl.osgi.SCLOsgi;\r
 import org.simantics.scl.runtime.SCLContext;\r
 import org.simantics.scl.ui.editor.SCLSourceViewerConfigurationNew;\r
+import org.simantics.structural2.utils.StructuralUtils;\r
 import org.simantics.ui.workbench.ResourceEditorInput;\r
 import org.simantics.utils.logging.TimeLogger;\r
 \r
@@ -43,6 +44,7 @@ public class SCLModuleEditorDocumentProvider extends AbstractDocumentProvider {
 \r
     protected Resource resource;\r
     protected String currentText;\r
+    protected boolean immutable;\r
     protected boolean errorHappened;\r
 \r
     protected AnnotationModel annotationModel = new AnnotationModel();\r
@@ -62,6 +64,7 @@ public class SCLModuleEditorDocumentProvider extends AbstractDocumentProvider {
                 public Document perform(ReadGraph graph) throws DatabaseException {\r
                     Layer0 L0 = Layer0.getInstance(graph);\r
                     currentText = graph.getRelatedValue(resource, L0.SCLModule_definition, Bindings.STRING);\r
+                    immutable = StructuralUtils.isImmutable(graph, resource);\r
                     errorHappened = false;\r
                     return new Document(currentText != null ? currentText : "");\r
                 }\r
@@ -156,17 +159,12 @@ public class SCLModuleEditorDocumentProvider extends AbstractDocumentProvider {
 \r
     @Override\r
     public boolean isModifiable(Object element) {\r
-        return !errorHappened;\r
+        return !errorHappened && !immutable;\r
     }\r
 \r
     @Override\r
     public boolean isReadOnly(Object element) {\r
-        return errorHappened;\r
-    }\r
-\r
-    @Override\r
-    public boolean canSaveDocument(Object element) {\r
-        return !errorHappened && !getDocument(element).get().equals(currentText);\r
+        return errorHappened || immutable;\r
     }\r
 \r
 }\r
index 11dec0fcf54cba03292c49682920dc5651d7e5c4..5064ba9e61cf7fa282b808553caa4ead59206ac4 100644 (file)
@@ -214,9 +214,4 @@ public class SCLQueryEditorDocumentProvider extends AbstractDocumentProvider {
         return errorHappened;\r
     }\r
     \r
-    @Override\r
-    public boolean canSaveDocument(Object element) {\r
-        return !errorHappened && !getDocument(element).get().equals(currentText);\r
-    }\r
-\r
 }\r
index c3070d9cceb9f60ccd3fde3aef1e7407a14b9957..4317f59799f9c8819bb1459fe76d3997ac56dc90 100644 (file)
@@ -62,6 +62,7 @@ public class DiagramViewerSelectionProvider extends WorkbenchSelectionProvider {
                         public Variable perform(ReadGraph graph) throws DatabaseException {\r
 \r
                             DiagramResource DIA = DiagramResource.getInstance(graph);\r
+                            ModelingResources MOD = ModelingResources.getInstance(graph);\r
 \r
                             String uri = graph.getPossibleRelatedValue(resource, DIA.RuntimeDiagram_HasVariable);\r
                             if (uri == null)\r
@@ -71,9 +72,20 @@ public class DiagramViewerSelectionProvider extends WorkbenchSelectionProvider {
                             if (var == null)\r
                                 return null;\r
 \r
-                            Resource config = graph.getPossibleObject(resource2, ModelingResources.getInstance(graph).ElementToComponent);\r
-                            if (config == null)\r
+                            Resource config = graph.getPossibleObject(resource2, MOD.ElementToComponent);\r
+                            if (config == null) {\r
+                                // Apros #9646: if resource2 is the diagram\r
+                                // itself, return the diagram composite variable\r
+                                // since it is generally more useful than the\r
+                                // variable to the diagram.\r
+                                Resource composite = graph.getPossibleObject(resource2, MOD.DiagramToComposite);\r
+                                if (composite != null && composite.equals(var.getPossibleRepresents(graph))) {\r
+                                    //return Variables.getPossibleVariable(graph, resource2);\r
+                                    return var;\r
+                                }\r
+\r
                                 return null;\r
+                            }\r
 \r
                             return var.browsePossible(graph, config);\r
 \r
index a615634118fc2a586bfe4bae0e15c1ae4dd9b9b0..3edc7bfeae28dd2a696dc9c3bd1d9d984c00de5d 100644 (file)
@@ -19,6 +19,7 @@ import org.simantics.scl.compiler.source.ModuleSource;
 import org.simantics.scl.compiler.source.StringModuleSource;\r
 import org.simantics.scl.compiler.source.repository.ModuleSourceRepository;\r
 import org.simantics.scl.runtime.SCLContext;\r
+import org.simantics.structural2.utils.StructuralUtils;\r
 import org.simantics.scl.runtime.tuple.Tuple0;\r
 \r
 import gnu.trove.procedure.TObjectProcedure;\r
@@ -95,13 +96,16 @@ public enum GraphModuleSourceRepository implements ModuleSourceRepository {
     \r
     public static class GraphModuleSource extends StringModuleSource {\r
 \r
-        public GraphModuleSource(String moduleName, ClassLoader classLoader, String moduleText) {\r
+        private final boolean immutable;\r
+\r
+        public GraphModuleSource(String moduleName, ClassLoader classLoader, String moduleText, boolean immutable) {\r
             super(moduleName, classLoader, moduleText);\r
+            this.immutable = immutable;\r
         }\r
         \r
         @Override\r
         public boolean isUpdateable() {\r
-            return true;\r
+            return !immutable;\r
         }\r
         \r
         @Override\r
@@ -128,7 +132,8 @@ public enum GraphModuleSourceRepository implements ModuleSourceRepository {
             if(!graph.isInstanceOf(moduleResource, L0.SCLModule))\r
                 return null;\r
             String text = graph.getRelatedValue(moduleResource, L0.SCLModule_definition);\r
-            return new GraphModuleSource(parameter, getClass().getClassLoader(), text);\r
+            boolean immutable = StructuralUtils.isImmutable(graph, moduleResource);\r
+            return new GraphModuleSource(parameter, getClass().getClassLoader(), text, immutable);\r
         }\r
     }\r
     \r
index 507256bd73a20437bba8bd7d7e0d4c29c61d76fc..0a709036f3937962d4e168c04d9428a072dc8170 100644 (file)
@@ -3,5 +3,4 @@ output.. = bin/
 bin.includes = META-INF/,\\r
                .,\\r
                scl/\r
-src.includes = scl/,\\r
-               jdom-2.0.6.jar\r
+src.includes = scl/\r
index 73be05f6ccb45a58fca0a8276df6420ac522c372..45db1307027f5551039897b741ee1c87f74a532b 100755 (executable)
@@ -181,7 +181,7 @@ public class Namespace {
                 }\r
                 else {\r
                     Activator.logError("Method " + method.getName() + " in class " + \r
-                            clazz.getCanonicalName() + " has incompantible SCL type in the SCLValue annotation."\r
+                            clazz.getCanonicalName() + " has incompatible SCL type in the SCLValue annotation."\r
                             );\r
                     ReflectionUtils.isCompatible(scheme, type, method);\r
                 }\r
@@ -215,7 +215,7 @@ public class Namespace {
                 }\r
                 else {\r
                     Activator.logError("Constructor of " + \r
-                            clazz.getCanonicalName() + " has incompantible SCL type in the SCLValue annotation."\r
+                            clazz.getCanonicalName() + " has incompatible SCL type in the SCLValue annotation."\r
                             );\r
                 }\r
             } catch (TypeNotFoundException e) {\r
@@ -264,7 +264,7 @@ public class Namespace {
                 }\r
                 else {\r
                     Activator.logError("Field " + field.getName() + " in class " + \r
-                            clazz.getCanonicalName() + " has incompantible SCL type in the SCLValue annotation."\r
+                            clazz.getCanonicalName() + " has incompatible SCL type in the SCLValue annotation."\r
                             );\r
                 }\r
             } catch (TypeNotFoundException e) {\r
index 3a852b36799189dcdd6dd877bfdf281af7495b4d..2a2f3d934e5975f2fe03ed1d4bbbd4def0f8a45e 100755 (executable)
                style="push">\r
          </command>\r
       </menuContribution>\r
-      <menuContribution\r
-            allPopups="false"\r
-            locationURI="org.simantics.scl.ui.menuContribution1">\r
-      </menuContribution>\r
    </extension>\r
    <extension\r
          point="org.eclipse.ui.commands">\r
index b0abb61b15627f3d828fd5404ccb6fd27a533797..385af993847c9d2b44393cdbc92386c19c0c18aa 100644 (file)
@@ -434,7 +434,8 @@ public class CellValueVisitor implements AstValueVisitor<Object> {
 \r
        @Override\r
        public Object visit(AstIdentifier id) {\r
-               throw new IllegalStateException();\r
+               return FormulaError2.NAME.getString();\r
+               //throw new IllegalStateException();\r
        }\r
        \r
        @Override\r
index 80e9656e33db8e451cc737d7b69f1aa5d6431854..9a3e8732679d284b4a30abfdbcfc274da9a708e7 100644 (file)
@@ -495,7 +495,13 @@ public class GraphUI implements Adaptable, ListenerSupport, AsyncListenerSupport
                                public <T> void edit(Transaction<Write> transaction, String location, String property, T value, Binding binding, Consumer<?> callback) {\r
                                        \r
                                    if (ClientModel.ITERATION_ENABLED.equals(location)) {\r
-                                       \r
+                                       Simantics.getSession().asyncRequest(new ReadRequest() {\r
+                                                       @Override\r
+                                                       public void run(ReadGraph graph) throws DatabaseException {\r
+                                                               getBook(graph).setIterationEnabled((boolean)value);\r
+                                                       }\r
+                                               });\r
+                                       return;\r
                                    }\r
                                    \r
                                    if (ClientModel.MODE.equals(location)) {\r
index caf3cd98473b38d5e5cb1e33c0e3ecea0e7ea6d7..e292fd91848659bcc4822dbc01604715f8a34212 100644 (file)
@@ -57,6 +57,8 @@ public class SpreadsheetBook implements SpreadsheetElement<SpreadsheetElement, S
        \r
        public Map<Integer, SpreadsheetElement> children = new HashMap<>();\r
 \r
+       private boolean iterationEnabled;\r
+\r
        public int getNewId(SpreadsheetElement element) {\r
                int result = idCounter++;\r
                children.put(result, element);\r
@@ -401,4 +403,12 @@ public class SpreadsheetBook implements SpreadsheetElement<SpreadsheetElement, S
         \r
     }\r
 \r
+       public void setIterationEnabled(boolean value) {\r
+               this.iterationEnabled = value;\r
+       }\r
+       \r
+       public boolean isIterationEnabled() {\r
+               return iterationEnabled;\r
+       }\r
+\r
 }\r
index 7d04e9b6e21c607bb80b30bce98ed10ac8a5489c..b7536f83aa906eed9457356d387ff44336408997 100644 (file)
@@ -101,22 +101,26 @@ public class SpreadsheetCell implements SpreadsheetElement, SheetNode {
                                AstValue value = ((SpreadsheetFormula)content).value;\r
                                if(this.inProgress == true) this.iterations++;\r
                                \r
-                               if(env.iterationEnabled == false){\r
+                               if(!env.getBook().isIterationEnabled()){\r
                                        if(this.inProgress == false){\r
                                                this.inProgress = true;\r
                                                f.result = value.accept(visitor);\r
                                        }\r
                                        else f.result = FormulaError2.CIRCULAR_REF.getString();\r
                                }\r
-                               else if(iterations<env.iterationLimit){\r
+                               else if(this.iterations<env.iterationLimit){\r
                                        this.inProgress = true;\r
                                        f.result = value.accept(visitor);\r
                                }\r
-                               else f.result = 0.0;\r
+                               else {\r
+                                       if(f.result==null)\r
+                                               f.result = 0.0;\r
+                               }\r
                                \r
                                env.getBook().registerReferences(makeReferenceKey(), visitor.getReferences());\r
                        }\r
                        this.inProgress = false;\r
+                       this.iterations = 0;\r
                        return (T)f.result;\r
                } else if (content instanceof SpreadsheetSCLConstant) {\r
                    SpreadsheetSCLConstant sclConstant = (SpreadsheetSCLConstant) content;\r
index bb5a5d71bd38935e65ac7a4d3cfce37029ddb262..b1b9ad0c60fc2a23897af8ddbc2516bc8313b662 100644 (file)
@@ -11,8 +11,6 @@ public class SpreadsheetEvaluationEnvironment {
     final private SpreadsheetBook book;\r
     private Map<String, CellFormulaFunction<?>> functions = new HashMap<>();\r
     public int iterationLimit = 100;\r
-    public boolean iterationEnabled = false;\r
-    \r
 \r
     public SpreadsheetEvaluationEnvironment(SpreadsheetBook book) {\r
         this.book = book;\r
index 9b4ef34e34bf3051a1b4f4e507eef83b4f33c0a3..d534c9488a395dbfb46ceb3093bc0f4063fb73e5 100644 (file)
@@ -753,6 +753,10 @@ public class SpreadsheetModel {
                            @Override\r
                            public void actionPerformed(ActionEvent e) {\r
                                System.out.println("state is " + iterationEnabled.isSelected());\r
+                               CellEditor editor = serverInterface.getAdapter(CellEditor.class);\r
+                               if(editor != null) {\r
+                                   editor.edit(null, ClientModel.ITERATION_ENABLED, ClientModel.ITERATION_ENABLED, iterationEnabled.isSelected(), null, null);\r
+                               }\r
                            }\r
                        });\r
                        \r
index 0b0214e61ccf798be797d09c751282e6cbb4bc3a..d029f3ae7942db8592e2bc68241b30f5af17b2af 100644 (file)
@@ -16,6 +16,7 @@ import org.simantics.db.Statement;
 import org.simantics.db.WriteGraph;\r
 import org.simantics.db.common.CommentMetadata;\r
 import org.simantics.db.common.request.ObjectsWithType;\r
+import org.simantics.db.common.request.PossibleTypedParent;\r
 import org.simantics.db.common.utils.NameUtils;\r
 import org.simantics.db.exception.DatabaseException;\r
 import org.simantics.db.layer0.exception.MissingVariableException;\r
@@ -273,5 +274,17 @@ public class StructuralUtils {
        }\r
        return null;\r
     }\r
-    \r
+\r
+    public static boolean isImmutable(ReadGraph graph, Resource r) throws DatabaseException {\r
+        StructuralResource2 STR = StructuralResource2.getInstance(graph);\r
+        Resource uc = graph.syncRequest(new PossibleTypedParent(r, STR.ComponentType));\r
+        return graph.isImmutable(r)\r
+                // Anything under a published or locked user component is published as well\r
+                || (uc != null && (Layer0Utils.isPublished(graph, uc)\r
+                         || graph.hasStatement(uc, STR.ComponentType_Locked)))\r
+                // Anything under a published container (shared library) is published as well\r
+                || Layer0Utils.isContainerPublished(graph, r)\r
+                ;\r
+    }\r
+\r
 }\r
index b088bf189f5cea2ed5bd984e45bc934ad442ca44..accbb69ba407abbf8699726a1c9749e5451406b3 100644 (file)
@@ -12,4 +12,4 @@
 source.. = src/\r
 output.. = bin/\r
 bin.includes = META-INF/,\\r
-               .\r
+               .
\ No newline at end of file
index ea5e89791c2f201c66c2376e5bb5cf03148cb2f2..a2ec73d89334f9a5a1ca4662daae6a2fc46acf23 100644 (file)
Binary files a/bundles/org.simantics.views.ontology/graph.tg and b/bundles/org.simantics.views.ontology/graph.tg differ
index c91515096fb6bc15d53440f4aa6fab826c882a84..65f9a4cbb2613aced2342deecc6c650690c607cb 100644 (file)
@@ -86,6 +86,8 @@ Views.Control.Style.Constant.Check = 32 : L0.Integer
 Views.Control.Style.Constant.Wrap = 64 : L0.Integer
 Views.Control.Style.Constant.HScroll = 256 : L0.Integer
 Views.Control.Style.Constant.VScroll = 512 : L0.Integer
+Views.Control.Style.Constant.Horizontal = 256 : L0.Integer
+Views.Control.Style.Constant.Vertical = 512 : L0.Integer
 Views.Control.Style.Constant.Border = 2048 : L0.Integer
 Views.Control.Style.Constant.FullSelection = 65536 : L0.Integer
 Views.Control.Style.Constant.NoFocus = 524288 : L0.Integer
@@ -220,6 +222,7 @@ Views.Button <T Views.TextContainer
 Views.Browser <T Views.Control
   >-- Views.Browser.document ==> "String" <R SG.Node.HasProperty : L0.FunctionalRelation
   >-- Views.Browser.variable ==> "Variable" <R SG.Node.HasProperty : L0.FunctionalRelation
+  >-- Views.Browser.locationChanging ==> "a -> Boolean" <R SG.Node.HasProperty : L0.FunctionalRelation
 
 Views.WikiBrowser <T Views.Control
   >-- Views.WikiBrowser.document ==> "String" <R SG.Node.HasProperty : L0.FunctionalRelation
@@ -312,6 +315,42 @@ Views.GridLayout.GridData.CENTER = 2 : L0.Integer
 Views.GridLayout.GridData.END = 3 : L0.Integer
 Views.GridLayout.GridData.FILL = 4 : L0.Integer
 
+Views.RowLayout <T Views.Layout
+  @L0.assert L0.HasValueType "RowLayout"
+  @L0.assert
+    L0.ConvertsToValueWith
+    Views.Functions.rowLayout : L0.ExternalValue
+  >-- Views.RowLayout.type ==> "Integer" <R L0.HasProperty : L0.FunctionalRelation
+  >-- Views.RowLayout.spacing ==> "Integer" <R L0.HasProperty : L0.FunctionalRelation
+  >-- Views.RowLayout.center ==> "Boolean" <R L0.HasProperty : L0.FunctionalRelation
+  >-- Views.RowLayout.fill ==> "Boolean" <R L0.HasProperty : L0.FunctionalRelation
+  >-- Views.RowLayout.justify ==> "Boolean" <R L0.HasProperty : L0.FunctionalRelation
+  >-- Views.RowLayout.pack ==> "Boolean" <R L0.HasProperty : L0.FunctionalRelation
+  >-- Views.RowLayout.wrap ==> "Boolean" <R L0.HasProperty : L0.FunctionalRelation
+  >-- Views.RowLayout.extendedMargins ==> "a" <R L0.HasProperty : L0.FunctionalRelation
+  @L0.assert Views.RowLayout.type Views.Control.Style.Constant.Horizontal
+  @L0.assert Views.RowLayout.spacing 3
+  @L0.assert Views.RowLayout.center false
+  @L0.assert Views.RowLayout.fill false
+  @L0.assert Views.RowLayout.justify false
+  @L0.assert Views.RowLayout.pack true
+  @L0.assert Views.RowLayout.wrap true
+  @L0.assert Views.RowLayout.extendedMargins 
+    (3,3,3,3) : Views.RowLayout.ExtendedMargins
+
+Views.RowLayout.ExtendedMargins <T L0.Literal
+    @L0.assert L0.HasDataType $(Integer,Integer,Integer,Integer)
+
+Views.RowLayout.RowData <T L0.Value
+  @L0.assert L0.HasValueType "RowData"
+  @L0.assert
+    L0.ConvertsToValueWith
+    Views.Functions.rowData : L0.ExternalValue
+  >-- Views.RowLayout.RowData.width ==> "Integer" <R L0.HasProperty : L0.FunctionalRelation
+  >-- Views.RowLayout.RowData.height ==> "Integer" <R L0.HasProperty : L0.FunctionalRelation
+  @L0.assert Views.RowLayout.RowData.width -1
+  @L0.assert Views.RowLayout.RowData.height -1
+
 Views.SingleColumn 
   @Views.Explorer.Column.full "single" "Entries" "LEFT" 150 "Entries" true 1
 
index 1414c21161005dc532a9bb1060f54f2ac3aa9113..21a552b218ad1a1bdab3c292b9bb702972a89e80 100644 (file)
@@ -17,6 +17,8 @@ public class ViewsResources {
     public final Resource Browser;\r
     public final Resource Browser_document;\r
     public final Resource Browser_document_Inverse;\r
+    public final Resource Browser_locationChanging;\r
+    public final Resource Browser_locationChanging_Inverse;\r
     public final Resource Browser_variable;\r
     public final Resource Browser_variable_Inverse;\r
     public final Resource BundleImage;\r
@@ -53,12 +55,14 @@ public class ViewsResources {
     public final Resource Control_Style_Constant_Check;\r
     public final Resource Control_Style_Constant_FullSelection;\r
     public final Resource Control_Style_Constant_HScroll;\r
+    public final Resource Control_Style_Constant_Horizontal;\r
     public final Resource Control_Style_Constant_Multi;\r
     public final Resource Control_Style_Constant_NoFocus;\r
     public final Resource Control_Style_Constant_None;\r
     public final Resource Control_Style_Constant_Push;\r
     public final Resource Control_Style_Constant_ReadOnly;\r
     public final Resource Control_Style_Constant_VScroll;\r
+    public final Resource Control_Style_Constant_Vertical;\r
     public final Resource Control_Style_Constant_Wrap;\r
     public final Resource Control_Style_HasConstant;\r
     public final Resource Control_Style_HasConstant_Inverse;\r
@@ -130,6 +134,8 @@ public class ViewsResources {
     public final Resource Functions_gridLayout;\r
     public final Resource Functions_parameterValue;\r
     public final Resource Functions_resourceURI;\r
+    public final Resource Functions_rowData;\r
+    public final Resource Functions_rowLayout;\r
     public final Resource Functions_singleResourceSelection;\r
     public final Resource Functions_style;\r
     public final Resource Functions_tabChildNames;\r
@@ -193,6 +199,29 @@ public class ViewsResources {
     public final Resource ResourceURI;\r
     public final Resource ResourceURI_HasResource;\r
     public final Resource ResourceURI_HasResource_Inverse;\r
+    public final Resource RowLayout;\r
+    public final Resource RowLayout_ExtendedMargins;\r
+    public final Resource RowLayout_RowData;\r
+    public final Resource RowLayout_RowData_height;\r
+    public final Resource RowLayout_RowData_height_Inverse;\r
+    public final Resource RowLayout_RowData_width;\r
+    public final Resource RowLayout_RowData_width_Inverse;\r
+    public final Resource RowLayout_center;\r
+    public final Resource RowLayout_center_Inverse;\r
+    public final Resource RowLayout_extendedMargins;\r
+    public final Resource RowLayout_extendedMargins_Inverse;\r
+    public final Resource RowLayout_fill;\r
+    public final Resource RowLayout_fill_Inverse;\r
+    public final Resource RowLayout_justify;\r
+    public final Resource RowLayout_justify_Inverse;\r
+    public final Resource RowLayout_pack;\r
+    public final Resource RowLayout_pack_Inverse;\r
+    public final Resource RowLayout_spacing;\r
+    public final Resource RowLayout_spacing_Inverse;\r
+    public final Resource RowLayout_type;\r
+    public final Resource RowLayout_type_Inverse;\r
+    public final Resource RowLayout_wrap;\r
+    public final Resource RowLayout_wrap_Inverse;\r
     public final Resource SashForm;\r
     public final Resource SashForm_Horizontal;\r
     public final Resource SashForm_Vertical;\r
@@ -259,6 +288,8 @@ public class ViewsResources {
         public static final String Browser = "http://www.simantics.org/Views-1.2/Browser";\r
         public static final String Browser_document = "http://www.simantics.org/Views-1.2/Browser/document";\r
         public static final String Browser_document_Inverse = "http://www.simantics.org/Views-1.2/Browser/document/Inverse";\r
+        public static final String Browser_locationChanging = "http://www.simantics.org/Views-1.2/Browser/locationChanging";\r
+        public static final String Browser_locationChanging_Inverse = "http://www.simantics.org/Views-1.2/Browser/locationChanging/Inverse";\r
         public static final String Browser_variable = "http://www.simantics.org/Views-1.2/Browser/variable";\r
         public static final String Browser_variable_Inverse = "http://www.simantics.org/Views-1.2/Browser/variable/Inverse";\r
         public static final String BundleImage = "http://www.simantics.org/Views-1.2/BundleImage";\r
@@ -295,12 +326,14 @@ public class ViewsResources {
         public static final String Control_Style_Constant_Check = "http://www.simantics.org/Views-1.2/Control/Style/Constant/Check";\r
         public static final String Control_Style_Constant_FullSelection = "http://www.simantics.org/Views-1.2/Control/Style/Constant/FullSelection";\r
         public static final String Control_Style_Constant_HScroll = "http://www.simantics.org/Views-1.2/Control/Style/Constant/HScroll";\r
+        public static final String Control_Style_Constant_Horizontal = "http://www.simantics.org/Views-1.2/Control/Style/Constant/Horizontal";\r
         public static final String Control_Style_Constant_Multi = "http://www.simantics.org/Views-1.2/Control/Style/Constant/Multi";\r
         public static final String Control_Style_Constant_NoFocus = "http://www.simantics.org/Views-1.2/Control/Style/Constant/NoFocus";\r
         public static final String Control_Style_Constant_None = "http://www.simantics.org/Views-1.2/Control/Style/Constant/None";\r
         public static final String Control_Style_Constant_Push = "http://www.simantics.org/Views-1.2/Control/Style/Constant/Push";\r
         public static final String Control_Style_Constant_ReadOnly = "http://www.simantics.org/Views-1.2/Control/Style/Constant/ReadOnly";\r
         public static final String Control_Style_Constant_VScroll = "http://www.simantics.org/Views-1.2/Control/Style/Constant/VScroll";\r
+        public static final String Control_Style_Constant_Vertical = "http://www.simantics.org/Views-1.2/Control/Style/Constant/Vertical";\r
         public static final String Control_Style_Constant_Wrap = "http://www.simantics.org/Views-1.2/Control/Style/Constant/Wrap";\r
         public static final String Control_Style_HasConstant = "http://www.simantics.org/Views-1.2/Control/Style/HasConstant";\r
         public static final String Control_Style_HasConstant_Inverse = "http://www.simantics.org/Views-1.2/Control/Style/HasConstant/Inverse";\r
@@ -372,6 +405,8 @@ public class ViewsResources {
         public static final String Functions_gridLayout = "http://www.simantics.org/Views-1.2/Functions/gridLayout";\r
         public static final String Functions_parameterValue = "http://www.simantics.org/Views-1.2/Functions/parameterValue";\r
         public static final String Functions_resourceURI = "http://www.simantics.org/Views-1.2/Functions/resourceURI";\r
+        public static final String Functions_rowData = "http://www.simantics.org/Views-1.2/Functions/rowData";\r
+        public static final String Functions_rowLayout = "http://www.simantics.org/Views-1.2/Functions/rowLayout";\r
         public static final String Functions_singleResourceSelection = "http://www.simantics.org/Views-1.2/Functions/singleResourceSelection";\r
         public static final String Functions_style = "http://www.simantics.org/Views-1.2/Functions/style";\r
         public static final String Functions_tabChildNames = "http://www.simantics.org/Views-1.2/Functions/tabChildNames";\r
@@ -435,6 +470,29 @@ public class ViewsResources {
         public static final String ResourceURI = "http://www.simantics.org/Views-1.2/ResourceURI";\r
         public static final String ResourceURI_HasResource = "http://www.simantics.org/Views-1.2/ResourceURI/HasResource";\r
         public static final String ResourceURI_HasResource_Inverse = "http://www.simantics.org/Views-1.2/ResourceURI/HasResource/Inverse";\r
+        public static final String RowLayout = "http://www.simantics.org/Views-1.2/RowLayout";\r
+        public static final String RowLayout_ExtendedMargins = "http://www.simantics.org/Views-1.2/RowLayout/ExtendedMargins";\r
+        public static final String RowLayout_RowData = "http://www.simantics.org/Views-1.2/RowLayout/RowData";\r
+        public static final String RowLayout_RowData_height = "http://www.simantics.org/Views-1.2/RowLayout/RowData/height";\r
+        public static final String RowLayout_RowData_height_Inverse = "http://www.simantics.org/Views-1.2/RowLayout/RowData/height/Inverse";\r
+        public static final String RowLayout_RowData_width = "http://www.simantics.org/Views-1.2/RowLayout/RowData/width";\r
+        public static final String RowLayout_RowData_width_Inverse = "http://www.simantics.org/Views-1.2/RowLayout/RowData/width/Inverse";\r
+        public static final String RowLayout_center = "http://www.simantics.org/Views-1.2/RowLayout/center";\r
+        public static final String RowLayout_center_Inverse = "http://www.simantics.org/Views-1.2/RowLayout/center/Inverse";\r
+        public static final String RowLayout_extendedMargins = "http://www.simantics.org/Views-1.2/RowLayout/extendedMargins";\r
+        public static final String RowLayout_extendedMargins_Inverse = "http://www.simantics.org/Views-1.2/RowLayout/extendedMargins/Inverse";\r
+        public static final String RowLayout_fill = "http://www.simantics.org/Views-1.2/RowLayout/fill";\r
+        public static final String RowLayout_fill_Inverse = "http://www.simantics.org/Views-1.2/RowLayout/fill/Inverse";\r
+        public static final String RowLayout_justify = "http://www.simantics.org/Views-1.2/RowLayout/justify";\r
+        public static final String RowLayout_justify_Inverse = "http://www.simantics.org/Views-1.2/RowLayout/justify/Inverse";\r
+        public static final String RowLayout_pack = "http://www.simantics.org/Views-1.2/RowLayout/pack";\r
+        public static final String RowLayout_pack_Inverse = "http://www.simantics.org/Views-1.2/RowLayout/pack/Inverse";\r
+        public static final String RowLayout_spacing = "http://www.simantics.org/Views-1.2/RowLayout/spacing";\r
+        public static final String RowLayout_spacing_Inverse = "http://www.simantics.org/Views-1.2/RowLayout/spacing/Inverse";\r
+        public static final String RowLayout_type = "http://www.simantics.org/Views-1.2/RowLayout/type";\r
+        public static final String RowLayout_type_Inverse = "http://www.simantics.org/Views-1.2/RowLayout/type/Inverse";\r
+        public static final String RowLayout_wrap = "http://www.simantics.org/Views-1.2/RowLayout/wrap";\r
+        public static final String RowLayout_wrap_Inverse = "http://www.simantics.org/Views-1.2/RowLayout/wrap/Inverse";\r
         public static final String SashForm = "http://www.simantics.org/Views-1.2/SashForm";\r
         public static final String SashForm_Horizontal = "http://www.simantics.org/Views-1.2/SashForm/Horizontal";\r
         public static final String SashForm_Vertical = "http://www.simantics.org/Views-1.2/SashForm/Vertical";\r
@@ -511,6 +569,8 @@ public class ViewsResources {
         Browser = getResourceOrNull(graph, URIs.Browser);\r
         Browser_document = getResourceOrNull(graph, URIs.Browser_document);\r
         Browser_document_Inverse = getResourceOrNull(graph, URIs.Browser_document_Inverse);\r
+        Browser_locationChanging = getResourceOrNull(graph, URIs.Browser_locationChanging);\r
+        Browser_locationChanging_Inverse = getResourceOrNull(graph, URIs.Browser_locationChanging_Inverse);\r
         Browser_variable = getResourceOrNull(graph, URIs.Browser_variable);\r
         Browser_variable_Inverse = getResourceOrNull(graph, URIs.Browser_variable_Inverse);\r
         BundleImage = getResourceOrNull(graph, URIs.BundleImage);\r
@@ -547,12 +607,14 @@ public class ViewsResources {
         Control_Style_Constant_Check = getResourceOrNull(graph, URIs.Control_Style_Constant_Check);\r
         Control_Style_Constant_FullSelection = getResourceOrNull(graph, URIs.Control_Style_Constant_FullSelection);\r
         Control_Style_Constant_HScroll = getResourceOrNull(graph, URIs.Control_Style_Constant_HScroll);\r
+        Control_Style_Constant_Horizontal = getResourceOrNull(graph, URIs.Control_Style_Constant_Horizontal);\r
         Control_Style_Constant_Multi = getResourceOrNull(graph, URIs.Control_Style_Constant_Multi);\r
         Control_Style_Constant_NoFocus = getResourceOrNull(graph, URIs.Control_Style_Constant_NoFocus);\r
         Control_Style_Constant_None = getResourceOrNull(graph, URIs.Control_Style_Constant_None);\r
         Control_Style_Constant_Push = getResourceOrNull(graph, URIs.Control_Style_Constant_Push);\r
         Control_Style_Constant_ReadOnly = getResourceOrNull(graph, URIs.Control_Style_Constant_ReadOnly);\r
         Control_Style_Constant_VScroll = getResourceOrNull(graph, URIs.Control_Style_Constant_VScroll);\r
+        Control_Style_Constant_Vertical = getResourceOrNull(graph, URIs.Control_Style_Constant_Vertical);\r
         Control_Style_Constant_Wrap = getResourceOrNull(graph, URIs.Control_Style_Constant_Wrap);\r
         Control_Style_HasConstant = getResourceOrNull(graph, URIs.Control_Style_HasConstant);\r
         Control_Style_HasConstant_Inverse = getResourceOrNull(graph, URIs.Control_Style_HasConstant_Inverse);\r
@@ -624,6 +686,8 @@ public class ViewsResources {
         Functions_gridLayout = getResourceOrNull(graph, URIs.Functions_gridLayout);\r
         Functions_parameterValue = getResourceOrNull(graph, URIs.Functions_parameterValue);\r
         Functions_resourceURI = getResourceOrNull(graph, URIs.Functions_resourceURI);\r
+        Functions_rowData = getResourceOrNull(graph, URIs.Functions_rowData);\r
+        Functions_rowLayout = getResourceOrNull(graph, URIs.Functions_rowLayout);\r
         Functions_singleResourceSelection = getResourceOrNull(graph, URIs.Functions_singleResourceSelection);\r
         Functions_style = getResourceOrNull(graph, URIs.Functions_style);\r
         Functions_tabChildNames = getResourceOrNull(graph, URIs.Functions_tabChildNames);\r
@@ -687,6 +751,29 @@ public class ViewsResources {
         ResourceURI = getResourceOrNull(graph, URIs.ResourceURI);\r
         ResourceURI_HasResource = getResourceOrNull(graph, URIs.ResourceURI_HasResource);\r
         ResourceURI_HasResource_Inverse = getResourceOrNull(graph, URIs.ResourceURI_HasResource_Inverse);\r
+        RowLayout = getResourceOrNull(graph, URIs.RowLayout);\r
+        RowLayout_ExtendedMargins = getResourceOrNull(graph, URIs.RowLayout_ExtendedMargins);\r
+        RowLayout_RowData = getResourceOrNull(graph, URIs.RowLayout_RowData);\r
+        RowLayout_RowData_height = getResourceOrNull(graph, URIs.RowLayout_RowData_height);\r
+        RowLayout_RowData_height_Inverse = getResourceOrNull(graph, URIs.RowLayout_RowData_height_Inverse);\r
+        RowLayout_RowData_width = getResourceOrNull(graph, URIs.RowLayout_RowData_width);\r
+        RowLayout_RowData_width_Inverse = getResourceOrNull(graph, URIs.RowLayout_RowData_width_Inverse);\r
+        RowLayout_center = getResourceOrNull(graph, URIs.RowLayout_center);\r
+        RowLayout_center_Inverse = getResourceOrNull(graph, URIs.RowLayout_center_Inverse);\r
+        RowLayout_extendedMargins = getResourceOrNull(graph, URIs.RowLayout_extendedMargins);\r
+        RowLayout_extendedMargins_Inverse = getResourceOrNull(graph, URIs.RowLayout_extendedMargins_Inverse);\r
+        RowLayout_fill = getResourceOrNull(graph, URIs.RowLayout_fill);\r
+        RowLayout_fill_Inverse = getResourceOrNull(graph, URIs.RowLayout_fill_Inverse);\r
+        RowLayout_justify = getResourceOrNull(graph, URIs.RowLayout_justify);\r
+        RowLayout_justify_Inverse = getResourceOrNull(graph, URIs.RowLayout_justify_Inverse);\r
+        RowLayout_pack = getResourceOrNull(graph, URIs.RowLayout_pack);\r
+        RowLayout_pack_Inverse = getResourceOrNull(graph, URIs.RowLayout_pack_Inverse);\r
+        RowLayout_spacing = getResourceOrNull(graph, URIs.RowLayout_spacing);\r
+        RowLayout_spacing_Inverse = getResourceOrNull(graph, URIs.RowLayout_spacing_Inverse);\r
+        RowLayout_type = getResourceOrNull(graph, URIs.RowLayout_type);\r
+        RowLayout_type_Inverse = getResourceOrNull(graph, URIs.RowLayout_type_Inverse);\r
+        RowLayout_wrap = getResourceOrNull(graph, URIs.RowLayout_wrap);\r
+        RowLayout_wrap_Inverse = getResourceOrNull(graph, URIs.RowLayout_wrap_Inverse);\r
         SashForm = getResourceOrNull(graph, URIs.SashForm);\r
         SashForm_Horizontal = getResourceOrNull(graph, URIs.SashForm_Horizontal);\r
         SashForm_Vertical = getResourceOrNull(graph, URIs.SashForm_Vertical);\r
index 6fc3491a1a69c4255a97a97aa52b7ffc45119be3..91cc7f7a1381bf81a9f3671c5455f46365521867 100644 (file)
@@ -1,15 +1,22 @@
 package org.simantics.views.swt.client.base;\r
 \r
 import org.eclipse.jface.layout.GridLayoutFactory;\r
+import org.eclipse.jface.layout.RowLayoutFactory;\r
 import org.eclipse.swt.SWT;\r
 import org.eclipse.swt.layout.GridData;\r
 import org.eclipse.swt.layout.GridLayout;\r
+import org.eclipse.swt.layout.RowData;\r
+import org.eclipse.swt.layout.RowLayout;\r
 import org.eclipse.swt.widgets.Layout;\r
 import org.simantics.browsing.ui.Column;\r
 import org.simantics.browsing.ui.Column.Align;\r
 import org.simantics.views.ViewUtils.ColumnBean;\r
 import org.simantics.views.ViewUtils.GridDataBean;\r
 import org.simantics.views.ViewUtils.GridLayoutBean;\r
+import org.simantics.views.ViewUtils.LayoutBean;\r
+import org.simantics.views.ViewUtils.LayoutDataBean;\r
+import org.simantics.views.ViewUtils.RowDataBean;\r
+import org.simantics.views.ViewUtils.RowLayoutBean;\r
 \r
 public class SWTViewUtils {\r
 \r
@@ -24,10 +31,25 @@ public class SWTViewUtils {
                result.marginBottom = bean.marginBottom;\r
                return result;\r
        }\r
-       \r
-       \r
+\r
+       public static Layout toLayout(RowLayoutBean bean) {\r
+               RowLayout result = RowLayoutFactory.fillDefaults().create();\r
+               result.type = bean.type;\r
+               result.spacing = bean.spacing;\r
+               result.center = bean.center;\r
+               result.fill = bean.fill;\r
+               result.justify = bean.justify;\r
+               result.pack = bean.pack;\r
+               result.wrap = bean.wrap;\r
+               result.marginLeft = bean.marginLeft;\r
+               result.marginRight = bean.marginRight;\r
+               result.marginTop = bean.marginTop;\r
+               result.marginBottom = bean.marginBottom;\r
+               return result;\r
+       }\r
+\r
        public static GridData toGridData(GridDataBean bean) {\r
-               GridData result = new GridData(SWT.FILL, SWT.FILL, true, false);           \r
+               GridData result = new GridData(SWT.FILL, SWT.FILL, true, false);\r
                result.horizontalSpan = bean.horizontalSpan;\r
                result.grabExcessHorizontalSpace = bean.grabExcessHorizontalSpace;\r
                result.grabExcessVerticalSpace = bean.grabExcessVerticalSpace;\r
@@ -39,6 +61,27 @@ public class SWTViewUtils {
                \r
        }\r
 \r
+       public static RowData toRowData(RowDataBean bean) {\r
+               return new RowData(bean.width, bean.height);\r
+       }\r
+\r
+       public static Layout toLayout(LayoutBean layout) {\r
+               if (layout instanceof GridLayoutBean)\r
+                       return toLayout((GridLayoutBean) layout);\r
+               if (layout instanceof RowLayoutBean)\r
+                       return toLayout((RowLayoutBean) layout);\r
+               throw new IllegalArgumentException("unrecognized layout: " + layout);\r
+       }\r
+\r
+\r
+       public static Object toLayoutData(LayoutDataBean layoutData) {\r
+               if (layoutData instanceof GridDataBean)\r
+                       return toGridData((GridDataBean) layoutData);\r
+               if (layoutData instanceof RowDataBean)\r
+                       return toRowData((RowDataBean) layoutData);\r
+               throw new IllegalArgumentException("unrecognized layout data: " + layoutData);\r
+       }\r
+\r
        private static Align getAlign(String alignment) {\r
                if("LEFT".equals(alignment)) return Align.LEFT;\r
                else if("CENTER".equals(alignment)) return Align.CENTER;\r
index 182aee594f3c5e1af6a7ec538787586354a383cf..55ac799d3ba9509630e54c64c9c36f7ec4d1ef2f 100644 (file)
@@ -27,7 +27,7 @@ import org.simantics.ui.colors.Colors;
 import org.simantics.ui.fonts.Fonts;\r
 import org.simantics.utils.threads.IThreadWorkQueue;\r
 import org.simantics.utils.threads.SWTThread;\r
-import org.simantics.views.ViewUtils.GridDataBean;\r
+import org.simantics.views.ViewUtils.LayoutDataBean;\r
 \r
 abstract public class SingleSWTViewNode<T extends Control> extends SWTParentNode implements LoaderNode {\r
        \r
@@ -36,7 +36,7 @@ abstract public class SingleSWTViewNode<T extends Control> extends SWTParentNode
        private Map<String, Object> genericProperties = new HashMap<String, Object>();\r
        \r
        public Function2<String, Object, Boolean> propertyCallback;\r
-       public GridDataBean layoutData;\r
+       public LayoutDataBean layoutData;\r
        public int style;\r
        public String text;\r
        public RGB.Integer background;\r
@@ -292,8 +292,8 @@ abstract public class SingleSWTViewNode<T extends Control> extends SWTParentNode
        final public void synchronizeStyle(int style) {\r
        }\r
 \r
-       final public void synchronizeLayoutData(GridDataBean layoutData) {\r
-               if(layoutData != null) control.setLayoutData(SWTViewUtils.toGridData(layoutData));\r
+       final public void synchronizeLayoutData(LayoutDataBean layoutData) {\r
+               if(layoutData != null) control.setLayoutData(SWTViewUtils.toLayoutData(layoutData));\r
        }\r
        \r
 }\r
index 6df6bdaad3e14cdb419fc7c0697aaf215897d211..5c4d212691151c92813a1aea9a501cacbb67119b 100644 (file)
@@ -3,8 +3,11 @@ package org.simantics.views.swt.client.impl;
 import org.eclipse.jface.layout.GridDataFactory;\r
 import org.eclipse.jface.layout.GridLayoutFactory;\r
 import org.eclipse.swt.browser.Browser;\r
+import org.eclipse.swt.browser.LocationEvent;\r
+import org.eclipse.swt.browser.LocationListener;\r
 import org.eclipse.swt.widgets.Composite;\r
 import org.simantics.db.layer0.variable.Variable;\r
+import org.simantics.scl.runtime.function.Function1;\r
 import org.simantics.utils.datastructures.map.Tuple;\r
 import org.simantics.views.swt.client.base.SingleSWTViewNode;\r
 \r
@@ -12,10 +15,11 @@ public class SWTBrowser extends SingleSWTViewNode<Browser> {
        \r
        private static final long serialVersionUID = -2704760050046054447L;\r
        \r
-       public String                   document;\r
-       public Variable                                 variable;\r
+       public String                     document;\r
+       public Variable                   variable;\r
+       public Function1<Object, Boolean> locationChanging;\r
 \r
-       private Tuple                    lastAppliedParametrization;\r
+       private Tuple                     lastAppliedParametrization;\r
 \r
        @Override\r
        public void reset() {\r
@@ -32,6 +36,18 @@ public class SWTBrowser extends SingleSWTViewNode<Browser> {
                control = new Browser(parent, style);\r
                GridDataFactory.fillDefaults().grab(true, true).applyTo(control);\r
 \r
+               control.addLocationListener(new LocationListener() {\r
+                       @Override\r
+                       public void changing(LocationEvent event) {\r
+                               Function1<Object, Boolean> lc = locationChanging;\r
+                               if (lc != null)\r
+                                       lc.apply(event);\r
+                       }\r
+                       @Override\r
+                       public void changed(LocationEvent event) {\r
+                       }\r
+               });\r
+\r
                setProperties();\r
 \r
        }\r
index 5fe825a96e982462245c21baee2578aa408a5e23..a67d0abf950753d063419c08de52c0c3c350d410 100644 (file)
@@ -1,7 +1,7 @@
 package org.simantics.views.swt.client.impl;\r
 \r
 import org.eclipse.swt.widgets.Composite;\r
-import org.simantics.views.ViewUtils.GridLayoutBean;\r
+import org.simantics.views.ViewUtils.LayoutBean;\r
 import org.simantics.views.swt.client.base.SWTViewUtils;\r
 import org.simantics.views.swt.client.base.SingleSWTViewNode;\r
 \r
@@ -9,7 +9,7 @@ public class SWTComposite extends SingleSWTViewNode<Composite> {
        \r
        private static final long serialVersionUID = 7932335224632082902L;\r
        \r
-       public GridLayoutBean layout;\r
+       public LayoutBean layout;\r
        \r
        @Override\r
        public void createControls(org.eclipse.swt.widgets.Composite parent) {\r
@@ -22,7 +22,7 @@ public class SWTComposite extends SingleSWTViewNode<Composite> {
        \r
        }\r
 \r
-       final public void synchronizeLayout(GridLayoutBean layout) {\r
+       final public void synchronizeLayout(LayoutBean layout) {\r
                if(layout != null) control.setLayout(SWTViewUtils.toLayout(layout));\r
        }\r
        \r
index f448ebde49e50552266f57bda813cdafccd58783..3c0ce5a1f0504273960714cb0d470ff2159893e8 100644 (file)
@@ -23,7 +23,7 @@ import org.simantics.browsing.ui.swt.widgets.ModelBrowser;
 import org.simantics.browsing.ui.swt.widgets.impl.WidgetSupportImpl;\r
 import org.simantics.scl.runtime.function.Function1;\r
 import org.simantics.views.ViewUtils.ColumnBean;\r
-import org.simantics.views.ViewUtils.GridLayoutBean;\r
+import org.simantics.views.ViewUtils.LayoutBean;\r
 import org.simantics.views.swt.client.base.SWTViewUtils;\r
 import org.simantics.views.swt.client.base.SingleSWTViewNode;\r
 \r
@@ -31,7 +31,7 @@ public class SWTExplorer extends SingleSWTViewNode<ModelBrowser> {
        \r
        private static final long serialVersionUID = 7932335224632082902L;\r
        \r
-       public GridLayoutBean layout;\r
+       public LayoutBean layout;\r
        public String browseContext;\r
        public String contextMenuId;\r
        public String uiContext;\r
@@ -189,7 +189,7 @@ public class SWTExplorer extends SingleSWTViewNode<ModelBrowser> {
                }\r
        }\r
 \r
-       final public void synchronizeLayout(GridLayoutBean layout) {\r
+       final public void synchronizeLayout(LayoutBean layout) {\r
        }\r
        \r
 }\r
index 5bc8b2366e632d2ede8ee974940a019970eca8b0..af79bdc8d04aa389b93cf1891b95b57eee6b9231 100644 (file)
@@ -3,7 +3,7 @@ package org.simantics.views.swt.client.impl;
 import org.eclipse.swt.custom.SashForm;\r
 import org.eclipse.swt.widgets.Control;\r
 import org.eclipse.swt.widgets.Sash;\r
-import org.simantics.views.ViewUtils.GridLayoutBean;\r
+import org.simantics.views.ViewUtils.LayoutBean;\r
 import org.simantics.views.swt.client.base.SWTViewUtils;\r
 import org.simantics.views.swt.client.base.SingleSWTViewNode;\r
 \r
@@ -11,7 +11,7 @@ public class SWTSashForm extends SingleSWTViewNode<SashForm> {
        \r
        private static final long serialVersionUID = 7932335224632082902L;\r
        \r
-       public GridLayoutBean layout;\r
+       public LayoutBean layout;\r
        public int[] weights;\r
        public Integer orientation;\r
        \r
@@ -26,7 +26,7 @@ public class SWTSashForm extends SingleSWTViewNode<SashForm> {
        \r
        }\r
 \r
-       final public void synchronizeLayout(GridLayoutBean layout) {\r
+       final public void synchronizeLayout(LayoutBean layout) {\r
                if(layout != null) control.setLayout(SWTViewUtils.toLayout(layout));\r
        }\r
 \r
index 421315f892a6eae25d1b5a3f1a7e916298b6b934..1bf86ca124d26f8e5e6ca0da68a202b894d402b7 100644 (file)
@@ -13,7 +13,7 @@ import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Display;\r
 import org.eclipse.swt.widgets.Event;\r
 import org.eclipse.swt.widgets.Listener;\r
-import org.simantics.views.ViewUtils.GridLayoutBean;\r
+import org.simantics.views.ViewUtils.LayoutBean;\r
 import org.simantics.views.swt.client.base.SWTViewUtils;\r
 import org.simantics.views.swt.client.base.SingleSWTViewNode;\r
 \r
@@ -23,7 +23,7 @@ public class SWTScrolledComposite extends SingleSWTViewNode<ScrolledComposite> {
 \r
        private static final long serialVersionUID = 7932335224632082902L;\r
        \r
-       public GridLayoutBean layout;\r
+       public LayoutBean layout;\r
        \r
        private int minSize = 100;\r
        \r
@@ -124,7 +124,7 @@ public class SWTScrolledComposite extends SingleSWTViewNode<ScrolledComposite> {
        \r
        }\r
 \r
-       final public void synchronizeLayout(GridLayoutBean layout) {\r
+       final public void synchronizeLayout(LayoutBean layout) {\r
                if(layout != null) control.setLayout(SWTViewUtils.toLayout(layout));\r
        }\r
        \r
index b8aebe5375923e6b1239aa91cf7ab481941eed94..629f28285f1b0d4998a131528b03ba53e1e89b5d 100644 (file)
@@ -14,7 +14,7 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;\r
 import org.simantics.browsing.ui.swt.widgets.GraphExplorerComposite;\r
 import org.simantics.utils.ui.jface.BasePostSelectionProvider;\r
-import org.simantics.views.ViewUtils.GridLayoutBean;\r
+import org.simantics.views.ViewUtils.LayoutBean;\r
 import org.simantics.views.swt.client.base.ISWTViewNode;\r
 import org.simantics.views.swt.client.base.SingleSWTViewNode;\r
 \r
@@ -24,7 +24,7 @@ public class SWTTabFolder extends SingleSWTViewNode<CTabFolder> {
 \r
        public List<String> childNames;\r
 \r
-       public GridLayoutBean layout;\r
+       public LayoutBean layout;\r
        \r
        final BasePostSelectionProvider selectionProvider = new BasePostSelectionProvider();\r
 \r
@@ -119,7 +119,7 @@ public class SWTTabFolder extends SingleSWTViewNode<CTabFolder> {
                \r
        }\r
        \r
-       final public void synchronizeLayout(GridLayoutBean layout) {\r
+       final public void synchronizeLayout(LayoutBean layout) {\r
        }\r
        \r
 }\r
index 941213f9c59c35f1dfa2a8e1c7f93ffb6787725d..6d26bb7f83540f680250f9c571666ec41c888e0d 100644 (file)
@@ -104,12 +104,22 @@ public class All {
 \r
     @SCLValue(type = "ReadGraph -> Resource -> Variable -> a")\r
     public static Object gridData(ReadGraph graph, Resource converter, Variable context) throws DatabaseException {\r
-       return ViewUtils.getGridData(graph, converter);\r
+        return ViewUtils.getGridData(graph, converter);\r
     }\r
 \r
     @SCLValue(type = "ReadGraph -> Resource -> Variable -> a")\r
     public static Object gridLayout(ReadGraph graph, Resource converter, Variable context) throws DatabaseException {\r
-       return ViewUtils.getLayout(graph, converter);\r
+        return ViewUtils.getLayout(graph, converter);\r
+    }\r
+\r
+    @SCLValue(type = "ReadGraph -> Resource -> Variable -> a")\r
+    public static Object rowData(ReadGraph graph, Resource converter, Variable context) throws DatabaseException {\r
+        return ViewUtils.getRowData(graph, converter);\r
+    }\r
+\r
+    @SCLValue(type = "ReadGraph -> Resource -> Variable -> a")\r
+    public static Object rowLayout(ReadGraph graph, Resource converter, Variable context) throws DatabaseException {\r
+        return ViewUtils.getRowLayout(graph, converter);\r
     }\r
 \r
     @SCLValue(type = "ReadGraph -> Resource -> Variable -> a")\r
index f22e5ad836bc53e5f463b722bd83802789827703..749c2856e3b7d38a7721349174641f5293bf4c96 100644 (file)
@@ -32,20 +32,35 @@ public class ViewUtils {
     }\r
 \r
     public static final Binding EXTENDED_MARGINS_BINDING = Bindings.getBindingUnchecked(ExtendedMargins.class);\r
-       \r
-       public static class GridLayoutBean extends Bean {\r
-               \r
-               public int numColumns;\r
-               public int horizontalSpacing;\r
-               public int verticalSpacing;\r
+\r
+       public static class LayoutBean extends Bean {\r
                public int marginLeft;\r
                public int marginRight;\r
                public int marginTop;\r
                public int marginBottom;\r
+       }\r
+\r
+       public static class GridLayoutBean extends LayoutBean {\r
+               \r
+               public int numColumns;\r
+               public int horizontalSpacing;\r
+               public int verticalSpacing;\r
                \r
        }\r
-       \r
-       public static class GridDataBean extends Bean {\r
+\r
+       public static class RowLayoutBean extends LayoutBean {\r
+               public int type;\r
+               public int spacing;\r
+               public boolean center;\r
+               public boolean fill;\r
+               public boolean justify;\r
+               public boolean pack;\r
+               public boolean wrap;\r
+       }\r
+\r
+       public static class LayoutDataBean extends Bean {}\r
+\r
+       public static class GridDataBean extends LayoutDataBean {\r
                \r
                public int horizontalSpan;\r
                public boolean grabExcessHorizontalSpace;\r
@@ -56,7 +71,12 @@ public class ViewUtils {
                public int heightHint;\r
                \r
        }\r
-       \r
+\r
+       public static class RowDataBean extends LayoutDataBean {\r
+               public int width;\r
+               public int height;\r
+       }\r
+\r
        public static class ColumnBean extends Bean {\r
                \r
                public String key;\r
@@ -128,6 +148,50 @@ public class ViewUtils {
     \r
        }\r
 \r
+       public static RowLayoutBean getRowLayout(RequestProcessor processor, Resource configuration) throws DatabaseException {\r
+           return processor.sync(new ResourceRead<RowLayoutBean>(configuration) {\r
+               @Override\r
+               public RowLayoutBean perform(ReadGraph graph) throws DatabaseException {\r
+                   ViewsResources VIEW = ViewsResources.getInstance(graph);\r
+                   Integer type = graph.getPossibleRelatedValue(resource, VIEW.RowLayout_type, Bindings.INTEGER);\r
+                   Integer spacing = graph.getPossibleRelatedValue(resource, VIEW.RowLayout_spacing, Bindings.INTEGER);\r
+                   Boolean center = graph.getPossibleRelatedValue(resource, VIEW.RowLayout_center, Bindings.BOOLEAN);\r
+                Boolean fill = graph.getPossibleRelatedValue(resource, VIEW.RowLayout_fill, Bindings.BOOLEAN);\r
+                Boolean justify = graph.getPossibleRelatedValue(resource, VIEW.RowLayout_justify, Bindings.BOOLEAN);\r
+                   Boolean pack = graph.getPossibleRelatedValue(resource, VIEW.RowLayout_pack, Bindings.BOOLEAN);\r
+                   Boolean wrap = graph.getPossibleRelatedValue(resource, VIEW.RowLayout_wrap, Bindings.BOOLEAN);\r
+                   ExtendedMargins extendedMargins = graph.getPossibleRelatedValue(resource, VIEW.RowLayout_extendedMargins, EXTENDED_MARGINS_BINDING);\r
+\r
+                   RowLayoutBean layout = new RowLayoutBean();\r
+                   layout.type = type;\r
+                   layout.spacing = spacing;\r
+                layout.center = center;\r
+                layout.fill = fill;\r
+                layout.justify = justify;\r
+                   layout.pack = pack;\r
+                   layout.wrap = wrap;\r
+                   layout.marginLeft = extendedMargins.left;\r
+                   layout.marginRight = extendedMargins.right;\r
+                   layout.marginTop = extendedMargins.top;\r
+                   layout.marginBottom = extendedMargins.bottom;\r
+                   return layout;\r
+               }\r
+           });\r
+       }\r
+\r
+       public static RowDataBean getRowData(RequestProcessor processor, Resource configuration) throws DatabaseException {\r
+           return processor.sync(new ResourceRead<RowDataBean>(configuration) {\r
+               @Override\r
+               public RowDataBean perform(ReadGraph graph) throws DatabaseException {\r
+                   ViewsResources VIEW = ViewsResources.getInstance(graph);\r
+                   RowDataBean data = new RowDataBean();\r
+                   data.width = graph.getPossibleRelatedValue(resource, VIEW.GridLayout_GridData_preferredWidth, Bindings.INTEGER);\r
+                   data.height = graph.getPossibleRelatedValue(resource, VIEW.GridLayout_GridData_preferredHeight, Bindings.INTEGER);\r
+                   return data;\r
+               }\r
+           });\r
+       }\r
+\r
        public static int getStyle(RequestProcessor processor, Resource configuration) throws DatabaseException {\r
                \r
                return processor.sync(new ResourceRead<Integer>(configuration) {\r
@@ -188,6 +252,7 @@ public class ViewUtils {
 \r
                Simantics.getSession().async(new TernaryRead<Resource, Variable, String, T> (configuration, context, relationURI) {\r
 \r
+                       @SuppressWarnings("unchecked")\r
                        @Override\r
                        public T perform(ReadGraph graph) throws DatabaseException {\r
                                Object value = graph.getRelatedValue2(parameter, graph.getResource(parameter3), parameter2);\r
index b2e37f933fbaee8f3678fb5e32ee66a2d28e466c..09aecee3087ccda15f65bd1f917e1f68254e0e5c 100644 (file)
@@ -3,4 +3,3 @@ output.. = bin/
 bin.includes = META-INF/,\\r
                .,\\r
                plugin.xml,\\r
-               scl/\r
index aa1e3ebd141d5b39475bf62254ca49847c98027c..4641096f897c74ba92b63b4fac16e5afff9ffd03 100644 (file)
         <version>1.0.0-SNAPSHOT</version>\r
     </parent>\r
 \r
+    <build>\r
+        <plugins>\r
+            <plugin>\r
+                <groupId>org.eclipse.tycho</groupId>\r
+                <artifactId>tycho-compiler-plugin</artifactId>\r
+                <version>${tycho.version}</version>\r
+                <configuration>\r
+                    <compilerArgument>-err:-forbidden</compilerArgument>\r
+                </configuration>\r
+            </plugin>\r
+            <plugin>\r
+                <groupId>org.eclipse.tycho</groupId>\r
+                <artifactId>tycho-source-plugin</artifactId>\r
+                <version>${tycho.version}</version>\r
+                <executions>\r
+                    <execution>\r
+                        <id>plugin-source</id>\r
+                        <goals>\r
+                            <goal>plugin-source</goal>\r
+                        </goals>\r
+                    </execution>\r
+                </executions>\r
+            </plugin>\r
+        </plugins>\r
+    </build>\r
+\r
     <modules>\r
         <module>com.famfamfam.silk</module>\r
         <module>org.simantics</module>\r
         <module>org.simantics.workbench.search</module>\r
         <module>winterwell.markdown</module>\r
     </modules>\r
-</project>
\ No newline at end of file
+</project>\r
index ccfe656edf44bb47646ab831b540a2674d3c9bfc..a836df1a4054709778a193fdfb0835b62e9dc091 100644 (file)
@@ -5,8 +5,6 @@ bin.includes = META-INF/,\
                .,\
                lib/
 src.includes = src/,\
-               pom.xml,\
-               plugin.xml,\
                icons/,\
                lib/,\
                .project,\
index b91d19e0e6f745ab3a8d6a3b24edfb5b97320441..30e90c89299f42723c66e63b8693d53c51f45b19 100644 (file)
@@ -10,6 +10,6 @@
 #     VTT Technical Research Centre of Finland - initial API and implementation\r
 #     Semantum Oy - update to Eclipse Mars.1 (4.5.1)\r
 ###############################################################################\r
-bin.includes=features.xml\r
+bin.includes=feature.xml\r
 root.win32.win32.x86=bin/win32/win32/x86\r
 root.win32.win32.x86_64=bin/win32/win32/x86_64
\ No newline at end of file
index 34ab3dbcfb6b30809a711f5b267d38d6099d72e7..a19e2c230b63002d87a7068d253d0cb76d6d42cd 100644 (file)
@@ -13,7 +13,7 @@
 <feature\r
       id="org.simantics.rcp"\r
       label="Simantics Rich Client Platform"\r
-      version="1.25.0.qualifier"\r
+      version="1.25.1.qualifier"\r
       provider-name="VTT Technical Research Centre of Finland">\r
 \r
    <description>\r
@@ -669,4 +669,11 @@ This Agreement is governed by the laws of the State of New York and the intellec
          install-size="0"\r
          version="0.0.0"/>\r
 \r
+   <plugin\r
+         id="org.slf4j.api"\r
+         download-size="0"\r
+         install-size="0"\r
+         version="0.0.0"\r
+         unpack="false"/>\r
+\r
 </feature>\r
index 9a61e3cc056ed3188f20d65d87f5751c1e8f96fc..f935cf28ea12cca1d95be0f60c3364ef60b4f687 100644 (file)
         <version>1.0.0-SNAPSHOT</version>\r
     </parent>\r
 \r
+    <build>\r
+      <plugins>\r
+        <plugin>\r
+          <groupId>org.eclipse.tycho.extras</groupId>\r
+          <artifactId>tycho-source-feature-plugin</artifactId>\r
+          <version>${tycho.extras.version}</version>\r
+          <executions>\r
+            <execution>\r
+              <id>source-feature</id>\r
+              <phase>package</phase>\r
+              <goals>\r
+                <goal>source-feature</goal>\r
+              </goals>\r
+              <configuration>\r
+                <excludes>\r
+                  <!-- ID of the non-source bundle(s) to exclude from the generated source feature -->\r
+                  <plugin id="com.famfamfam.silk"/>\r
+                  <plugin id="javax.vecmath"/>\r
+                  <plugin id="org.apache.poi.ooxml-schemas"/>\r
+\r
+                  <plugin id="org.eclipse.core.filesystem.aix.ppc"/>\r
+                  <plugin id="org.eclipse.core.filesystem.aix.ppc64"/>\r
+                  <plugin id="org.eclipse.core.filesystem.hpux.ia64"/>\r
+                  <plugin id="org.eclipse.core.filesystem.linux.x86"/>\r
+                  <plugin id="org.eclipse.core.filesystem.linux.x86_64"/>\r
+                  <plugin id="org.eclipse.core.filesystem.linux.ppc"/>\r
+                  <plugin id="org.eclipse.core.filesystem.linux.ppc64"/>\r
+                  <plugin id="org.eclipse.core.filesystem.linux.ppc64le"/>\r
+                  <plugin id="org.eclipse.core.filesystem.macosx"/>\r
+                  <plugin id="org.eclipse.core.filesystem.solaris.sparc"/>\r
+                  <plugin id="org.eclipse.core.filesystem.win32.x86"/>\r
+                  <plugin id="org.eclipse.core.filesystem.win32.x86_64"/>\r
+                  <plugin id="org.eclipse.core.net.linux.x86"/>\r
+                  <plugin id="org.eclipse.core.net.linux.x86_64"/>\r
+                  <plugin id="org.eclipse.core.net.win32.x86"/>\r
+                  <plugin id="org.eclipse.core.net.win32.x86_64"/>\r
+                  <plugin id="org.eclipse.core.resources.win32.x86"/>\r
+                  <plugin id="org.eclipse.core.resources.win32.x86_64"/>\r
+                  <plugin id="javax.xml"/>\r
+                  <plugin id="org.sat4j.core"/>\r
+                  <plugin id="org.sat4j.pb"/>\r
+                  <plugin id="org.eclipse.mylyn.wikitext.core"/>\r
+                  <plugin id="org.eclipse.mylyn.wikitext.core.ant"/>\r
+                  <plugin id="org.eclipse.mylyn.wikitext.core.osgi"/>\r
+                  <plugin id="org.eclipse.mylyn.wikitext.mediawiki.core"/>\r
+                  <plugin id="org.eclipse.mylyn.wikitext.mediawiki.ui"/>\r
+                  <plugin id="org.eclipse.mylyn.wikitext.ui"/>\r
+\r
+                  <feature id="org.eclipse.ecf.core.feature"/>\r
+                  <feature id="org.eclipse.ecf.core.ssl.feature"/>\r
+                  <feature id="org.eclipse.ecf.filetransfer.feature"/>\r
+                  <feature id="org.eclipse.ecf.filetransfer.ssl.feature"/>\r
+                  <feature id="org.eclipse.ecf.filetransfer.httpclient4.feature"/>\r
+                  <feature id="org.eclipse.ecf.filetransfer.httpclient4.ssl.feature"/>\r
+                  <feature id="org.eclipse.emf.common"/>\r
+                  <feature id="org.eclipse.emf.ecore"/>\r
+                  <feature id="org.eclipse.epp.mpc"/>\r
+                  <feature id="org.eclipse.equinox.p2.discovery.feature"/>\r
+                  <feature id="org.eclipse.equinox.executable"/>\r
+                </excludes>\r
+              </configuration>\r
+            </execution>\r
+          </executions>\r
+        </plugin>\r
+        <plugin>\r
+          <groupId>org.eclipse.tycho</groupId>\r
+          <artifactId>tycho-p2-plugin</artifactId>\r
+          <version>${tycho.version}</version>\r
+          <executions>\r
+            <execution>\r
+              <id>attach-p2-metadata</id>\r
+              <phase>package</phase>\r
+              <goals>\r
+                <goal>p2-metadata</goal>\r
+              </goals>\r
+            </execution>\r
+          </executions>\r
+        </plugin>\r
+      </plugins>\r
+    </build>\r
+    \r
     <modules>\r
         <module>com.lowagie.text.feature</module>\r
         <module>org.apache.lucene4.feature</module>\r
+        <module>org.jfree.feature</module>\r
         <module>org.simantics.browsing.ui.feature</module>\r
         <module>org.simantics.charts.feature</module>\r
         <module>org.simantics.data.feature</module>\r
         <module>org.simantics.wiki.ui.feature</module>\r
         <module>org.simantics.workbench.feature</module>\r
     </modules>\r
-</project>
\ No newline at end of file
+</project>\r
diff --git a/releng/org.simantics.sdk.build.p2.site/README.md b/releng/org.simantics.sdk.build.p2.site/README.md
new file mode 100644 (file)
index 0000000..8114468
--- /dev/null
@@ -0,0 +1 @@
+Run mvn p2:site to build the P2 repository of the external components listed in pom.xml.
\ No newline at end of file
index 2890fb24ab9287ed8a7cae3e8c270b813de0e94f..4e17e37653c0c5186996357becc7062c054ce683 100644 (file)
@@ -6,10 +6,12 @@
     <groupId>org.simantics</groupId>\r
     <artifactId>org.simantics.sdk.build.p2.site</artifactId>\r
     <packaging>pom</packaging>\r
-    <version>1.24.0</version>\r
+    <version>1.25.0</version>\r
 \r
     <properties>\r
+        <itext.version.actual>2.1.7.b1</itext.version.actual>\r
         <lucene.version>4.9.0</lucene.version>\r
+        <lucene.version.actual>4.9.0.b0003</lucene.version.actual>\r
         <lucene.prefix>org.apache.lucene4</lucene.prefix>\r
     </properties>\r
 \r
                                     <source>true</source>\r
                                     <instructions>\r
                                         <Bundle-SymbolicName>${lucene.prefix}.core</Bundle-SymbolicName>\r
+                                        <Bundle-Version>${lucene.version.actual}</Bundle-Version>\r
+                                        <Export-Package>*;version="${lucene.version}"</Export-Package>\r
                                     </instructions>\r
                                 </artifact>\r
                                 <artifact>\r
                                     <source>true</source>\r
                                     <instructions>\r
                                         <Bundle-SymbolicName>${lucene.prefix}.queries</Bundle-SymbolicName>\r
+                                        <Bundle-Version>${lucene.version.actual}</Bundle-Version>\r
+                                        <Require-Bundle>${lucene.prefix}.core;bundle-version="${lucene.version}"</Require-Bundle>\r
+                                        <Export-Package>*;version="${lucene.version}"</Export-Package>\r
+                                        <Import-Package>!org.apache.lucene.*,*;resolution:=optional</Import-Package>\r
                                     </instructions>\r
                                 </artifact>\r
                                 <artifact>\r
                                     <source>true</source>\r
                                     <instructions>\r
                                         <Bundle-SymbolicName>${lucene.prefix}.sandbox</Bundle-SymbolicName>\r
+                                        <Bundle-Version>${lucene.version.actual}</Bundle-Version>\r
+                                        <Require-Bundle>${lucene.prefix}.core;bundle-version="${lucene.version}"</Require-Bundle>\r
+                                        <Export-Package>*;version="${lucene.version}"</Export-Package>\r
+                                        <Import-Package>!org.apache.lucene.*,*;resolution:=optional</Import-Package>\r
                                     </instructions>\r
                                 </artifact>\r
                                 <artifact>\r
-                                    <id>org.apache.lucene:lucene-queryparser:${lucene.version}</id>\r
+                                    <id>org.apache.lucene:lucene-analyzers-common:${lucene.version}</id>\r
                                     <source>true</source>\r
                                     <instructions>\r
-                                        <Bundle-SymbolicName>${lucene.prefix}.queryparser</Bundle-SymbolicName>\r
+                                        <Bundle-SymbolicName>${lucene.prefix}.analyzers-common</Bundle-SymbolicName>\r
+                                        <Bundle-Version>${lucene.version.actual}</Bundle-Version>\r
+                                        <Require-Bundle>${lucene.prefix}.core;bundle-version="${lucene.version}"</Require-Bundle>\r
+                                        <Export-Package>*;version="${lucene.version}"</Export-Package>\r
+                                        <Import-Package>!org.apache.lucene.*,*;resolution:=optional</Import-Package>\r
                                     </instructions>\r
                                 </artifact>\r
                                 <artifact>\r
-                                    <id>org.apache.lucene:lucene-analyzers-common:${lucene.version}</id>\r
+                                    <id>org.apache.lucene:lucene-queryparser:${lucene.version}</id>\r
                                     <source>true</source>\r
                                     <instructions>\r
-                                        <Bundle-SymbolicName>${lucene.prefix}.analyzers-common</Bundle-SymbolicName>\r
+                                        <Bundle-SymbolicName>${lucene.prefix}.queryparser</Bundle-SymbolicName>\r
+                                        <Bundle-Version>${lucene.version.actual}</Bundle-Version>\r
+                                        <Require-Bundle>${lucene.prefix}.core;bundle-version="${lucene.version}",${lucene.prefix}.queries;bundle-version="${lucene.version}",${lucene.prefix}.sandbox;bundle-version="${lucene.version}"</Require-Bundle>\r
+                                        <Export-Package>*;version="${lucene.version}"</Export-Package>\r
+                                        <Import-Package>!org.apache.lucene.*,*;resolution:=optional</Import-Package>\r
                                     </instructions>\r
                                 </artifact>\r
                                 <artifact>\r
                                     <id>org.apache.pdfbox:fontbox:2.0.2</id>\r
                                     <source>true</source>\r
                                 </artifact>\r
+                                <artifact>\r
+                                    <id>org.apache.pdfbox:xmpbox:2.0.2</id>\r
+                                    <source>true</source>\r
+                                </artifact>\r
                                 <artifact>\r
                                     <id>log4j:log4j:1.2.17</id>\r
                                     <source>true</source>\r
                                 </artifact>\r
                                 <artifact>\r
                                     <id>org.eclipse.collections:eclipse-collections-api:7.1.0</id>\r
+                                    <override>true</override>\r
                                     <source>true</source>\r
+                                    <instructions>\r
+                                        <Export-Package>org.eclipse.collections.*</Export-Package>\r
+                                    </instructions>\r
                                 </artifact>\r
                                 <artifact>\r
                                     <id>org.eclipse.collections:eclipse-collections:7.1.0</id>\r
                                     <source>true</source>\r
                                     <instructions>\r
                                         <Bundle-SymbolicName>com.lowagie.text</Bundle-SymbolicName>\r
+                                        <Bundle-Version>${itext.version.actual}</Bundle-Version>\r
                                     </instructions>\r
                                 </artifact>\r
                                 <artifact>\r
                                     <id>org.mozilla:rhino:1.7.7.1</id>\r
                                     <source>true</source>\r
                                 </artifact>\r
+                                <artifact>\r
+                                    <id>net.java.dev.jna:jna:4.2.2</id>\r
+                                    <source>true</source>\r
+                                </artifact>\r
+                                <artifact>\r
+                                    <id>net.java.dev.jna:jna-platform:4.2.2</id>\r
+                                    <source>true</source>\r
+                                </artifact>\r
                             </artifacts>\r
                         </configuration>\r
                     </execution>\r
                     </webApp>\r
                 </configuration>\r
             </plugin>\r
-\r
         </plugins>\r
     </build>\r
 \r
         </pluginRepository>\r
     </pluginRepositories>\r
 \r
-</project>
\ No newline at end of file
+</project>\r
index 3f8417100daf19a4b0250c0230a9e568391a9a0b..34bfa95c2f088ef40d5d6dcd23662ebc9e7c0006 100644 (file)
@@ -16,7 +16,7 @@
 <unit id="org.objectweb.asm.tree.source" version="5.0.1.v201404251740"/>\r
 <unit id="org.objectweb.asm.analysis" version="5.0.1.v201505121915"/>\r
 <unit id="org.objectweb.asm.tree" version="5.0.1.v201404251740"/>\r
-<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20160221192158/repository/"/>\r
+<repository location="http://www.simantics.org/update/tools/orbit/downloads/drops/R20160221192158/repository/"/>\r
 </location>\r
 <location includeAllPlatforms="true" includeConfigurePhase="false" includeMode="slicer" includeSource="true" type="InstallableUnit">\r
 <unit id="org.eclipse.mylyn.wikitext_feature.feature.group" version="2.7.0.v20151015-1452"/>\r
@@ -75,9 +75,9 @@
 <repository location="http://www.simantics.org/update/nebula/Q22016/release/"/>\r
 </location>\r
 <location includeAllPlatforms="true" includeConfigurePhase="false" includeMode="slicer" includeSource="true" type="InstallableUnit">\r
-<unit id="org.apache.lucene4.queries" version="4.9.0"/>\r
+<unit id="org.apache.lucene4.queries" version="4.9.0.b0003"/>\r
 <unit id="org.apache.commons.lang.source" version="2.6.0"/>\r
-<unit id="org.apache.lucene4.sandbox.source" version="4.9.0"/>\r
+<unit id="org.apache.lucene4.sandbox.source" version="4.9.0.b0003"/>\r
 <unit id="org.antlr.runtime.source" version="3.5.2"/>\r
 <unit id="org.apache.commons.compress" version="1.12.0"/>\r
 <unit id="org.apache.pdfbox.source" version="2.0.2"/>\r
 <unit id="org.eclipse.collections.eclipse-collections.source" version="7.1.0"/>\r
 <unit id="freemarker" version="2.3.23.stable"/>\r
 <unit id="com.github.virtuald.curvesapi.source" version="1.3.0"/>\r
-<unit id="org.apache.lucene4.analyzers-common" version="4.9.0"/>\r
+<unit id="org.apache.lucene4.analyzers-common" version="4.9.0.b0003"/>\r
 <unit id="org.apache.commons.collections.source" version="3.2.2"/>\r
 <unit id="org.apache.pdfbox.fontbox" version="2.0.2"/>\r
 <unit id="org.apache.commons.compress.source" version="1.12.0"/>\r
 <unit id="org.mozilla.rhino.source" version="1.7.7.1"/>\r
-<unit id="org.apache.lucene4.queries.source" version="4.9.0"/>\r
+<unit id="org.apache.lucene4.queries.source" version="4.9.0.b0003"/>\r
 <unit id="freemarker.source" version="2.3.23.stable"/>\r
 <unit id="jakarta-regexp" version="1.4.0"/>\r
 <unit id="net.jcip.annotations.source" version="1.0.0"/>\r
 <unit id="org.apache.log4j.source" version="1.2.17"/>\r
-<unit id="org.apache.lucene4.sandbox" version="4.9.0"/>\r
+<unit id="org.apache.lucene4.sandbox" version="4.9.0.b0003"/>\r
 <unit id="org.apache.commons.logging.source" version="1.2.0"/>\r
 <unit id="org.apache.commons.io.source" version="1.4.0"/>\r
-<unit id="org.apache.lucene4.core" version="4.9.0"/>\r
+<unit id="org.apache.lucene4.core" version="4.9.0.b0003"/>\r
 <unit id="com.healthmarketscience.jackcess" version="2.1.3"/>\r
 <unit id="org.bouncycastle.bctsp-jdk14.source" version="1.38.0"/>\r
 <unit id="org.eclipse.collections.eclipse-collections-api" version="7.1.0"/>\r
 <unit id="org.bouncycastle.bcprov-jdk14.source" version="1.38.0"/>\r
 <unit id="stax.api" version="1.0.1"/>\r
 <unit id="org.apache.pdfbox.fontbox.source" version="2.0.2"/>\r
-<unit id="org.apache.lucene4.analyzers-common.source" version="4.9.0"/>\r
+<unit id="org.apache.lucene4.analyzers-common.source" version="4.9.0.b0003"/>\r
 <unit id="it.unimi.dsi.fastutil" version="7.0.12"/>\r
 <unit id="net.jcip.annotations" version="1.0.0"/>\r
 <unit id="org.bouncycastle.bctsp-jdk14" version="1.38.0"/>\r
 <unit id="org.jfree.jchart.source" version="1.0.19"/>\r
-<unit id="org.apache.lucene4.queryparser" version="4.9.0"/>\r
+<unit id="org.apache.lucene4.queryparser" version="4.9.0.b0003"/>\r
 <unit id="org.apache.poi.ooxml-schemas" version="3.14.0"/>\r
 <unit id="org.bouncycastle.bcprov-jdk14" version="1.38.0"/>\r
 <unit id="org.apache.poi" version="3.14.0"/>\r
 <unit id="org.apache.commons.lang" version="2.6.0"/>\r
 <unit id="org.jfree.jchart" version="1.0.19"/>\r
 <unit id="org.apache.commons.codec.source" version="1.10.0"/>\r
-<unit id="com.lowagie.text.source" version="2.1.7"/>\r
+<unit id="com.lowagie.text.source" version="2.1.7.b1"/>\r
 <unit id="org.supercsv.source" version="2.4.0"/>\r
 <unit id="com.github.virtuald.curvesapi" version="1.3.0"/>\r
 <unit id="org.eclipse.collections.eclipse-collections" version="7.1.0"/>\r
 <unit id="org.apache.log4j" version="1.2.17"/>\r
-<unit id="com.lowagie.text" version="2.1.7"/>\r
+<unit id="com.lowagie.text" version="2.1.7.b1"/>\r
 <unit id="org.apache.poi.ooxml" version="3.14.0"/>\r
 <unit id="org.apache.pdfbox" version="2.0.2"/>\r
 <unit id="org.bouncycastle.bcmail-jdk14" version="1.38.0"/>\r
 <unit id="javax.vecmath" version="1.5.2"/>\r
 <unit id="bouncycastle.bcprov-jdk14" version="138.0.0"/>\r
 <unit id="org.ini4j.source" version="0.5.4"/>\r
-<unit id="org.apache.lucene4.core.source" version="4.9.0"/>\r
-<unit id="org.apache.lucene4.queryparser.source" version="4.9.0"/>\r
-<repository location="http://www.simantics.org/update/external-components/master"/>\r
+<unit id="org.apache.lucene4.core.source" version="4.9.0.b0003"/>\r
+<unit id="org.apache.lucene4.queryparser.source" version="4.9.0.b0003"/>\r
+<repository location="http://www.simantics.org/download/master/external-components"/>\r
 </location>\r
 <location includeAllPlatforms="true" includeConfigurePhase="false" includeMode="slicer" includeSource="true" type="InstallableUnit">\r
-<unit id="org.eclipse.e4.tools.spies.feature.feature.group" version="0.17.0.v20160520-1109"/>\r
-<repository location="http://download.eclipse.org/e4/snapshots/org.eclipse.e4.tools/latest/"/>\r
+<unit id="org.eclipse.e4.tools.spies.feature.feature.group" version="0.17.0.v20160811-1516"/>\r
+<repository location="http://www.simantics.org/update/e4/snapshots/org.eclipse.e4.tools/latest/"/>\r
 </location>\r
 <location includeAllPlatforms="true" includeConfigurePhase="false" includeMode="slicer" includeSource="true" type="InstallableUnit">\r
 <unit id="org.eclipse.nebula.incubation.feature.feature.group" version="1.0.0.201605182147"/>\r
 <unit id="org.eclipse.nebula.widgets.nattable.extension.e4.feature.feature.group" version="1.0.0.201606011907"/>\r
 <unit id="org.eclipse.nebula.widgets.nattable.extension.nebula.source.feature.feature.group" version="1.0.0.201606011907"/>\r
 <unit id="org.eclipse.nebula.widgets.nattable.extension.poi.source.feature.feature.group" version="1.4.0.201606011907"/>\r
-<repository location="http://download.eclipse.org/nattable/releases/1.4.0/repository/"/>\r
+<repository location="http://www.simantics.org/update/nebula/nattable/releases/1.4.0/repository/"/>\r
 </location>\r
 </locations>\r
 </target>\r
index 647e31cb5865d9192f64a78f82e66683954467c8..f97fc75744c111369b30c66e56b15480f8637a5c 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>\r
 <site>\r
-   <feature url="features/org.simantics.sdk_1.24.0.jar" id="org.simantics.sdk" version="1.24.0">\r
+   <feature url="features/org.simantics.sdk_1.25.0.jar" id="org.simantics.sdk" version="1.25.0">\r
       <category name="org.simantics.target"/>\r
    </feature>\r
    <category-def name="org.simantics.target" label="Simantics Target">\r
index c25ad3ee7649da860e902bd318637dfef19767ab..5731d5fd6f3f183a6c4e1f2d8d0cb535b4d1629c 100644 (file)
@@ -2,7 +2,7 @@
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
        <modelVersion>4.0.0</modelVersion>\r
        <artifactId>org.simantics.sdk.repository</artifactId>\r
-       <version>1.24.0-SNAPSHOT</version>\r
+       <version>1.25.0-SNAPSHOT</version>\r
        <packaging>eclipse-repository</packaging>\r
 \r
        <parent>\r
@@ -69,4 +69,4 @@
                        </plugins>\r
                </pluginManagement>\r
        </build>\r
-</project>
\ No newline at end of file
+</project>\r
index 53b07f5e9fe325d7c1dbd2c7a2e1851a1fade2d4..81bfafa92f0f5fb1aa94929aebfaeddfbd217b3f 100644 (file)
@@ -9,6 +9,7 @@
 \r
        <properties>\r
                <tycho.version>0.25.0</tycho.version>\r
+               <tycho.extras.version>0.25.0</tycho.extras.version>\r
                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\r
                <mars-repo.url>http://download.eclipse.org/releases/mars</mars-repo.url>\r
        </properties>\r
@@ -44,6 +45,7 @@
                                                </artifact>\r
                                        </target>\r
                                        <environments>\r
+<!--\r
                                                <environment>\r
                                                        <os>linux</os>\r
                                                        <ws>gtk</ws>\r
@@ -54,6 +56,7 @@
                                                        <ws>gtk</ws>\r
                                                        <arch>x86_64</arch>\r
                                                </environment>\r
+-->\r
                                                <environment>\r
                                                        <os>win32</os>\r
                                                        <ws>win32</ws>\r
                                                        <ws>win32</ws>\r
                                                        <arch>x86_64</arch>\r
                                                </environment>\r
+<!--\r
                                                <environment>\r
                                                        <os>macosx</os>\r
                                                        <ws>cocoa</ws>\r
                                                        <arch>x86_64</arch>\r
                                                </environment>\r
+-->\r
                                        </environments>\r
                                </configuration>\r
                        </plugin>\r
                </plugins>\r
        </build>\r
-</project>
\ No newline at end of file
+</project>\r