Skip to main content
blob: 675eda752632a726fbb502cc2d37d4e00e349a45 (plain) (tree)

 * Copyright (c) 2007, 2008 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
 * Contributors:
 *    Alexander Shatalin (Borland) - initial API and implementation
«EXTENSION xpt::GenModelUtils»

«DEFINE childContainerCreateCommand FOR Sequence(gmfgen::GenNode)-»
«IF not self->isEmpty()-»

	«EXPAND xpt::Common::generatedMemberComment»
	protected org.eclipse.gef.commands.Command getCreateCommand(org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest req) {
«FOREACH self AS n-»
		«EXPAND childNodeCreateCommand(n) FOR n.modelFacet-»
		return super.getCreateCommand(req);

«DEFINE childNodeCreateCommand(node : gmfgen::GenNode) FOR gmfgen::TypeModelFacet-»
if («EXPAND xpt::providers::ElementTypes::accessElementType FOR node» == req.getElementType()) {
	return getGEFWrapper(new «node.getCreateCommandQualifiedClassName()»(req));

Back to the top