Commit 86cea14a authored by Daniel Ratiu's avatar Daniel Ratiu
Browse files

resolving this issue

refs 748
parent 4d766fea
......@@ -17,12 +17,15 @@ $Id: PortConnectionCompositor.java 2798 2012-01-16 13:15:45Z becker $
+--------------------------------------------------------------------------*/
package org.fortiss.af3.msc.ui.compose;
import static org.eclipse.emf.ecore.util.EcoreUtil.delete;
import org.eclipse.emf.ecore.EObject;
import org.fortiss.af3.msc.model.MSCObject;
import org.fortiss.af3.msc.model.Message;
import org.fortiss.af3.msc.model.MessageConnector;
import org.fortiss.af3.msc.utils.MSCModelElementFactory;
import org.fortiss.tooling.base.model.base.ConnectionSegmentBase;
import org.fortiss.tooling.base.model.element.IConnection;
import org.fortiss.tooling.base.ui.compose.ConnectorConnectionCompositorBase;
import org.fortiss.tooling.kernel.extension.data.IConnectionCompositionContext;
......@@ -32,7 +35,7 @@ import org.fortiss.tooling.kernel.extension.data.IConnectionCompositionContext;
* @author hoelzl
* @author $Author: becker $
* @version $Rev: 2798 $
* @ConQAT.Rating GREEN Hash: FE3B9D095F9C64D55B33A529B2CFEA02
* @ConQAT.Rating YELLOW Hash: 718B0784CBCD32BE18DD7C0710DA2A9E
*/
public class MSCConnectorMessageCompositor extends
ConnectorConnectionCompositorBase<MSCObject, MessageConnector, MessageConnector> {
......@@ -55,4 +58,17 @@ public class MSCConnectorMessageCompositor extends
public boolean canDisconnectSpecific(EObject connection) {
return connection instanceof Message;
}
/** {@inheritDoc} */
@Override
public boolean disconnect(EObject connection) {
if(connection instanceof IConnection) {
IConnection conn = (IConnection)connection;
delete(conn.getSource());
delete(conn.getTarget());
delete(connection);
return true;
}
return false;
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment