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

COVERAGE SUMMARY FOR SOURCE FILE [ResourceDemandingBehaviourLoopCompartment2CanonicalEditPolicy.java]

nameclass, %method, %block, %line, %
ResourceDemandingBehaviourLoopCompartment2CanonicalEditPolicy.java0%   (0/1)0%   (0/5)0%   (0/62)0%   (0/20)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ResourceDemandingBehaviourLoopCompartment2CanonicalEditPolicy0%   (0/1)0%   (0/5)0%   (0/62)0%   (0/20)
ResourceDemandingBehaviourLoopCompartment2CanonicalEditPolicy (): 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/17)0%   (0/5)
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 2006 SDQ Research Group, University of Karlsruhe (TH)
3 */
4package de.uka.ipd.sdq.pcm.gmf.seff.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.gmf.seff.edit.parts.AcquireAction2EditPart;
17import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.BranchActionEditPart;
18import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.CollectionIteratorActionEditPart;
19import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.ExternalCallAction2EditPart;
20import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.ForkActionEditPart;
21import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.InternalActionEditPart;
22import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.LoopAction2EditPart;
23import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.ReleaseActionEditPart;
24import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.StartAction2EditPart;
25import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.StopAction2EditPart;
26import de.uka.ipd.sdq.pcm.gmf.seff.part.PalladioComponentModelDiagramUpdater;
27import de.uka.ipd.sdq.pcm.gmf.seff.part.PalladioComponentModelNodeDescriptor;
28import de.uka.ipd.sdq.pcm.gmf.seff.part.PalladioComponentModelVisualIDRegistry;
29import de.uka.ipd.sdq.pcm.seff.SeffPackage;
30 
31/**
32 * @generated
33 */
34public class ResourceDemandingBehaviourLoopCompartment2CanonicalEditPolicy
35                extends CanonicalEditPolicy {
36 
37        /**
38         * @generated
39         */
40        Set myFeaturesToSynchronize;
41 
42        /**
43         * @generated
44         */
45        protected List getSemanticChildrenList() {
46                View viewObject = (View) getHost().getModel();
47                List result = new LinkedList();
48                for (Iterator it = PalladioComponentModelDiagramUpdater
49                                .getResourceDemandingBehaviourBehaviourCompartment_7014SemanticChildren(
50                                                viewObject).iterator(); it.hasNext();) {
51                        result.add(((PalladioComponentModelNodeDescriptor) it.next())
52                                        .getModelElement());
53                }
54                return result;
55        }
56 
57        /**
58         * @generated
59         */
60        protected boolean isOrphaned(Collection semanticChildren, final View view) {
61                int visualID = PalladioComponentModelVisualIDRegistry.getVisualID(view);
62                switch (visualID) {
63                case StartAction2EditPart.VISUAL_ID:
64                case StopAction2EditPart.VISUAL_ID:
65                case LoopAction2EditPart.VISUAL_ID:
66                case InternalActionEditPart.VISUAL_ID:
67                case BranchActionEditPart.VISUAL_ID:
68                case ExternalCallAction2EditPart.VISUAL_ID:
69                case CollectionIteratorActionEditPart.VISUAL_ID:
70                case AcquireAction2EditPart.VISUAL_ID:
71                case ReleaseActionEditPart.VISUAL_ID:
72                case ForkActionEditPart.VISUAL_ID:
73                        if (!semanticChildren.contains(view.getElement())) {
74                                return true;
75                        }
76                }
77                return false;
78        }
79 
80        /**
81         * @generated
82         */
83        protected String getDefaultFactoryHint() {
84                return null;
85        }
86 
87        /**
88         * @generated
89         */
90        protected Set getFeaturesToSynchronize() {
91                if (myFeaturesToSynchronize == null) {
92                        myFeaturesToSynchronize = new HashSet();
93                        myFeaturesToSynchronize.add(SeffPackage.eINSTANCE
94                                        .getResourceDemandingBehaviour_Steps_Behaviour());
95                }
96                return myFeaturesToSynchronize;
97        }
98 
99}

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