/******************************************************************************* * Copyright (c) 2010-2015 Henshin developers. 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: * TU Berlin, University of Luxembourg, SES S.A. *******************************************************************************/ /** * */ package de.tub.tfs.henshin.editor.editparts.transformation_unit.tree; import org.eclipse.emf.henshin.model.ConditionalUnit; import org.eclipse.emf.henshin.model.Unit; import org.eclipse.gef.EditPolicy; import de.tub.tfs.henshin.editor.editparts.transformation_unit.TransformationUnitAsSubUnitComponentEditPolicy; /** * The Class ConditionalUnitAsSubUnitTreeEditPart. */ public class ConditionalUnitAsSubUnitTreeEditPart extends ConditionalUnitTreeEditPart { /** The transformation unit. */ private Unit transformationUnit; /** * Instantiates a new conditional unit as sub unit tree edit part. * * @param context * the context * @param model * the model */ public ConditionalUnitAsSubUnitTreeEditPart(Unit context, ConditionalUnit model) { super(model); this.transformationUnit = context; } /* * (non-Javadoc) * * @see * henshineditor.editparts.tree.rule.RuleTreeEditPart#createEditPolicies() */ @Override protected void createEditPolicies() { installEditPolicy(EditPolicy.COMPONENT_ROLE, new TransformationUnitAsSubUnitComponentEditPolicy( transformationUnit)); } }