Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 3f6ad19ea0f1b71b62d2ceb8b3b31e144b9f655f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
 * 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/2006/GenModel"»
«IMPORT "http://www.eclipse.org/emf/2002/Ecore"»
«IMPORT "http://www.eclipse.org/emf/2002/GenModel"»
«EXTENSION xpt::diagram::parts::LabelController»

«DEFINE LinkLabelEditPart FOR gmfgen::GenLinkLabel-»
«EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
package «getDiagram().editPartsPackageName»;

«EXPAND xpt::Common::generatedClassComment»
public class «editPartClassName» «EXPAND supertypes» {
	«EXPAND xpt::diagram::parts::Common::visualIDConstant-»

	«EXPAND xpt::diagram::parts::Common::ctors-»
	«EXPAND xpt::diagram::parts::Common::declareViewCode-»
	«EXPAND createEditPolicies-»
	«EXPAND xpt::diagram::parts::refresh::refresher-»
	«EXPAND xpt::diagram::parts::requests::performRequest-»
	«EXPAND xpt::diagram::parts::LabelController::directEditManager-»
	«EXPAND xpt::diagram::parts::LabelController::performDirectEdit-»
	«EXPAND xpt::diagram::parts::LabelController::labelDisplayer-»
	«EXPAND xpt::diagram::parts::LabelController::labelText-»
	«EXPAND xpt::diagram::parts::LabelController::labelIcon-»
	«EXPAND xpt::diagram::parts::LabelController::labelFigure(this) FOR viewmap-»
	«EXPAND xpt::diagram::parts::LabelController::getUpdatableParent-»
	«EXPAND xpt::diagram::parts::Common::activate-»
	«EXPAND xpt::diagram::parts::Common::deactivate-»

	«EXPAND xpt::diagram::parts::Common::viewmap FOR viewmap-»
	«EXPAND additions-»
}
«ENDDEFINE»

«DEFINE supertypes FOR gmfgen::GenLinkLabel»extends org.eclipse.gef.editparts.AbstractGraphicalEditPart implements org.eclipse.gmf.runtime.lite.edit.parts.labels.ILabelController«ENDDEFINE»

«DEFINE createEditPolicies FOR gmfgen::GenLinkLabel-»
«EXPAND xpt::Common::generatedMemberComment»
protected void createEditPolicies() {
	installEditPolicy(org.eclipse.gef.EditPolicy.CONNECTION_ENDPOINTS_ROLE, new org.eclipse.gef.editpolicies.ConnectionEndpointEditPolicy() {
		public org.eclipse.gef.EditPart getHost() {
			return getUpdatableParent();
		}
	});
«IF !isReadOnly()-»
	installEditPolicy(org.eclipse.gef.EditPolicy.DIRECT_EDIT_ROLE, new org.eclipse.gmf.runtime.lite.edit.policies.LabelDirectEditPolicy());
«ENDIF-»
	«EXPAND xpt::diagram::parts::Common::behaviour-»
}
«ENDDEFINE»

«DEFINE additions FOR gmfgen::GenLinkLabel»«ENDDEFINE»

Back to the top