Skip to content
Snippets Groups Projects
Commit c5b225b6 authored by Daniel Ratiu's avatar Daniel Ratiu
Browse files

resolving this issue - now disconnecting elements from the library works again

refs 1155
parent 63bc3472
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,8 @@ import static org.eclipse.emf.ecore.util.EcoreUtil.copyAll;
import java.util.List;
import org.eclipse.emf.common.util.BasicEList;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
import org.fortiss.tooling.base.model.element.IConnector;
import org.fortiss.tooling.base.model.element.IHierarchicElement;
......@@ -42,7 +44,7 @@ import org.fortiss.tooling.kernel.service.IPersistencyService;
* @author ratiu
* @author $Author: hoelzl $
* @version $Rev: 18709 $
* @ConQAT.Rating YELLOW Hash: 904A5F32D40EB9E2C7FA5ABC1CC53DC7
* @ConQAT.Rating YELLOW Hash: 6AABB1E76AD510EFBA64B6315EA5137A
*/
public class ModelElementLibraryService implements ILibraryService {
......@@ -123,9 +125,12 @@ public class ModelElementLibraryService implements ILibraryService {
IHierarchicElement container = (IHierarchicElement)elementRef.eContainer();
container.getContainedElementsList().remove(elementRef);
for(IConnector connector : ((IHierarchicElement)elementRef).getConnectorsList()) {
EList<IConnector> connectorsList = new BasicEList<IConnector>();
connectorsList.addAll(((IHierarchicElement)elementRef).getConnectorsList());
for(IConnector connector : connectorsList) {
wrapped.getConnectorsList().add(connector);
}
((ILayoutedModelElement)wrapped).setLayoutData(copyAll(
((ILayoutedModelElement)elementRef).getLayoutDataList()).toArray(
new ILayoutData[2]));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment