blob: 36b406d9b1efc0116db78d31f7952d6de3fe1e6b [file] [log] [blame]
/**
*
* 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.common.util.EList;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.osbp.dsl.semantic.entity.LBeanAttribute;
import org.eclipse.osbp.dsl.semantic.entity.LBeanFeature;
import org.eclipse.sirius.tools.api.ui.IExternalJavaAction;
public class LBeanAttributeDeletion implements IExternalJavaAction {
public LBeanAttributeDeletion() {
}
@Override
public void execute(Collection<? extends EObject> selections,
Map<String, Object> parameters) {
LBeanAttribute attr = (LBeanAttribute) new ArrayList<EObject>(
selections).get(0);
EList<LBeanFeature> huhu = attr.getBean().getFeatures();
huhu.remove(attr);
}
@Override
public boolean canExecute(Collection<? extends EObject> selections) {
return true;
}
}