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