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

COVERAGE SUMMARY FOR SOURCE FILE [InfrastructureProvidedRoleEditPart.java]

nameclass, %method, %block, %line, %
InfrastructureProvidedRoleEditPart.java0%   (0/2)0%   (0/13)0%   (0/162)0%   (0/45)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class InfrastructureProvidedRoleEditPart0%   (0/1)0%   (0/9)0%   (0/64)0%   (0/25)
InfrastructureProvidedRoleEditPart (View): void 0%   (0/1)0%   (0/4)0%   (0/2)
access$0 (InfrastructureProvidedRoleEditPart): IMapMode 0%   (0/1)0%   (0/3)0%   (0/1)
addChildVisual (EditPart, int): void 0%   (0/1)0%   (0/10)0%   (0/4)
addFixedChild (EditPart): boolean 0%   (0/1)0%   (0/13)0%   (0/5)
createConnectionFigure (): Connection 0%   (0/1)0%   (0/5)0%   (0/1)
createDefaultEditPolicies (): void 0%   (0/1)0%   (0/9)0%   (0/4)
getPrimaryShape (): InfrastructureProvidedRoleEditPart$InfrastructureProvided... 0%   (0/1)0%   (0/4)0%   (0/1)
removeChildVisual (EditPart): void 0%   (0/1)0%   (0/9)0%   (0/4)
removeFixedChild (EditPart): boolean 0%   (0/1)0%   (0/7)0%   (0/3)
     
class InfrastructureProvidedRoleEditPart$InfrastructureProvidedRoleFigure0%   (0/1)0%   (0/4)0%   (0/98)0%   (0/20)
InfrastructureProvidedRoleEditPart$InfrastructureProvidedRoleFigure (Infrastr... 0%   (0/1)0%   (0/15)0%   (0/5)
createContents (): void 0%   (0/1)0%   (0/14)0%   (0/5)
createTargetDecoration (): RotatableDecoration 0%   (0/1)0%   (0/66)0%   (0/9)
getFigureInfrastructureProvidesStereotypeLabelFigure (): WrappingLabel 0%   (0/1)0%   (0/3)0%   (0/1)

1/*
2 * Copyright 2007, IPD, SDQ, University of Karlsruhe
3 */
4package de.uka.ipd.sdq.pcm.gmf.repository.edit.parts;
5 
6import org.eclipse.draw2d.Connection;
7import org.eclipse.draw2d.PolylineDecoration;
8import org.eclipse.draw2d.RotatableDecoration;
9import org.eclipse.draw2d.geometry.PointList;
10import org.eclipse.gef.EditPart;
11import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionNodeEditPart;
12import org.eclipse.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart;
13import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
14import org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx;
15import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
16import org.eclipse.gmf.runtime.notation.View;
17 
18import de.uka.ipd.sdq.pcm.gmf.repository.edit.policies.InfrastructureProvidedRoleItemSemanticEditPolicy;
19 
20/**
21 * @generated
22 */
23public class InfrastructureProvidedRoleEditPart extends ConnectionNodeEditPart
24                implements ITreeBranchEditPart {
25 
26        /**
27         * @generated
28         */
29        public static final int VISUAL_ID = 4111;
30 
31        /**
32         * @generated
33         */
34        public InfrastructureProvidedRoleEditPart(View view) {
35                super(view);
36        }
37 
38        /**
39         * @generated
40         */
41        protected void createDefaultEditPolicies() {
42                super.createDefaultEditPolicies();
43                installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE,
44                                new InfrastructureProvidedRoleItemSemanticEditPolicy());
45        }
46 
47        /**
48         * @generated
49         */
50        protected boolean addFixedChild(EditPart childEditPart) {
51                if (childEditPart instanceof WrappingLabelEditPart) {
52                        ((WrappingLabelEditPart) childEditPart).setLabel(getPrimaryShape()
53                                        .getFigureInfrastructureProvidesStereotypeLabelFigure());
54                        return true;
55                }
56                return false;
57        }
58 
59        /**
60         * @generated
61         */
62        protected void addChildVisual(EditPart childEditPart, int index) {
63                if (addFixedChild(childEditPart)) {
64                        return;
65                }
66                super.addChildVisual(childEditPart, -1);
67        }
68 
69        /**
70         * @generated
71         */
72        protected boolean removeFixedChild(EditPart childEditPart) {
73                if (childEditPart instanceof WrappingLabelEditPart) {
74                        return true;
75                }
76                return false;
77        }
78 
79        /**
80         * @generated
81         */
82        protected void removeChildVisual(EditPart childEditPart) {
83                if (removeFixedChild(childEditPart)) {
84                        return;
85                }
86                super.removeChildVisual(childEditPart);
87        }
88 
89        /**
90         * Creates figure for this edit part.
91         * 
92         * Body of this method does not depend on settings in generation model
93         * so you may safely remove <i>generated</i> tag and modify it.
94         * 
95         * @generated
96         */
97 
98        protected Connection createConnectionFigure() {
99                return new InfrastructureProvidedRoleFigure();
100        }
101 
102        /**
103         * @generated
104         */
105        public InfrastructureProvidedRoleFigure getPrimaryShape() {
106                return (InfrastructureProvidedRoleFigure) getFigure();
107        }
108 
109        /**
110         * @generated
111         */
112        public class InfrastructureProvidedRoleFigure extends PolylineConnectionEx {
113 
114                /**
115                 * @generated
116                 */
117                private WrappingLabel fFigureInfrastructureProvidesStereotypeLabelFigure;
118 
119                /**
120                 * @generated
121                 */
122                public InfrastructureProvidedRoleFigure() {
123                        this.setLineWidth(1);
124 
125                        createContents();
126                        setTargetDecoration(createTargetDecoration());
127                }
128 
129                /**
130                 * @generated
131                 */
132                private void createContents() {
133 
134                        fFigureInfrastructureProvidesStereotypeLabelFigure = new WrappingLabel();
135                        fFigureInfrastructureProvidesStereotypeLabelFigure
136                                        .setText("<<Provides>>");
137 
138                        this.add(fFigureInfrastructureProvidesStereotypeLabelFigure);
139 
140                }
141 
142                /**
143                 * @generated
144                 */
145                private RotatableDecoration createTargetDecoration() {
146                        PolylineDecoration df = new PolylineDecoration();
147                        df.setLineWidth(1);
148                        PointList pl = new PointList();
149                        pl.addPoint(getMapMode().DPtoLP(-1), getMapMode().DPtoLP(-1));
150                        pl.addPoint(getMapMode().DPtoLP(0), getMapMode().DPtoLP(0));
151                        pl.addPoint(getMapMode().DPtoLP(-1), getMapMode().DPtoLP(1));
152                        df.setTemplate(pl);
153                        df.setScale(getMapMode().DPtoLP(7), getMapMode().DPtoLP(3));
154                        return df;
155                }
156 
157                /**
158                 * @generated
159                 */
160                public WrappingLabel getFigureInfrastructureProvidesStereotypeLabelFigure() {
161                        return fFigureInfrastructureProvidesStereotypeLabelFigure;
162                }
163 
164        }
165 
166}

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