From aa17bb8943cbbfcbd417e7db883fa499fecb6943 Mon Sep 17 00:00:00 2001 From: miettinen Date: Thu, 16 Apr 2015 11:17:20 +0000 Subject: [PATCH] Disable unit validation from enumerations in Sysdyn (refs #5772). git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@31180 ac1ea38d-2e2b-0410-8846-a27921b304fc --- .../org/simantics/sysdyn/ui/validation/UnitFunction.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 118bfaae..259fb6d6 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 @@ -45,7 +45,9 @@ 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) && !graph.isInstanceOf(component, SR.Cloud)) + if(graph.isInstanceOf(component, SR.Variable) + && !graph.isInstanceOf(component, SR.Cloud) + && !graph.isInstanceOf(component, SR.Enumeration)) return variableValidator(graph, component); else if(graph.isInstanceOf(component, SR.Module)) return moduleValidator(graph, component); @@ -178,7 +180,7 @@ public class UnitFunction { Layer0 L0 = Layer0.getInstance(graph); Resource configuration = graph.getPossibleObject(variable, L0.PartOf); if(configuration == null) - return "Error, No Confiugration"; + return "Error, No Configuration"; SysdynModelManager smm = SysdynModelManager.getInstance(graph.getSession()); -- 2.47.1