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