blob: 03290277a7b644cef587500281a0aa2d704e9e84 [file] [log] [blame]
/*
* Copyright (c) 2006, 2010 Borland Software Corporation and others
*
* 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/2009/GenModel'»
«DEFINE Main FOR gmfgen::GenDiagram
«EXPAND xpt::Common::copyright FOR editorGen
package «editPartsPackageName»;
«EXPAND xpt::Common::generatedClassComment»
public class «editPartClassName» «EXPAND extendsList» «EXPAND implementsList» {
«EXPAND attributes
«EXPAND impl::diagram::editparts::DiagramEditPart::_constructor
«EXPAND createDefaultEditPolicies
«EXPAND impl::diagram::editparts::DiagramEditPart::createFigure
«IF getAllNodes()->exists(n | n.labels->exists(not oclIsKindOf(gmfgen::GenExternalNodeLabel))) /*iow, NodeLabelEditPart template (GenNodeLabel target) will require this EditPolicy*/
«EXPAND impl::diagram::editparts::NodeLabelEditPart::nodeLabelDragPolicyClass»
«ENDIF
«IF links->exists(labels->notEmpty())-»
«EXPAND impl::diagram::editparts::LinkLabelEditPart::linkLabelDragPolicyClass»
«ENDIF
«EXPAND additions
}
«ENDDEFINE»
«DEFINE extendsList FOR gmfgen::GenDiagram»extends org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart«ENDDEFINE»
«DEFINE implementsList FOR gmfgen::GenDiagram»«ENDDEFINE»
«DEFINE attributes FOR gmfgen::GenDiagram
«EXPAND xpt::Common::generatedMemberComment»
public final static String MODEL_ID = "«editorGen.modelID»"; «EXPAND xpt::Common::nonNLS»
«EXPAND xpt::diagram::editparts::Common::visualIDConstant FOR self
«ENDDEFINE»
«DEFINE createDefaultEditPolicies FOR gmfgen::GenDiagram
«EXPAND xpt::Common::generatedMemberComment»
protected void createDefaultEditPolicies() {
«EXPAND impl::diagram::editparts::DiagramEditPart::createDefaultEditPoliciesBody
}
«ENDDEFINE»
«DEFINE additions FOR gmfgen::GenDiagram»«ENDDEFINE»