carbidecpp22devenv/plugins/org.eclipse.gmf.templates.legacy_1.0.0.v20090614-0839/codegen.lite.templates/xpt/editor/Common.xpt
author cawthron
Fri, 04 Dec 2009 11:06:59 -0600
changeset 422 033392511bf7
permissions -rw-r--r--
add files for RCL_2_2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
422
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
     1
/*
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
     2
 * Copyright (c) 2007 Borland Software Corporation
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
     3
 * 
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
     4
 * All rights reserved. This program and the accompanying materials
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
     5
 * are made available under the terms of the Eclipse Public License v1.0
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
     6
 * which accompanies this distribution, and is available at
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
     7
 * http://www.eclipse.org/legal/epl-v10.html
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
     8
 *
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
     9
 * Contributors:
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    10
 *    bblajer (Borland) - initial API and implementation
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    11
 */
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    12
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    13
«IMPORT "http://www.eclipse.org/gmf/2008/GenModel"»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    14
«IMPORT "http://www.eclipse.org/emf/2002/Ecore"»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    15
«IMPORT "http://www.eclipse.org/emf/2002/GenModel"»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    16
«EXTENSION xpt::GenModelUtils»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    17
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    18
«DEFINE createEditingDomain FOR gmfgen::GenEditorGenerator»org.eclipse.emf.workspace.WorkspaceEditingDomainFactory.INSTANCE.createEditingDomain()«ENDDEFINE»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    19
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    20
«DEFINE wizardDialogSettings(String wizardVarName, String sectionName) FOR gmfgen::GenDiagram-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    21
org.eclipse.jface.dialogs.IDialogSettings pluginDialogSettings = «editorGen.plugin.getActivatorQualifiedClassName()».getInstance().getDialogSettings();
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    22
org.eclipse.jface.dialogs.IDialogSettings wizardDialogSettings = pluginDialogSettings.getSection("«sectionName»"); «EXPAND xpt::Common::nonNLS»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    23
if (wizardDialogSettings == null) {
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    24
	wizardDialogSettings = pluginDialogSettings.addNewSection("«sectionName»"); «EXPAND xpt::Common::nonNLS»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    25
}
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    26
«wizardVarName».setDialogSettings(wizardDialogSettings);
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    27
«ENDDEFINE»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    28
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    29
«DEFINE setDefaultShellSize(String shellVar) FOR gmfgen::GenDiagram-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    30
«shellVar».setSize(Math.max(500, «shellVar».getSize().x), 500);
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    31
«ENDDEFINE»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    32