]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Added property SEL.hidden that is tested in VariablePropertyRule 37/137/2
authorAntti Villberg <antti.villberg@semantum.fi>
Wed, 9 Nov 2016 10:02:47 +0000 (12:02 +0200)
committerAntti Villberg <antti.villberg@semantum.fi>
Wed, 9 Nov 2016 10:05:03 +0000 (12:05 +0200)
refs #6798

Change-Id: I0a23da64589abef202a3ac3ee9a5ee2210703b01

bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/viewpoint/VariablePropertyRule.java
bundles/org.simantics.selectionview.ontology/graph.tg
bundles/org.simantics.selectionview.ontology/graph/Selectionview.pgraph
bundles/org.simantics.selectionview.ontology/src/org/simantics/selectionview/SelectionViewResources.java

index 76ec9b919b73a82bf4d7aad785a2bf6a711b6ee9..0323cfad4ece25174d560676b7840c67a4899419 100644 (file)
@@ -76,6 +76,9 @@ public class VariablePropertyRule implements ChildRule {
                \r
            if (isUnder(graph, L0, SEL, property, propertiesPredicates)) continue props;\r
            \r
+           Boolean hidden = property.getPossiblePropertyValue(graph, SEL.hidden, Bindings.BOOLEAN);\r
+           if(hidden != null && hidden) continue props;\r
+           \r
                for(String req : requiredProperties) if(property.getPossibleProperty(graph, req) == null) continue props;\r
 \r
                for(String req : filteredProperties) if(property.getName(graph).equals(req)) continue props;\r
index 757158d3bf4087c45981b5ebc2ddcf5d58127e0e..49a3f113fe75e9b05e284fbbc135154403e939a8 100644 (file)
Binary files a/bundles/org.simantics.selectionview.ontology/graph.tg and b/bundles/org.simantics.selectionview.ontology/graph.tg differ
index f9eb00666c472b36e1a18c0be974a1178e095677..8905c6252b17685e34b4857ebe21bc46662d7189 100644 (file)
@@ -99,6 +99,8 @@ SEL.SortingName ==> "String" <R L0.HasProperty : L0.FunctionalRelation
 
 SEL.canBeLifted ==> "Boolean" <R L0.HasProperty : L0.FunctionalRelation
 
+SEL.hidden ==> "Boolean" <R L0.HasProperty : L0.FunctionalRelation
+
 SEL.GenericParameterType <T L0.FunctionalRelation
   @L0.assert SEL.HasDisplayProperty
     _ : SEL.DisplayProperty
index 00d59a68618fd061ba780afe8df9f0e0c5c0c105..c497214d7c80bbe7285a6fd57af736e9d1915bd8 100644 (file)
@@ -97,6 +97,8 @@ public class SelectionViewResources {
     public final Resource canBeLifted_Inverse;\r
     public final Resource getSpecialCategory;\r
     public final Resource getSpecialCategory_Inverse;\r
+    public final Resource hidden;\r
+    public final Resource hidden_Inverse;\r
         \r
     public static class URIs {\r
         public static final String AbstractResourceTabContribution = "http://www.simantics.org/SelectionView-1.2/AbstractResourceTabContribution";\r
@@ -186,6 +188,8 @@ public class SelectionViewResources {
         public static final String canBeLifted_Inverse = "http://www.simantics.org/SelectionView-1.2/canBeLifted/Inverse";\r
         public static final String getSpecialCategory = "http://www.simantics.org/SelectionView-1.2/getSpecialCategory";\r
         public static final String getSpecialCategory_Inverse = "http://www.simantics.org/SelectionView-1.2/getSpecialCategory/Inverse";\r
+        public static final String hidden = "http://www.simantics.org/SelectionView-1.2/hidden";\r
+        public static final String hidden_Inverse = "http://www.simantics.org/SelectionView-1.2/hidden/Inverse";\r
     }\r
     \r
     public static Resource getResourceOrNull(ReadGraph graph, String uri) {\r
@@ -285,6 +289,8 @@ public class SelectionViewResources {
         canBeLifted_Inverse = getResourceOrNull(graph, URIs.canBeLifted_Inverse);\r
         getSpecialCategory = getResourceOrNull(graph, URIs.getSpecialCategory);\r
         getSpecialCategory_Inverse = getResourceOrNull(graph, URIs.getSpecialCategory_Inverse);\r
+        hidden = getResourceOrNull(graph, URIs.hidden);\r
+        hidden_Inverse = getResourceOrNull(graph, URIs.hidden_Inverse);\r
     }\r
     \r
     public static SelectionViewResources getInstance(ReadGraph graph) {\r