Skip to content
Snippets Groups Projects
Commit b7f2a496 authored by Vincent Aravantinos's avatar Vincent Aravantinos
Browse files

code improvement

refs 1925
parent 925a4c91
No related branches found
No related tags found
No related merge requests found
......@@ -32,7 +32,7 @@ import org.eclipse.swt.dnd.TextTransfer;
import org.eclipse.swt.dnd.Transfer;
import org.eclipse.swt.widgets.Display;
import org.fortiss.tooling.kernel.extension.data.IElementCompositionContext;
import org.fortiss.tooling.kernel.model.SpeciallyCopyiable;
import org.fortiss.tooling.kernel.model.ISpeciallyCopyiable;
import org.fortiss.tooling.kernel.service.IElementCompositorService;
import org.fortiss.tooling.kernel.ui.dnd.CompositionServiceLocalCopyPasteTransfer;
......@@ -45,7 +45,7 @@ import org.fortiss.tooling.kernel.ui.dnd.CompositionServiceLocalCopyPasteTransfe
*
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: E84BD272D73E0D834E3535040340CBDD
* @ConQAT.Rating YELLOW Hash: C10175C80531676B29BE8895D87819F2
*/
public class CopyPasteUtils {
......@@ -66,12 +66,12 @@ public class CopyPasteUtils {
copier.copyReferences();
i++;
}
EList<SpeciallyCopyiable> specialSel =
pickInstanceOf(SpeciallyCopyiable.class, new BasicEList<EObject>(sel));
for(SpeciallyCopyiable obj : specialSel) {
EList<ISpeciallyCopyiable> specialSel =
pickInstanceOf(ISpeciallyCopyiable.class, new BasicEList<EObject>(sel));
for(ISpeciallyCopyiable obj : specialSel) {
obj.completeCopyEnvironment(copier);
}
for(SpeciallyCopyiable obj : specialSel) {
for(ISpeciallyCopyiable obj : specialSel) {
obj.copyConnections(copier);
}
Clipboard clipboard = new Clipboard(Display.getDefault());
......@@ -120,8 +120,8 @@ public class CopyPasteUtils {
IElementCompositorService.INSTANCE.compose(target, copy, context);
}
for(EObject obj : getClipBoardContent()) {
if(obj instanceof SpeciallyCopyiable) {
((SpeciallyCopyiable)obj).copyConnections(copier);
if(obj instanceof ISpeciallyCopyiable) {
((ISpeciallyCopyiable)obj).copyConnections(copier);
}
}
}
......
......@@ -100,7 +100,8 @@
<eClassifiers xsi:type="ecore:EClass" name="IExternalDocumentReference">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="uri" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="SpeciallyCopyiable">
<eClassifiers xsi:type="ecore:EClass" name="ISpeciallyCopyiable" abstract="true"
interface="true">
<eOperations name="completeCopyEnvironment">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="/** To be implemented by subclasses. **/"/>
......
......@@ -46,12 +46,12 @@
<genClasses ecoreClass="kernel.ecore#//IExternalDocumentReference">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute kernel.ecore#//IExternalDocumentReference/uri"/>
</genClasses>
<genClasses ecoreClass="kernel.ecore#//SpeciallyCopyiable">
<genOperations ecoreOperation="kernel.ecore#//SpeciallyCopyiable/completeCopyEnvironment">
<genParameters ecoreParameter="kernel.ecore#//SpeciallyCopyiable/completeCopyEnvironment/copyMap"/>
<genClasses image="false" ecoreClass="kernel.ecore#//ISpeciallyCopyiable">
<genOperations ecoreOperation="kernel.ecore#//ISpeciallyCopyiable/completeCopyEnvironment">
<genParameters ecoreParameter="kernel.ecore#//ISpeciallyCopyiable/completeCopyEnvironment/copyMap"/>
</genOperations>
<genOperations ecoreOperation="kernel.ecore#//SpeciallyCopyiable/copyConnections">
<genParameters ecoreParameter="kernel.ecore#//SpeciallyCopyiable/copyConnections/copyMap"/>
<genOperations ecoreOperation="kernel.ecore#//ISpeciallyCopyiable/copyConnections">
<genParameters ecoreParameter="kernel.ecore#//ISpeciallyCopyiable/copyConnections/copyMap"/>
</genOperations>
</genClasses>
</genPackages>
......
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