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 [ResourceDemandingBehaviourLoopCompartmentCanonicalEditPolicy.java]

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

COVERAGE BREAKDOWN BY CLASS AND METHOD

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

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