422
|
1 |
/*
|
|
2 |
* Copyright (c) 2007 Borland Software Corporation
|
|
3 |
*
|
|
4 |
* All rights reserved. This program and the accompanying materials
|
|
5 |
* are made available under the terms of the Eclipse Public License v1.0
|
|
6 |
* which accompanies this distribution, and is available at
|
|
7 |
* http://www.eclipse.org/legal/epl-v10.html
|
|
8 |
*
|
|
9 |
* Contributors:
|
|
10 |
* bblajer (Borland) - initial API and implementation
|
|
11 |
*/
|
|
12 |
|
|
13 |
«IMPORT "http://www.eclipse.org/gmf/2008/GenModel"»
|
|
14 |
«IMPORT "http://www.eclipse.org/emf/2002/Ecore"»
|
|
15 |
«IMPORT "http://www.eclipse.org/emf/2002/GenModel"»
|
|
16 |
«EXTENSION xpt::GenModelUtils»
|
|
17 |
|
|
18 |
«DEFINE createEditingDomain FOR gmfgen::GenEditorGenerator»org.eclipse.emf.workspace.WorkspaceEditingDomainFactory.INSTANCE.createEditingDomain()«ENDDEFINE»
|
|
19 |
|
|
20 |
«DEFINE wizardDialogSettings(String wizardVarName, String sectionName) FOR gmfgen::GenDiagram-»
|
|
21 |
org.eclipse.jface.dialogs.IDialogSettings pluginDialogSettings = «editorGen.plugin.getActivatorQualifiedClassName()».getInstance().getDialogSettings();
|
|
22 |
org.eclipse.jface.dialogs.IDialogSettings wizardDialogSettings = pluginDialogSettings.getSection("«sectionName»"); «EXPAND xpt::Common::nonNLS»
|
|
23 |
if (wizardDialogSettings == null) {
|
|
24 |
wizardDialogSettings = pluginDialogSettings.addNewSection("«sectionName»"); «EXPAND xpt::Common::nonNLS»
|
|
25 |
}
|
|
26 |
«wizardVarName».setDialogSettings(wizardDialogSettings);
|
|
27 |
«ENDDEFINE»
|
|
28 |
|
|
29 |
«DEFINE setDefaultShellSize(String shellVar) FOR gmfgen::GenDiagram-»
|
|
30 |
«shellVar».setSize(Math.max(500, «shellVar».getSize().x), 500);
|
|
31 |
«ENDDEFINE»
|
|
32 |
|