blob: 46edc8fff6d4e67f6d9038c6a248957a2c9b888c [file] [log] [blame]
/*
* Copyright (c) 2006, 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:
* Dmitry Stadnik (Borland) - initial API and implementation
* Alexander Shatalin (Borland) - initial API and implementation
*/
«IMPORT "http://www.eclipse.org/gmf/2008/GenModel"»
«EXTENSION xpt::diagram::ViewmapAttributesUtils»
«DEFINE initializer FOR gmfgen::GenLinkLabel
«EXPAND xpt::Common::generatedMemberComment»
static {
registerSnapBackPositionEXPAND xpt::editor::VisualIDRegistry::getTypeMethodCall FOR getDiagram()»(«EXPAND xpt::editor::VisualIDRegistry::visualID»),
new org.eclipse.draw2d.geometry.PointlabelOffsetX(viewmap, 0)», «labelOffsetY(viewmap, 0)»));
}
«ENDDEFINE»
«DEFINE constructor FOR gmfgen::GenLinkLabel
«EXPAND xpt::Common::generatedMemberComment»
public «editPartClassName»(org.eclipse.gmf.runtime.notation.View view) {
super(view);
}
«ENDDEFINE»
«DEFINE createDefaultEditPoliciesBody FOR gmfgen::GenLinkLabel
super.createDefaultEditPolicies();
installEditPolicy(org.eclipse.gef.EditPolicy.DIRECT_EDIT_ROLE, new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy());
«EXPAND xpt::diagram::editparts::Common::behaviour FOR this
«ENDDEFINE»
«DEFINE getKeyPoint FOR gmfgen::GenLinkLabel
«EXPAND xpt::Common::generatedMemberComment»
public int getKeyPoint() {
return org.eclipse.draw2d.ConnectionLocatoralignment»;
}
«ENDDEFINE»
«DEFINE handleNotificationEventBody FOR gmfgen::GenLinkLabel
Object feature = event.getFeature();
«EXPAND xpt::diagram::editparts::Common::handleText FOR this
super.handleNotificationEvent(event);
«ENDDEFINE»