carbidecpp22devenv/plugins/org.eclipse.gmf.templates.legacy_1.0.0.v20090614-0839/codegen.lite.templates/xpt/editor/Common.xpt
/*
* Copyright (c) 2007 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* bblajer (Borland) - initial API and implementation
*/
«IMPORT "http://www.eclipse.org/gmf/2008/GenModel"»
«IMPORT "http://www.eclipse.org/emf/2002/Ecore"»
«IMPORT "http://www.eclipse.org/emf/2002/GenModel"»
«EXTENSION xpt::GenModelUtils»
«DEFINE createEditingDomain FOR gmfgen::GenEditorGenerator»org.eclipse.emf.workspace.WorkspaceEditingDomainFactory.INSTANCE.createEditingDomain()«ENDDEFINE»
«DEFINE wizardDialogSettings(String wizardVarName, String sectionName) FOR gmfgen::GenDiagram-»
org.eclipse.jface.dialogs.IDialogSettings pluginDialogSettings = «editorGen.plugin.getActivatorQualifiedClassName()».getInstance().getDialogSettings();
org.eclipse.jface.dialogs.IDialogSettings wizardDialogSettings = pluginDialogSettings.getSection("«sectionName»"); «EXPAND xpt::Common::nonNLS»
if (wizardDialogSettings == null) {
wizardDialogSettings = pluginDialogSettings.addNewSection("«sectionName»"); «EXPAND xpt::Common::nonNLS»
}
«wizardVarName».setDialogSettings(wizardDialogSettings);
«ENDDEFINE»
«DEFINE setDefaultShellSize(String shellVar) FOR gmfgen::GenDiagram-»
«shellVar».setSize(Math.max(500, «shellVar».getSize().x), 500);
«ENDDEFINE»