carbidecpp22devenv/plugins/org.eclipse.gmf.templates.legacy_1.0.0.v20090614-0839/codegen.templates/diagram/editparts/NodeEditPart.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) 2006, 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
 *    Dmitry Stadnik (Borland) - initial API and implementation
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    11
 *    Alexander Shatalin (Borland) - initial API and implementation
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    12
 */
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    13
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    14
«IMPORT "http://www.eclipse.org/gmf/2008/GenModel"»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    15
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    16
«DEFINE Main FOR gmfgen::GenNode-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    17
«EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    18
package «getDiagram().editPartsPackageName»;
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    19
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    20
«EXPAND xpt::Common::generatedClassComment»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    21
public class «editPartClassName» «EXPAND extendsList» «EXPAND implementsList» {
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    22
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    23
	«EXPAND attributes-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    24
	
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    25
	«EXPAND impl::diagram::editparts::NodeEditPart::constructor-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    26
	
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    27
	«EXPAND createDefaultEditPolicies-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    28
	
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    29
	«EXPAND impl::diagram::editparts::NodeEditPart::createLayoutEditPolicy-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    30
	
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    31
	«EXPAND impl::diagram::editparts::NodeEditPart::createNodeShape(this) FOR viewmap-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    32
	
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    33
	«EXPAND impl::diagram::editparts::NodeEditPart::addFixedChild-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    34
	
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    35
	«EXPAND impl::diagram::editparts::NodeEditPart::removeFixedChild-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    36
	
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    37
	«EXPAND impl::diagram::editparts::NodeEditPart::addChildVisual-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    38
	
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    39
	«EXPAND impl::diagram::editparts::NodeEditPart::removeChildVisual-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    40
	
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    41
	«EXPAND impl::diagram::editparts::NodeEditPart::getContentPaneFor-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    42
	
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    43
	«EXPAND impl::diagram::editparts::NodeEditPart::addBorderItem-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    44
	
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    45
	«EXPAND impl::diagram::editparts::NodeEditPart::createNodePlate-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    46
	
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    47
	«EXPAND impl::diagram::editparts::NodeEditPart::getPrimaryDragEditPolicy-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    48
	
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    49
	«EXPAND impl::diagram::editparts::NodeEditPart::createFigure-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    50
	
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    51
	«EXPAND impl::diagram::editparts::NodeEditPart::setupContentPane-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    52
	
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    53
	«EXPAND impl::diagram::editparts::NodeEditPart::getContentPane-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    54
	
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    55
	«EXPAND impl::diagram::editparts::NodeEditPart::getPrimaryChildEditPart-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    56
	
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    57
	«EXPAND handleNotificationEvent-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    58
	
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    59
	«EXPAND impl::diagram::editparts::NodeEditPart::innerClassDeclaration FOR viewmap-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    60
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    61
	«EXPAND additions-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    62
}
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    63
«ENDDEFINE»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    64
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    65
«DEFINE extendsList FOR gmfgen::GenNode»extends «EXPAND impl::diagram::editparts::NodeEditPart::extendsListContents»«ENDDEFINE»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    66
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    67
«DEFINE implementsList FOR gmfgen::GenNode»«ENDDEFINE»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    68
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    69
«DEFINE attributes FOR gmfgen::GenNode-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    70
	«EXPAND xpt::diagram::editparts::Common::visualIDConstant FOR this-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    71
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    72
	«EXPAND xpt::Common::generatedMemberComment»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    73
	protected org.eclipse.draw2d.IFigure contentPane;
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    74
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    75
	«EXPAND xpt::Common::generatedMemberComment»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    76
	protected org.eclipse.draw2d.IFigure primaryShape;
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    77
«ENDDEFINE»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    78
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    79
«DEFINE createDefaultEditPolicies FOR gmfgen::GenNode-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    80
	«EXPAND xpt::Common::generatedMemberComment»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    81
	protected void createDefaultEditPolicies() {
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    82
		«EXPAND impl::diagram::editparts::NodeEditPart::createDefaultEditPoliciesBody-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    83
	}
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    84
«ENDDEFINE»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    85
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    86
«DEFINE handleNotificationEvent FOR gmfgen::GenNode-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    87
«ENDDEFINE»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    88
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    89
«DEFINE handleNotificationEvent FOR gmfgen::GenTopLevelNode-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    90
	«REM»This code is important for refreshing shortcut decoration
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    91
	on adding corresponding annotation to the View instance.«ENDREM»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    92
	«IF getDiagram().generateShortcutIcon()-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    93
		«EXPAND xpt::Common::generatedMemberComment»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    94
		protected void handleNotificationEvent(org.eclipse.emf.common.notify.Notification event) {
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    95
			«EXPAND impl::diagram::editparts::NodeEditPart::handleNotificationEventBody-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    96
		}
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    97
	«ENDIF-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    98
«ENDDEFINE»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    99
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
   100
«DEFINE additions FOR gmfgen::GenNode-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
   101
«ENDDEFINE»