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

COVERAGE SUMMARY FOR SOURCE FILE [UsageScenarioUsageScenarioCompartmentCanonicalEditPolicy.java]

nameclass, %method, %block, %line, %
UsageScenarioUsageScenarioCompartmentCanonicalEditPolicy.java0%   (0/1)0%   (0/5)0%   (0/68)0%   (0/22)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class UsageScenarioUsageScenarioCompartmentCanonicalEditPolicy0%   (0/1)0%   (0/5)0%   (0/68)0%   (0/22)
UsageScenarioUsageScenarioCompartmentCanonicalEditPolicy (): 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/7)
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, University of Karlsruhe
3 */
4package de.uka.ipd.sdq.pcm.gmf.usage.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.usage.edit.parts.ClosedWorkloadEditPart;
17import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.OpenWorkloadEditPart;
18import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.ScenarioBehaviourEditPart;
19import de.uka.ipd.sdq.pcm.gmf.usage.part.PalladioComponentModelDiagramUpdater;
20import de.uka.ipd.sdq.pcm.gmf.usage.part.PalladioComponentModelNodeDescriptor;
21import de.uka.ipd.sdq.pcm.gmf.usage.part.PalladioComponentModelVisualIDRegistry;
22import de.uka.ipd.sdq.pcm.usagemodel.UsagemodelPackage;
23 
24/**
25 * @generated
26 */
27public class UsageScenarioUsageScenarioCompartmentCanonicalEditPolicy extends
28                CanonicalEditPolicy {
29 
30        /**
31         * @generated
32         */
33        Set myFeaturesToSynchronize;
34 
35        /**
36         * @generated
37         */
38        protected List getSemanticChildrenList() {
39                View viewObject = (View) getHost().getModel();
40                List result = new LinkedList();
41                for (Iterator it = PalladioComponentModelDiagramUpdater
42                                .getUsageScenarioUsageScenarioCompartment_7012SemanticChildren(
43                                                viewObject).iterator(); it.hasNext();) {
44                        result.add(((PalladioComponentModelNodeDescriptor) it.next())
45                                        .getModelElement());
46                }
47                return result;
48        }
49 
50        /**
51         * @generated
52         */
53        protected boolean isOrphaned(Collection semanticChildren, final View view) {
54                int visualID = PalladioComponentModelVisualIDRegistry.getVisualID(view);
55                switch (visualID) {
56                case ScenarioBehaviourEditPart.VISUAL_ID:
57                case ClosedWorkloadEditPart.VISUAL_ID:
58                case OpenWorkloadEditPart.VISUAL_ID:
59                        if (!semanticChildren.contains(view.getElement())) {
60                                return true;
61                        }
62                }
63                return false;
64        }
65 
66        /**
67         * @generated
68         */
69        protected String getDefaultFactoryHint() {
70                return null;
71        }
72 
73        /**
74         * @generated
75         */
76        protected Set getFeaturesToSynchronize() {
77                if (myFeaturesToSynchronize == null) {
78                        myFeaturesToSynchronize = new HashSet();
79                        myFeaturesToSynchronize.add(UsagemodelPackage.eINSTANCE
80                                        .getUsageScenario_ScenarioBehaviour_UsageScenario());
81                        myFeaturesToSynchronize.add(UsagemodelPackage.eINSTANCE
82                                        .getUsageScenario_Workload_UsageScenario());
83                }
84                return myFeaturesToSynchronize;
85        }
86 
87}

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