]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.modeling/src/org/simantics/modeling/PropertyVariables.java
Layer0Utils.addL0Identifier to prevent possible differentiation of code
[simantics/platform.git] / bundles / org.simantics.modeling / src / org / simantics / modeling / PropertyVariables.java
1 package org.simantics.modeling;
2
3 import org.simantics.db.ReadGraph;
4 import org.simantics.db.exception.DatabaseException;
5 import org.simantics.db.layer0.variable.Variable;
6 import org.simantics.utils.datastructures.hints.IHintContext;
7
8 /**
9  * TODO: the IHintContext is just a nasty vimpautus to provide data to the
10  * monitor drop participant
11  * 
12  * A property variable must have at least a visualized part,
13  * {@link #getModificationVariable()} may return null.
14  */
15 public interface PropertyVariables extends IHintContext {
16
17     /**
18      * @return the container of the property
19      */
20     Variable getContainer();
21
22     /**
23      * @return the configuration space variable for the property
24      */
25     Variable getConfiguration();
26
27     /**
28      * @return the variable to read labeling/other visualisation information
29      *         from
30      */
31     Variable getVisualVariable();
32
33     /**
34      * @return the variable into which to write modifications to this property
35      */
36     Variable getModificationVariable();
37
38     /**
39      * @return
40      */
41     String getSuffix();
42
43     /**
44      * To support indexing.
45      * 
46      * @param suffix
47      * @return
48      */
49     PropertyVariables withSuffix(String suffix);
50
51     /**
52      * @return a new instance where {@link #getVisualVariable()} and
53      *         {@link #getModificationVariable()} are both browsed with a suffix
54      *         attached to this property variable. {@link #getContainer()}
55      *         returns the same value. If this instance has no suffix, this will
56      *         be returned.
57      */
58     PropertyVariables resolved(ReadGraph graph) throws DatabaseException;
59
60 }