]> gerrit.simantics Code Review - simantics/district.git/commitdiff
Amendment to 165a995bf446be802c4623b46706a257a5367c69
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Mon, 15 Jun 2020 10:49:10 +0000 (13:49 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Mon, 15 Jun 2020 10:54:27 +0000 (13:54 +0300)
gitlab #91

(cherry picked from commit 752dc5d524bc31567892121e3a37d14523109cc3)

org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/DistrictNetworkEdgeNode.java
org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/DistrictNetworkVertexNode.java
org.simantics.district.network.ui/src/org/simantics/district/network/ui/participants/DistrictFinderVisualisationParticipant.java
org.simantics.district.network/src/org/simantics/district/network/visualisations/triggers/VisualisationTrigger.java
org.simantics.district.network/src/org/simantics/district/network/visualisations/triggers/VisualisationTriggerComponent.java
org.simantics.district.network/src/org/simantics/district/network/visualisations/triggers/VisualisationTriggersContributions.java

index 270320284de8beadd47f221ed3e50724eeda2615..0e5f30222a6f72682640dd0e70b0ae769ff727de 100644 (file)
@@ -276,7 +276,6 @@ public class DistrictNetworkEdgeNode extends G2DParentNode implements ISelection
         this.eventColor = color;
     }
 
-    
     @PropertySetter(value = "arrowLength")
     public void setArrowLength(Double length) {
         // find if there is a child deferred arrow node
index 8742fa9219251c925ffb37e2556336a2e0745ddb..feb217b0ce8c9ac792d2ebc57acc435a7aa48fb4 100644 (file)
@@ -245,10 +245,10 @@ public class DistrictNetworkVertexNode extends G2DParentNode implements ISelecti
     }
 
     @PropertySetter(value = "eventColor")
-       public void setEventColor(Color colorr) {
-               this.eventColor = colorr;
-       }
-    
+    public void setEventColor(Color colorr) {
+       this.eventColor = colorr;
+    }
+
     @PropertySetter(value = "hidden")
     public void setHidden(Boolean value) {
         this.hidden = value;
index a88d7ba94d362ab8c4c752d9682e34f92c474df0..5eb3044498d56e16dc1790a4f2fbe978b4446ec2 100644 (file)
@@ -59,9 +59,9 @@ public class DistrictFinderVisualisationParticipant extends AbstractDiagramParti
             }
         });
         broker.subscribe(TOPIC2, event -> {
-               Tuple2 data = (Tuple2) event.getProperty(IEventBroker.DATA);
-               Resource resource = (Resource) data.c0;
-               Color colorr = (Color) data.c1;
+                Tuple2 data = (Tuple2) event.getProperty(IEventBroker.DATA);
+                Resource resource = (Resource) data.c0;
+                Color colorr = (Color) data.c1;
             IElement element = DiagramNodeUtil.findElement(ctx, resource);
             final G2DParentNode node = element.getHint(DistrictNetworkEdgeElement.KEY_DN_EDGE_NODE);
             if (node != null) {
index 7a9614e5d6c0061f11308c19da95fae96248f4df..f0953d190396f3547bcb3532177d1b4dcd925669 100644 (file)
@@ -27,11 +27,11 @@ public class VisualisationTrigger {
     public double getThreshold() {
         return threshold;
     }
-    
+
     public Color getColor() {
-               return color;
-       }
-    
+       return color;
+    }
+
     /**
      * 
      * @param colorStr e.g. "#FFFFFF"
index b18fede4557a5de55b7d8aecbe24ff9f762cd37b..6502fe9fe2d0bf3cc306e0dbc4ba8a2e717a375b 100644 (file)
@@ -16,8 +16,8 @@ public class VisualisationTriggerComponent {
     }
     
     public Resource getElement() {
-               return element;
-       }
+       return element;
+    }
 
     public ComponentBase<?> getComponent() {
         return component;
index 8120a973cee2d929c816997508b63d2b10de1ab3..1cab0bf9b6593781c25560951ae88e901b488ad3 100644 (file)
@@ -27,20 +27,20 @@ public class VisualisationTriggersContributions {
     private static final Logger LOGGER = LoggerFactory.getLogger(VisualisationTriggersContributions.class);
     private static final String VISUALISATIONS_TRIGGERS_MODULE = "VisualisationTriggers";
     private static final String VISUALISATION_TRIGGER_CONTRIBUTION = "visualisationTriggers";
-    
+
     public static Map<String, List<VisualisationTrigger>> visualisationTriggers(ReadGraph graph) throws DatabaseException {
         List<Resource> sharedOntologies = Simantics.applySCL("Simantics/SharedOntologies", "getSharedOntologies", graph, Tuple0.INSTANCE);
-        
+
         Map<String, List<VisualisationTrigger>> results = new HashMap<>();
         Layer0 L0 = Layer0.getInstance(graph);
-        
+
         Object oldGraph = SCLContext.getCurrent().get("graph");
         try {
             SCLContext.getCurrent().put("graph", graph);
             for (Resource sharedOntology : sharedOntologies) {
-                
+
                 Collection<Resource> userComponents = graph.syncRequest(new ObjectsWithSupertype(sharedOntology, Layer0.getInstance(graph).ConsistsOf, StructuralResource2.getInstance(graph).Component));
-                
+
                 for (Resource userComponent : userComponents) {
                     NamedResource moduleType = new NamedResource(NameLabelUtil.modalName(graph, userComponent), userComponent);
                     List<VisualisationTrigger> visualisationTriggerContributions = visualisationTriggerContribution(graph, moduleType);
@@ -53,7 +53,7 @@ public class VisualisationTriggersContributions {
         }
         return results;
     }
-    
+
     private static List<VisualisationTrigger> visualisationTriggerContribution(ReadGraph graph, NamedResource moduleType) throws DatabaseException {
         Layer0 L0 = Layer0.getInstance(graph);
         Resource sclModule = Layer0Utils.getPossibleChild(graph, moduleType.getResource(), L0.SCLModule, VISUALISATIONS_TRIGGERS_MODULE);