Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorashatalin2008-12-29 07:41:38 -0500
committerashatalin2008-12-29 07:41:38 -0500
commitfc1dfb3b462e159eec1b6031bb41ab79c762474b (patch)
tree66acb7873f68640147106dcd919a5041ecbc918b /plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/application/i18n.qvto
parent7f3bb1960b122d5d9c4edae8dc1c330032c9cf60 (diff)
downloadorg.eclipse.gmf-tooling-fc1dfb3b462e159eec1b6031bb41ab79c762474b.tar.gz
org.eclipse.gmf-tooling-fc1dfb3b462e159eec1b6031bb41ab79c762474b.tar.xz
org.eclipse.gmf-tooling-fc1dfb3b462e159eec1b6031bb41ab79c762474b.zip
QVTO-based xpand implementation was merged to HEAD
Diffstat (limited to 'plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/application/i18n.qvto')
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/application/i18n.qvto63
1 files changed, 63 insertions, 0 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/application/i18n.qvto b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/application/i18n.qvto
new file mode 100644
index 000000000..db283db08
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/application/i18n.qvto
@@ -0,0 +1,63 @@
+modeltype genModel uses "http://www.eclipse.org/gmf/2008/GenModel";
+
+library i18n;
+
+helper i18nKeyForDefaultFileEditorErrorDialog(app : genModel::GenApplication) : String {
+ return app.actionBarAdvisorClassName + '.DefaultFileEditor'
+}
+
+helper i18nKeyForDefaultEditorOpenErrorDialog(app : genModel::GenApplication) : String {
+ return app.actionBarAdvisorClassName + '.DefaultEditorOpenError'
+}
+
+helper i18nKeyForWindowTitle(app : genModel::GenApplication) : String {
+ return app.workbenchWindowAdvisorClassName + '.Title'
+}
+
+helper i18nKeyForAboutDialog(app : genModel::GenApplication) : String {
+ return app.actionBarAdvisorClassName + '.AboutDialog'
+}
+
+helper titleKey(dialogKey : String) : String {
+ return dialogKey + 'Title'
+}
+
+helper messageKey(dialogKey : String) : String {
+ return dialogKey + 'Message'
+}
+
+helper i18nKeyForMenu(menuManager : genModel::GenMenuManager) : String {
+ return 'ApplicationMenuName.' + menuManager.name
+}
+
+helper collectGenMenuManagers(allItems : Collection(genModel::GenContributionItem)) : Sequence(genModel::GenMenuManager) {
+ return (collectAllContributionItems(allItems))[genModel::GenMenuManager]
+}
+
+helper collectAllContributionItems(allItems : Collection(genModel::GenContributionItem)) : Sequence(genModel::GenContributionManager) {
+ return let managers = (allItems->collect(it | it))[genModel::GenContributionManager]->asSequence() in managers->union(managers->collect(item | collectAllContributionItems(item.items))->flatten())
+}
+
+helper i18nKeyForNewFileWizardFileLabel(app : genModel::GenApplication) : String {
+ return wizardNewFileCreationPageClassName(app) + '.FileLabel'
+}
+
+helper i18nKeyForNewFileWizardBrowseButton(app : genModel::GenApplication) : String {
+ return wizardNewFileCreationPageClassName(app) + '.BrowseButton'
+}
+
+helper i18nKeyForNewFileWizardSelectDialog(app : genModel::GenApplication) : String {
+ return wizardNewFileCreationPageClassName(app) + '.SelectNewFileDialog'
+}
+
+helper i18nKeyForNewFileWizardEmpty(app : genModel::GenApplication) : String {
+ return wizardNewFileCreationPageClassName(app) + '.EmptyFileNameError'
+}
+
+helper i18nKeyForNewFileWizardInvalid(app : genModel::GenApplication) : String {
+ return wizardNewFileCreationPageClassName(app) + '.InvalidFileNameError'
+}
+
+helper wizardNewFileCreationPageClassName(app : genModel::GenApplication) : String {
+ return 'WizardNewFileCreationPage'
+}

Back to the top