X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.diagram%2Fsrc%2Forg%2Fsimantics%2Fdiagram%2Fui%2FDiagramModelHints.java;h=84a25f2de4654eb489bed7460f8a5e1cd8f91c2a;hp=e410edb2a46f1e7b8fa28a06e3658573ac1361ec;hb=55d1e6f63df516019032ebf0c1e9c8c0495a619d;hpb=ceff53434e48f94c5d84ce12f3b1e21cabda457b diff --git a/bundles/org.simantics.diagram/src/org/simantics/diagram/ui/DiagramModelHints.java b/bundles/org.simantics.diagram/src/org/simantics/diagram/ui/DiagramModelHints.java index e410edb2a..84a25f2de 100644 --- a/bundles/org.simantics.diagram/src/org/simantics/diagram/ui/DiagramModelHints.java +++ b/bundles/org.simantics.diagram/src/org/simantics/diagram/ui/DiagramModelHints.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2010 Association for Decentralized Information Management + * Copyright (c) 2007, 2019 Association for Decentralized Information Management * in Industry THTH ry. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -8,9 +8,12 @@ * * Contributors: * VTT Technical Research Centre of Finland - initial API and implementation + * Semantum Oy - gitlab #399 *******************************************************************************/ package org.simantics.diagram.ui; +import java.util.Set; + import org.simantics.db.Resource; import org.simantics.db.UndoContext; import org.simantics.db.common.ResourceArray; @@ -40,6 +43,29 @@ public class DiagramModelHints { public static final Key KEY_DIAGRAM_RESOURCE_ARRAY = new KeyOf(ResourceArray.class, "DIAGRAM_RESOURCE_ARRAY"); + /** + * Holds a value of Set which should contain the type {@link Resource} + * URIs of all the types of the diagram resource. This allows doing + * type-checking for the diagram based on pure string instead of having to do + * database transactions to check types. + */ + public static final Key KEY_DIAGRAM_RESOURCE_TYPE_URIS = new KeyOf(Set.class, "DIAGRAM_RESOURCE_TYPE_URIS"); + + /** + * Holds a value of Set which should contain the type {@link Resource} + * URIs of all the types of the composite resource mapped to the diagram + * resource. This allows doing type-checking for the diagram based on pure + * string instead of having to do database transactions to check types. + */ + public static final Key KEY_MAPPED_COMPOSITE_RESOURCE_TYPE_URIS = new KeyOf(Set.class, "MAPPED_DIAGRAM_COMPOSITE_RESOURCE_TYPE_URIS"); + + /** + * Set to the object value if the current diagram editor has a single + * statement/object for the {@link ModelingResources#URIs#HasDiagramSource} + * relation. + */ + public static final Key KEY_HAS_DIAGRAM_SOURCE = new KeyOf(Resource.class, "MOD.HasDiagramSource"); + /** * A hint for defining and extra pass for loading/initializing an element * after the current pass. It is possible to request for infinitely many