Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: db283db083a16f780f83b4b4cda015eefe55abde (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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