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

nameclass, %method, %block, %line, %
BranchTransitionBranchTransitionCompartmentCanonicalEditPolicy.java0%   (0/1)0%   (0/4)0%   (0/64)0%   (0/20)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class BranchTransitionBranchTransitionCompartmentCanonicalEditPolicy0%   (0/1)0%   (0/4)0%   (0/64)0%   (0/20)
BranchTransitionBranchTransitionCompartmentCanonicalEditPolicy (): void 0%   (0/1)0%   (0/3)0%   (0/1)
getDefaultFactoryHint (): String 0%   (0/1)0%   (0/2)0%   (0/1)
getSemanticChildrenList (): List 0%   (0/1)0%   (0/32)0%   (0/10)
shouldDeleteView (View): boolean 0%   (0/1)0%   (0/27)0%   (0/8)

1/*
2 *Copyright 2007, SDQ, IPD, University of Karlsruhe
3 */
4package de.uka.ipd.sdq.pcm.gmf.usage.edit.policies;
5 
6import java.util.LinkedList;
7import java.util.List;
8 
9import org.eclipse.emf.ecore.EObject;
10import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
11import org.eclipse.gmf.runtime.notation.View;
12 
13import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.ScenarioBehaviour3EditPart;
14import de.uka.ipd.sdq.pcm.gmf.usage.part.PalladioComponentModelVisualIDRegistry;
15import de.uka.ipd.sdq.pcm.usagemodel.BranchTransition;
16 
17/**
18 * @generated
19 */
20public class BranchTransitionBranchTransitionCompartmentCanonicalEditPolicy
21                extends CanonicalEditPolicy {
22 
23        /**
24         * @generated
25         */
26        protected List getSemanticChildrenList() {
27                List result = new LinkedList();
28                EObject modelObject = ((View) getHost().getModel()).getElement();
29                View viewObject = (View) getHost().getModel();
30                EObject nextValue;
31                int nodeVID;
32                nextValue = ((BranchTransition) modelObject)
33                                .getBranchedBehaviour_BranchTransition();
34                nodeVID = PalladioComponentModelVisualIDRegistry.getNodeVisualID(
35                                viewObject, nextValue);
36                if (ScenarioBehaviour3EditPart.VISUAL_ID == nodeVID) {
37                        result.add(nextValue);
38                }
39                return result;
40        }
41 
42        /**
43         * @generated
44         */
45        protected boolean shouldDeleteView(View view) {
46                if (view.getEAnnotation("Shortcut") != null) { //$NON-NLS-1$
47                        return view.isSetElement()
48                                        && (view.getElement() == null || view.getElement()
49                                                        .eIsProxy());
50                }
51                int nodeVID = PalladioComponentModelVisualIDRegistry.getVisualID(view);
52                switch (nodeVID) {
53                case ScenarioBehaviour3EditPart.VISUAL_ID:
54                        return true;
55                }
56                return false;
57        }
58 
59        /**
60         * @generated
61         */
62        protected String getDefaultFactoryHint() {
63                return null;
64        }
65 
66}

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