carbidecpp22devenv/plugins/org.eclipse.gmf.templates.legacy_1.0.0.v20090614-0839/codegen.lite.templates/xpt/commands/CommandUtils.ext
/*
* Copyright (c) 2007 Borland Software Corp.
*
* 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/emf/2002/Ecore";
import "http://www.eclipse.org/emf/2002/GenModel";
import "http://www.eclipse.org/gmf/2008/GenModel";
Collection[gmfgen::GenNode] getChildNodes(gmfgen::GenContainerBase parent) :
null
;
Collection[gmfgen::GenNode] getChildNodes(gmfgen::GenDiagram parent) :
parent.topLevelNodes
;
Collection[gmfgen::GenNode] getChildNodes(gmfgen::GenChildContainer parent) :
parent.childNodes
;
Collection[gmfgen::GenNode] getRelatedGenNodes(gmfgen::GenNode node) :
node.getDiagram().getRelatedGenNodes(node.getDomainMetaClass())
;
Collection[gmfgen::GenNode] getRelatedGenNodes(gmfgen::GenDiagram diagram, genmodel::GenClass nodeClass) :
diagram.getAllNodes().select(e| nodeClass.ecoreClass.isSuperTypeOf(e.getDomainMetaClass().ecoreClass))
;
Collection[gmfgen::GenNode] getRelatedChildLabelGenNodes(gmfgen::GenDiagram diagram, genmodel::GenClass nodeClass) :
getRelatedGenNodes(diagram, nodeClass).typeSelect(gmfgen::GenChildLabelNode)
;
String getCreateShortcutNodeCommandClassName(gmfgen::GenDiagram diagram) :
"CreateShortcutNodeCommand"
;
String getCreateShortcutNodeCommandQualifiedClassName(gmfgen::GenDiagram diagram) :
diagram.editCommandsPackageName + "." + diagram.getCreateShortcutNodeCommandClassName()
;
String getCreateShortcutEdgeCommandClassName(gmfgen::GenDiagram diagram) :
"CreateShortcutEdgeCommand"
;
String getCreateShortcutEdgeCommandQualifiedClassName(gmfgen::GenDiagram diagram) :
diagram.editCommandsPackageName + "." + diagram.getCreateShortcutEdgeCommandClassName()
;