From: lempinen Date: Thu, 6 Jun 2013 06:15:24 +0000 (+0000) Subject: Do not display unit warnings for clouds (fixes #4307) X-Git-Tag: 1.8.1~303 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=3f8bbed9456a71b9c57b79918d079c060143c178;p=simantics%2Fsysdyn.git Do not display unit warnings for clouds (fixes #4307) git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@27507 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/validation/UnitFunction.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/validation/UnitFunction.java index 3e7d30fb..24e3c80c 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/validation/UnitFunction.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/validation/UnitFunction.java @@ -42,7 +42,7 @@ public class UnitFunction { @SCLValue(type = "ReadGraph -> Resource -> [Issue]") public static List unitValidator(ReadGraph graph, Resource component) throws DatabaseException { SysdynResource SR = SysdynResource.getInstance(graph); - if(graph.isInstanceOf(component, SR.Variable)) + if(graph.isInstanceOf(component, SR.Variable) && !graph.isInstanceOf(component, SR.Cloud)) return variableValidator(graph, component); else if(graph.isInstanceOf(component, SR.Module)) return moduleValidator(graph, component); @@ -255,7 +255,7 @@ public class UnitFunction { for(Resource connection : graph.getObjects(r, SR.Variable_isTailOf)) { Resource head = graph.getPossibleObject(connection, SR.Variable_HasHead); - if(graph.isInstanceOf(head, SR.Module)) { + if(head != null && graph.isInstanceOf(head, SR.Module)) { components.add(head); } }