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

nameclass, %method, %block, %line, %
BranchCanonicalEditPolicy.java0%   (0/1)0%   (0/4)0%   (0/73)0%   (0/21)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class BranchCanonicalEditPolicy0%   (0/1)0%   (0/4)0%   (0/73)0%   (0/21)
BranchCanonicalEditPolicy (): 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/41)0%   (0/11)
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.Iterator;
7import java.util.LinkedList;
8import java.util.List;
9 
10import org.eclipse.emf.ecore.EObject;
11import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
12import org.eclipse.gmf.runtime.notation.View;
13 
14import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.BranchTransitionEditPart;
15import de.uka.ipd.sdq.pcm.gmf.usage.part.PalladioComponentModelVisualIDRegistry;
16import de.uka.ipd.sdq.pcm.usagemodel.Branch;
17 
18/**
19 * @generated
20 */
21public class BranchCanonicalEditPolicy 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                for (Iterator values = ((Branch) modelObject)
33                                .getBranchTransitions_Branch().iterator(); values.hasNext();) {
34                        nextValue = (EObject) values.next();
35                        nodeVID = PalladioComponentModelVisualIDRegistry.getNodeVisualID(
36                                        viewObject, nextValue);
37                        if (BranchTransitionEditPart.VISUAL_ID == nodeVID) {
38                                result.add(nextValue);
39                        }
40                }
41                return result;
42        }
43 
44        /**
45         * @generated
46         */
47        protected boolean shouldDeleteView(View view) {
48                if (view.getEAnnotation("Shortcut") != null) { //$NON-NLS-1$
49                        return view.isSetElement()
50                                        && (view.getElement() == null || view.getElement()
51                                                        .eIsProxy());
52                }
53                int nodeVID = PalladioComponentModelVisualIDRegistry.getVisualID(view);
54                switch (nodeVID) {
55                case BranchTransitionEditPart.VISUAL_ID:
56                        return true;
57                }
58                return false;
59        }
60 
61        /**
62         * @generated
63         */
64        protected String getDefaultFactoryHint() {
65                return null;
66        }
67 
68}

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