EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.pcm.gmf.composite.edit.policies]

COVERAGE SUMMARY FOR SOURCE FILE [ComposedProvidingRequiringEntity2CanonicalEditPolicy.java]

nameclass, %method, %block, %line, %
ComposedProvidingRequiringEntity2CanonicalEditPolicy.java0%   (0/1)0%   (0/5)0%   (0/68)0%   (0/24)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ComposedProvidingRequiringEntity2CanonicalEditPolicy0%   (0/1)0%   (0/5)0%   (0/68)0%   (0/24)
ComposedProvidingRequiringEntity2CanonicalEditPolicy (): void 0%   (0/1)0%   (0/3)0%   (0/1)
getDefaultFactoryHint (): String 0%   (0/1)0%   (0/2)0%   (0/1)
getFeaturesToSynchronize (): Set 0%   (0/1)0%   (0/23)0%   (0/9)
getSemanticChildrenList (): List 0%   (0/1)0%   (0/26)0%   (0/8)
isOrphaned (Collection, View): boolean 0%   (0/1)0%   (0/14)0%   (0/5)

1/*
2 *Copyright 2007, SDQ, IPD, Uni Karlsruhe (TH)
3 */
4package de.uka.ipd.sdq.pcm.gmf.composite.edit.policies;
5 
6import java.util.Collection;
7import java.util.HashSet;
8import java.util.Iterator;
9import java.util.LinkedList;
10import java.util.List;
11import java.util.Set;
12 
13import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
14import org.eclipse.gmf.runtime.notation.View;
15 
16import de.uka.ipd.sdq.pcm.core.entity.EntityPackage;
17import de.uka.ipd.sdq.pcm.gmf.composite.edit.parts.OperationProvidedRole2EditPart;
18import de.uka.ipd.sdq.pcm.gmf.composite.edit.parts.OperationRequiredRole2EditPart;
19import de.uka.ipd.sdq.pcm.gmf.composite.part.PalladioComponentModelDiagramUpdater;
20import de.uka.ipd.sdq.pcm.gmf.composite.part.PalladioComponentModelNodeDescriptor;
21import de.uka.ipd.sdq.pcm.gmf.composite.part.PalladioComponentModelVisualIDRegistry;
22 
23/**
24 * @generated
25 */
26public class ComposedProvidingRequiringEntity2CanonicalEditPolicy extends
27                CanonicalEditPolicy {
28 
29        /**
30         * @generated
31         */
32        Set myFeaturesToSynchronize;
33 
34        /**
35         * @generated
36         */
37        protected List getSemanticChildrenList() {
38                View viewObject = (View) getHost().getModel();
39                List result = new LinkedList();
40                for (Iterator it = PalladioComponentModelDiagramUpdater
41                                .getComposedProvidingRequiringEntity_2002SemanticChildren(
42                                                viewObject).iterator(); it.hasNext();) {
43                        result.add(((PalladioComponentModelNodeDescriptor) it.next())
44                                        .getModelElement());
45                }
46                return result;
47        }
48 
49        /**
50         * @generated
51         */
52        protected boolean isOrphaned(Collection semanticChildren, final View view) {
53                int visualID = PalladioComponentModelVisualIDRegistry.getVisualID(view);
54                switch (visualID) {
55                case OperationProvidedRole2EditPart.VISUAL_ID:
56                case OperationRequiredRole2EditPart.VISUAL_ID:
57                        if (!semanticChildren.contains(view.getElement())) {
58                                return true;
59                        }
60                }
61                return false;
62        }
63 
64        /**
65         * @generated
66         */
67        protected String getDefaultFactoryHint() {
68                return null;
69        }
70 
71        /**
72         * @generated
73         */
74        protected Set getFeaturesToSynchronize() {
75                if (myFeaturesToSynchronize == null) {
76                        myFeaturesToSynchronize = new HashSet();
77                        myFeaturesToSynchronize
78                                        .add(EntityPackage.eINSTANCE
79                                                        .getInterfaceProvidingEntity_ProvidedRoles_InterfaceProvidingEntity());
80                        myFeaturesToSynchronize
81                                        .add(EntityPackage.eINSTANCE
82                                                        .getInterfaceRequiringEntity_RequiredRoles_InterfaceRequiringEntity());
83                }
84                return myFeaturesToSynchronize;
85        }
86 
87}

[all classes][de.uka.ipd.sdq.pcm.gmf.composite.edit.policies]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov