Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/TextAware.xpt')
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/TextAware.xpt18
1 files changed, 9 insertions, 9 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/TextAware.xpt b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/TextAware.xpt
index d8e1674f8..a5f5279a7 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/TextAware.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/TextAware.xpt
@@ -109,7 +109,7 @@
«EXPAND getOclTracker-»
«ENDIF-»
-«IF isOclChoiceLabel()-»
+«IF isOclChoiceLabel() or isViewExpressionDefiedAndOcl()-»
«EXPAND getOclRegistrator-»
«ENDIF-»
«ENDDEFINE»
@@ -507,19 +507,17 @@
«DEFINE addSemanticListeners FOR gmfgen::GenCommonBase-»
«EXPAND xpt::Common::generatedMemberComment»
protected void addSemanticListeners() {
-«IF isOclChoiceLabel()-»
- «IF isOclChoiceLabelWithShowExpr()-»
+«IF isOclChoiceLabel() or isViewExpressionDefiedAndOcl()-»
+ «IF isOclChoiceLabelWithShowExpr() or isViewExpressionDefiedAndOcl()-»
org.eclipse.gmf.tooling.runtime.ocl.tracker.OclTracker tracker = getTracker();
tracker.initialize(resolveSemanticElement());
tracker.installListeners(getEditingDomain(), this, getOclRegistrator());
«ELSE-»
super.addSemanticListeners();
«ENDIF-»
- ((org.eclipse.gmf.tooling.runtime.parsers.OclChoiceParser) getParser()).installListeners(this, getOclRegistrator());
-«ELSEIF isViewExpressionDefiedAndOcl()-»
- «getActiveOclPackageName()».common.OclTracker tracker = getTracker();
- tracker.initialize(resolveSemanticElement());
- tracker.installListeners(getEditingDomain(), this, getOclRegistrator());
+ «IF isOclChoiceLabel()-»
+ ((org.eclipse.gmf.tooling.runtime.parsers.OclChoiceParser) getParser()).installListeners(this, getOclRegistrator());
+ «ENDIF-»
«ELSE-»
if (getParser() instanceof org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser) {
org.eclipse.emf.ecore.EObject element = resolveSemanticElement();
@@ -538,8 +536,10 @@
«EXPAND xpt::Common::generatedMemberComment»
protected void removeSemanticListeners() {
«IF isOclChoiceLabel() or isViewExpressionDefiedAndOcl()-»
+ «IF isOclChoiceLabel()-»
((org.eclipse.gmf.tooling.runtime.parsers.OclChoiceParser) getParser()).uninstallListeners();
- «IF isOclChoiceLabelWithShowExpr()-»
+ «ENDIF-»
+ «IF isOclChoiceLabelWithShowExpr() or isViewExpressionDefiedAndOcl()-»
getTracker().uninstallListeners();
«ELSE-»
super.removeSemanticListeners();

Back to the top