Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormgolubev2012-04-29 20:00:10 -0400
committermgolubev2012-04-29 20:00:10 -0400
commitdfb5bbe3a8c16775150ec82cd10725838c0a1654 (patch)
treeb6f1f048a37784c88396506013cb65cd782d2a39
parent84f31c8c41ba8c2c7ff613d08ed1a371319bda5d (diff)
downloadorg.eclipse.gmf-tooling-dfb5bbe3a8c16775150ec82cd10725838c0a1654.tar.gz
org.eclipse.gmf-tooling-dfb5bbe3a8c16775150ec82cd10725838c0a1654.tar.xz
org.eclipse.gmf-tooling-dfb5bbe3a8c16775150ec82cd10725838c0a1654.zip
[368398] - merged with [158116] with respect to OclTracker in
GFT-runtime as part of [158116]
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/TextAware.xpt18
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/parsers/expression.qvto4
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/parsers/ExpressionLabelParser.xpt8
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/VisualEffectEditPolicy.xpt19
4 files changed, 25 insertions, 24 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();
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/parsers/expression.qvto b/plugins/org.eclipse.gmf.codegen/templates/impl/parsers/expression.qvto
index 71904280b..7217c89e4 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/impl/parsers/expression.qvto
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/parsers/expression.qvto
@@ -10,10 +10,6 @@ helper gmfgen::GenParserImplementation::isViewExpressionDefinedAndOcl() : Boolea
return false;
}
-helper getActiveOclPackageName() : String {
- return 'org.eclipse.gmf.tooling.runtime.ocl.expressions';
-}
-
helper gmfgen::ExpressionLabelParser::isImpactAnalyzerKind() : Boolean {
return isImpactAnalyzerKind(self.viewExpression.body);
}
diff --git a/plugins/org.eclipse.gmf.codegen/templates/parsers/ExpressionLabelParser.xpt b/plugins/org.eclipse.gmf.codegen/templates/parsers/ExpressionLabelParser.xpt
index ddfbd57df..71e968c88 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/parsers/ExpressionLabelParser.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/parsers/ExpressionLabelParser.xpt
@@ -31,12 +31,8 @@ public class «self.getQualifiedClassName().xpandSplit('\\.')->last()»«EXPAND
«DEFINE additions FOR gmfgen::ExpressionLabelParser»«ENDDEFINE»
«DEFINE extendsList FOR gmfgen::ExpressionLabelParser»
- «IF isViewExpressionDefinedAndOcl()-»
- «IF isImpactAnalyzerKind()-»
- extends org.eclipse.gmf.tooling.runtime.ocl.parsers.ImpactAnalyzerParserBase
- «ELSE-»
- extends org.eclipse.gmf.tooling.runtime.ocl.parsers.ActiveOclParserBase
- «ENDIF-»
+ «IF isViewExpressionDefinedAndOcl()-»
+ extends org.eclipse.gmf.tooling.runtime.parsers.ExpressionLabelParserBase
«ENDIF-»
«ENDDEFINE»
«DEFINE implementsList FOR gmfgen::ExpressionLabelParser-»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/VisualEffectEditPolicy.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/VisualEffectEditPolicy.xpt
index dad7df8ef..a50919176 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/VisualEffectEditPolicy.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/VisualEffectEditPolicy.xpt
@@ -13,17 +13,15 @@
public class «EXPAND xpt::Common::disqualifiedClassName FOR getEditPolicyQualifiedClassName()»«EXPAND extendsList» {
«EXPAND fields-»
+
+ «EXPAND _constructor-»
«EXPAND methods-»
}
«ENDDEFINE»
«DEFINE extendsList FOR gmfgen::GenVisualEffect-»
- «IF isImpactAnalyzerKind(oclExpression)-»
- extends org.eclipse.gmf.tooling.runtime.ocl.edit.policies.ImpactAnalyzerVisualEffectEditPolicyBase
- «ELSE-»
- extends org.eclipse.gmf.tooling.runtime.ocl.edit.policies.ActiveOclVisualEffectEditPolicyBase
- «ENDIF-»
+ extends org.eclipse.gmf.tooling.runtime.edit.policies.effect.AbstractOclVisualEffectEditPolicy
«ENDDEFINE»
«DEFINE fields FOR gmfgen::GenVisualEffect-»
@@ -31,6 +29,17 @@ public class «EXPAND xpt::Common::disqualifiedClassName FOR getEditPolicyQualif
public static final String KEY = "«getEditPolicyQualifiedClassName()»:KEY";
«ENDDEFINE»
+«DEFINE _constructor FOR gmfgen::GenVisualEffect-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ public «EXPAND xpt::Common::disqualifiedClassName FOR getEditPolicyQualifiedClassName()»() {
+ «IF isImpactAnalyzerKind(oclExpression)-»
+ super(org.eclipse.gmf.tooling.runtime.ocl.tracker.OclTrackerFactory.Type.IMPACT_ANALYZER);
+ «ELSE-»
+ super();
+ «ENDIF-»
+ }
+«ENDDEFINE»
+
«DEFINE methods FOR gmfgen::GenVisualEffect-»
«EXPAND setVisualEffectValue-»

Back to the top