Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptessier2010-05-20 15:16:21 +0000
committerptessier2010-05-20 15:16:21 +0000
commitbe278956c7a1291acdc1c9a6e7169665862528dd (patch)
treeeeb948fdd13ba2da945584b40d7e627f8592801c /plugins/developer/org.eclipse.papyrus.def
parent4620fde4c86e69ab821fdf7c15c9c98948c1e2bb (diff)
downloadorg.eclipse.papyrus-be278956c7a1291acdc1c9a6e7169665862528dd.tar.gz
org.eclipse.papyrus-be278956c7a1291acdc1c9a6e7169665862528dd.tar.xz
org.eclipse.papyrus-be278956c7a1291acdc1c9a6e7169665862528dd.zip
fixe mistake on preferences page initialization
Diffstat (limited to 'plugins/developer/org.eclipse.papyrus.def')
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/aspects/impl/diagram/editparts/NodeEditPart.xpt19
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/aspects/impl/preferences/StandardPage.xpt25
2 files changed, 40 insertions, 4 deletions
diff --git a/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/aspects/impl/diagram/editparts/NodeEditPart.xpt b/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/aspects/impl/diagram/editparts/NodeEditPart.xpt
index 485cfb08043..7267ef2c274 100644
--- a/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/aspects/impl/diagram/editparts/NodeEditPart.xpt
+++ b/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/aspects/impl/diagram/editparts/NodeEditPart.xpt
@@ -104,7 +104,19 @@ new org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolic
«ENDAROUND»
-
+«AROUND createNodePlate FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ protected org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure createNodePlate() {
+ String prefElementId="«elementType.displayName»";
+ org.eclipse.jface.preference.IPreferenceStore store =«getDiagram().editorGen.plugin.getActivatorQualifiedClassName()».getInstance().getPreferenceStore();
+ String preferrenceContantWitdh=org.eclipse.papyrus.diagram.common.helper.PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, org.eclipse.papyrus.preferences.utils.PreferenceConstantHelper.WIDTH);
+ String preferrenceContantHeight=org.eclipse.papyrus.diagram.common.helper.PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, org.eclipse.papyrus.preferences.utils.PreferenceConstantHelper.HEIGHT);
+ org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure result = new org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure(store.getInt(preferrenceContantWitdh), store.getInt(preferrenceContantWitdh));
+
+ «EXPAND setupNodePlate-»
+ return result;
+ }
+«ENDAROUND»
«AROUND borderItemSelectionEditPolicy FOR gmfgen::GenNode-»
«IF hasBorderItems(self)-»
org.eclipse.gmf.runtime.notation.View childView = (org.eclipse.gmf.runtime.notation.View) child.getModel();
@@ -265,4 +277,9 @@ if(«self.triggeringCondition»){
«ENDIF-»
«ENDDEFINE»
+«DEFINE setupNodePlate FOR gmfgen::GenNode»«ENDDEFINE»
+«DEFINE setupNodePlate FOR gmfgen::GenChildSideAffixedNode»
+ //FIXME: workaround for #154536
+ result.getBounds().setSize(result.getPreferredSize());
+«ENDDEFINE»
diff --git a/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/aspects/impl/preferences/StandardPage.xpt b/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/aspects/impl/preferences/StandardPage.xpt
index 443c4d0b519..6be928a1f3b 100644
--- a/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/aspects/impl/preferences/StandardPage.xpt
+++ b/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/aspects/impl/preferences/StandardPage.xpt
@@ -13,11 +13,26 @@
«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
«REM»DOCUMENTATION: PapyrusGencode«ENDREM»
-«REM»change onlu the superclass «ENDREM»
+«REM»change the superclass and the initialization «ENDREM»
+«DEFINE Main FOR gmfgen::GenStandardPreferencePage-»
+«EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
+package «getDiagram().preferencesPackageName»;
+«EXPAND xpt::Common::generatedClassComment»
+public class «getClassName()»«EXPAND extendsList»«EXPAND implementsList» {
-«AROUND extendsList FOR gmfgen::GenStandardPreferencePage-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ public «getClassName()»() {
+ setPreferenceStore(«getDiagram().editorGen.plugin.getActivatorQualifiedClassName()».getInstance().getPreferenceStore());
+ «IF gmfgen::StandardPreferencePages::General = kind-»
+ setPreferenceKey(«getDiagram().editPartsPackageName».«getDiagram().editPartClassName».MODEL_ID);
+ «ENDIF»
+ }
+}
+«ENDDEFINE»
+
+«DEFINE extendsList FOR gmfgen::GenStandardPreferencePage-»
«IF gmfgen::StandardPreferencePages::General = kind-»
extends org.eclipse.papyrus.preferences.pages.DiagramPreferencePage«-»
«ELSEIF gmfgen::StandardPreferencePages::Appearance = kind-»
@@ -29,5 +44,9 @@
«ELSEIF gmfgen::StandardPreferencePages::RulersAndGrid = kind-»
extends org.eclipse.gmf.runtime.diagram.ui.preferences.RulerGridPreferencePage«-»
«ENDIF-»
-«ENDAROUND»
+«ENDDEFINE»
+
+«DEFINE implementsList FOR gmfgen::GenStandardPreferencePage»«REM»no-op«ENDREM»«ENDDEFINE»
+
+«DEFINE call_initDefaults(storeVarName : String) FOR gmfgen::GenStandardPreferencePage»«IF kind <> gmfgen::StandardPreferencePages::Pathmaps»«getQualifiedClassName()».initDefaults(«storeVarName»);«ENDIF»«ENDDEFINE»

Back to the top