X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.district.network.ui%2Fsrc%2Forg%2Fsimantics%2Fdistrict%2Fnetwork%2Fui%2Ffunction%2FFunctions.java;h=14c75030e019d7598bc2e8b08db82302b8af38c1;hb=27f0f6dd22d6826ae85ea89b1916d17ca9f83c41;hp=cc05a173b739e2b6d33fe5b823e3f1fa513c236b;hpb=426a4ef58cf0b7e755a9111881800806f1374d59;p=simantics%2Fdistrict.git diff --git a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/function/Functions.java b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/function/Functions.java index cc05a173..14c75030 100644 --- a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/function/Functions.java +++ b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/function/Functions.java @@ -510,52 +510,13 @@ public class Functions { private static List listInstanceNames(ReadGraph graph, Variable context, Resource type) throws DatabaseException { Resource indexRoot = Variables.getIndexRoot(graph, context); DistrictNetworkResource DN = DistrictNetworkResource.getInstance(graph); - List properties = QueryIndexUtils.searchByType(graph, indexRoot, DN.Vertex_ScaleProperty); + List properties = Collections.emptyList();//QueryIndexUtils.searchByType(graph, indexRoot, DN.Vertex_ScaleProperty); return properties.stream() .map(m -> createEnumeratedValue(graph, m)) .map(EnumeratedValue::getName) .collect(Collectors.toList()); } - @SCLValue(type = "ReadGraph -> Resource -> Variable -> b") - public static Object edgeThicknessPropertyEnumerationValues(ReadGraph graph, Resource resource, Variable context) throws DatabaseException { - DistrictNetworkResource DN = DistrictNetworkResource.getInstance(graph); - return listInstanceNames(graph, context, DN.Edge_ThicknessProperty); - } - - @SCLValue(type = "ReadGraph -> Resource -> Variable -> b") - public static Object arrowLengthPropertyEnumerationValues(ReadGraph graph, Resource resource, Variable context) throws DatabaseException { - DistrictNetworkResource DN = DistrictNetworkResource.getInstance(graph); - return listInstanceNames(graph, context, DN.Edge_ArrowLengthProperty); - } - - @SCLValue(type = "ReadGraph -> Resource -> Variable -> b") - public static Object nodeScalePropertyEnumerationValues(ReadGraph graph, Resource resource, Variable context) throws DatabaseException { - DistrictNetworkResource DN = DistrictNetworkResource.getInstance(graph); - return listInstanceNames(graph, context, DN.Vertex_ScaleProperty); - } - - @SCLValue(type = "ReadGraph -> Resource -> Variable -> b") - public static Object edgeThicknessPropertyModifier(ReadGraph graph, Resource resource, Variable context) throws DatabaseException { - Resource diagram = resolveElement(graph, context); - DistrictNetworkResource DN = DistrictNetworkResource.getInstance(graph); - return baseMappingModifier(graph, diagram, DN.Diagram_edgeThicknessProperty, DN.Edge_ThicknessProperty, context); - } - - @SCLValue(type = "ReadGraph -> Resource -> Variable -> b") - public static Object arrowLengthPropertyModifier(ReadGraph graph, Resource resource, Variable context) throws DatabaseException { - Resource diagram = resolveElement(graph, context); - DistrictNetworkResource DN = DistrictNetworkResource.getInstance(graph); - return baseMappingModifier(graph, diagram, DN.Diagram_arrowLengthProperty, DN.Edge_ArrowLengthProperty, context); - } - - @SCLValue(type = "ReadGraph -> Resource -> Variable -> b") - public static Object nodeScalePropertyModifier(ReadGraph graph, Resource resource, Variable context) throws DatabaseException { - Resource diagram = resolveElement(graph, context); - DistrictNetworkResource DN = DistrictNetworkResource.getInstance(graph); - return baseMappingModifier(graph, diagram, DN.Diagram_nodeScaleProperty, DN.Vertex_ScaleProperty, context); - } - @SCLValue(type = "ReadGraph -> Resource -> Variable -> b") public static Function1 hasDiameterValue(ReadGraph graph, Resource resource, Variable context) throws DatabaseException { return directPropertyValueFunction(DistrictNetworkResource.getInstance(graph).Edge_HasDiameter, 0);