| /** |
| * |
| * Copyright (c) 2011, 2016 - Lunifera GmbH (Gross Enzersdorf), Loetz GmbH&Co.KG (69115 Heidelberg, Germany) |
| * |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License 2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Contributors: |
| * Florian Pirchner (Lunifera GmbH) - initial implementation |
| */ |
| package org.eclipse.osbp.tools.graphical.entity.lib; |
| |
| import java.util.ArrayList; |
| import java.util.Collection; |
| import java.util.Map; |
| |
| import org.eclipse.emf.ecore.EObject; |
| import org.eclipse.osbp.dsl.semantic.entity.LEntity; |
| import org.eclipse.sirius.tools.api.ui.IExternalJavaAction; |
| |
| public class LEntityInheritanceDeletion implements IExternalJavaAction { |
| |
| public LEntityInheritanceDeletion() { |
| // TODO Auto-generated constructor stub |
| } |
| |
| @Override |
| public void execute(Collection<? extends EObject> selections, |
| Map<String, Object> parameters) { |
| LEntity subtype = (LEntity) new ArrayList<EObject>(selections).get(0); |
| subtype.setSuperType(null); |
| } |
| |
| @Override |
| public boolean canExecute(Collection<? extends EObject> selections) { |
| return true; |
| } |
| |
| } |