diff options
Diffstat (limited to 'plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.codegen.xtend/xtend/impl/preferences/CustomPage.xtend')
-rw-r--r-- | plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.codegen.xtend/xtend/impl/preferences/CustomPage.xtend | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.codegen.xtend/xtend/impl/preferences/CustomPage.xtend b/plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.codegen.xtend/xtend/impl/preferences/CustomPage.xtend index 5716c0c6f44..05c8623e7ba 100644 --- a/plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.codegen.xtend/xtend/impl/preferences/CustomPage.xtend +++ b/plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.codegen.xtend/xtend/impl/preferences/CustomPage.xtend @@ -12,6 +12,7 @@ * Artem Tikhomirov (Borland) - initial API and implementation * Michael Golubev (Montages) - #386838 - migrate to Xtend2 * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Bug 569174 + * Etienne Allogo (ARTAL) - etienne.allogo@artal.fr - Bug 569174 : L1.2 clean up *****************************************************************************/ package impl.preferences @@ -42,22 +43,21 @@ import xpt.Common def Main(GenCustomPreferencePage it) ''' «copyright(it.diagram.editorGen)» package «packageName(it)»; - + «generatedClassComment» public class «className(it)» «extendsList(it)» «implementsList(it)» { - + «FOR pref : preferences» «constant(pref)» «ENDFOR» - + «generatedMemberComment» public «className(it)»() { setPreferenceStore(«diagram.editorGen.plugin.activatorQualifiedClassName».getInstance().getPreferenceStore()); } - + «methods(it)» «initDefaultsMethod(it)» - «additions(it)» } ''' @@ -65,8 +65,6 @@ import xpt.Common def implementsList(GenCustomPreferencePage it) '''«/* no-op */»''' - def additions(GenCustomPreferencePage it) '''''' - /** * [artem]: the reason I didn't split this template up into two distinct, addFieldsMethod and initHelpMethod, is that * using super class other than oe.gmf...AbstractPreferencePage may require implementation of completely different @@ -78,7 +76,7 @@ import xpt.Common // TODO Provide method implementation throw new UnsupportedOperationException(); } - + «generatedMemberComment» protected void initHelp() { // TODO implement this method if needed, or leave as no-op @@ -88,11 +86,11 @@ import xpt.Common def initDefaultsMethod(GenCustomPreferencePage it) ''' «generatedMemberComment» public static void initDefaults(org.eclipse.jface.preference.IPreferenceStore store) { - «IF it.preferences.empty || it.preferences.exists[p|p.defaultValue == null]» + «IF it.preferences.empty || it.preferences.exists[p|p.defaultValue === null]» // TODO this code is invoked during preference store initialization, please fill // the store passed with default preference values. «ENDIF» - «FOR pref : it.preferences.filter[p|p.defaultValue != null]» + «FOR pref : it.preferences.filter[p|p.defaultValue !== null]» «setDefaultValue(pref, 'store')» «ENDFOR» } |