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

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

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class BranchActionBranchTransitionCompartmentCanonicalEditPolicy0%   (0/1)0%   (0/5)0%   (0/62)0%   (0/20)
BranchActionBranchTransitionCompartmentCanonicalEditPolicy (): 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.GuardedBranchTransitionEditPart;
17import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.ProbabilisticBranchTransitionEditPart;
18import de.uka.ipd.sdq.pcm.gmf.seff.part.PalladioComponentModelDiagramUpdater;
19import de.uka.ipd.sdq.pcm.gmf.seff.part.PalladioComponentModelNodeDescriptor;
20import de.uka.ipd.sdq.pcm.gmf.seff.part.PalladioComponentModelVisualIDRegistry;
21import de.uka.ipd.sdq.pcm.seff.SeffPackage;
22 
23/**
24 * @generated
25 */
26public class BranchActionBranchTransitionCompartmentCanonicalEditPolicy 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                                .getBranchActionBranchTransitionCompartment_7007SemanticChildren(
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 ProbabilisticBranchTransitionEditPart.VISUAL_ID:
56                case GuardedBranchTransitionEditPart.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.add(SeffPackage.eINSTANCE
78                                        .getBranchAction_Branches_Branch());
79                }
80                return myFeaturesToSynchronize;
81        }
82 
83}

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