Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2010-03-05 15:19:21 -0500
committeratikhomirov2010-03-05 15:19:21 -0500
commitafa8bfc8c693ab215577b347c562036a0615a743 (patch)
tree96381ba8d8cbd867c9ebed764964601a9e0d34e0 /plugins/org.eclipse.gmf.codegen/models/gmfgen.emf
parenta2616105b5ccda4a978b2a17fb98ec47caf92f80 (diff)
downloadorg.eclipse.gmf-tooling-afa8bfc8c693ab215577b347c562036a0615a743.tar.gz
org.eclipse.gmf-tooling-afa8bfc8c693ab215577b347c562036a0615a743.tar.xz
org.eclipse.gmf-tooling-afa8bfc8c693ab215577b347c562036a0615a743.zip
[138179] Allow to define labels based on attributes of referenced objects - script/expression-backed labels
Diffstat (limited to 'plugins/org.eclipse.gmf.codegen/models/gmfgen.emf')
-rw-r--r--plugins/org.eclipse.gmf.codegen/models/gmfgen.emf17
1 files changed, 17 insertions, 0 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/models/gmfgen.emf b/plugins/org.eclipse.gmf.codegen/models/gmfgen.emf
index f8da46e3b..8ccb8316d 100644
--- a/plugins/org.eclipse.gmf.codegen/models/gmfgen.emf
+++ b/plugins/org.eclipse.gmf.codegen/models/gmfgen.emf
@@ -845,6 +845,16 @@ enum LabelTextAccessMethod {
class DesignLabelModelFacet extends LabelModelFacet {
}
+@genmodel(documentation="Model facet of a label calculated with an expression")
+class ExpressionLabelModelFacet extends LabelModelFacet {
+ @genmodel(documentation="Expression to calculate user-readable label value")
+ ref ValueExpression[1] viewExpression;
+ @genmodel(documentation="Optional expression to represent value for editing")
+ ref ValueExpression[?] editExpression;
+ @genmodel(documentation="Optional expression to answer whether user input is ok for further parsing")
+ ref GenConstraint[?] validateExpression;
+}
+
/////////////
// View Facet
/////////////
@@ -1578,6 +1588,13 @@ class PredefinedParser extends GenParserImplementation {
op String getQualifiedClassName();
}
+@genmodel(documentation="")
+class ExpressionLabelParser extends GenParserImplementation {
+ @genmodel(documentation="Provides means to alter name of parser implementation class")
+ attr String[?] className;
+ op String getQualifiedClassName();
+}
+
@genmodel(documentation="Handwritten or otherwise available IParser implementation")
class CustomParser extends GenParserImplementation {
attr String[1] qualifiedName;

Back to the top