]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.modeling/src/org/simantics/modeling/PropertyVariables.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.modeling / src / org / simantics / modeling / PropertyVariables.java
diff --git a/bundles/org.simantics.modeling/src/org/simantics/modeling/PropertyVariables.java b/bundles/org.simantics.modeling/src/org/simantics/modeling/PropertyVariables.java
new file mode 100644 (file)
index 0000000..464227d
--- /dev/null
@@ -0,0 +1,60 @@
+package org.simantics.modeling;\r
+\r
+import org.simantics.db.ReadGraph;\r
+import org.simantics.db.exception.DatabaseException;\r
+import org.simantics.db.layer0.variable.Variable;\r
+import org.simantics.utils.datastructures.hints.IHintContext;\r
+\r
+/**\r
+ * TODO: the IHintContext is just a nasty vimpautus to provide data to the\r
+ * monitor drop participant\r
+ * \r
+ * A property variable must have at least a visualized part,\r
+ * {@link #getModificationVariable()} may return null.\r
+ */\r
+public interface PropertyVariables extends IHintContext {\r
+\r
+    /**\r
+     * @return the container of the property\r
+     */\r
+    Variable getContainer();\r
+\r
+    /**\r
+     * @return the configuration space variable for the property\r
+     */\r
+    Variable getConfiguration();\r
+\r
+    /**\r
+     * @return the variable to read labeling/other visualisation information\r
+     *         from\r
+     */\r
+    Variable getVisualVariable();\r
+\r
+    /**\r
+     * @return the variable into which to write modifications to this property\r
+     */\r
+    Variable getModificationVariable();\r
+\r
+    /**\r
+     * @return\r
+     */\r
+    String getSuffix();\r
+\r
+    /**\r
+     * To support indexing.\r
+     * \r
+     * @param suffix\r
+     * @return\r
+     */\r
+    PropertyVariables withSuffix(String suffix);\r
+\r
+    /**\r
+     * @return a new instance where {@link #getVisualVariable()} and\r
+     *         {@link #getModificationVariable()} are both browsed with a suffix\r
+     *         attached to this property variable. {@link #getContainer()}\r
+     *         returns the same value. If this instance has no suffix, this will\r
+     *         be returned.\r
+     */\r
+    PropertyVariables resolved(ReadGraph graph) throws DatabaseException;\r
+\r
+}\r