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

COVERAGE SUMMARY FOR SOURCE FILE [PalladioComponentModelPaletteFactory.java]

nameclass, %method, %block, %line, %
PalladioComponentModelPaletteFactory.java0%   (0/3)0%   (0/18)0%   (0/360)0%   (0/134)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class PalladioComponentModelPaletteFactory0%   (0/1)0%   (0/12)0%   (0/304)0%   (0/120)
PalladioComponentModelPaletteFactory (): void 0%   (0/1)0%   (0/3)0%   (0/1)
createAssemblyConnector2CreationTool (): ToolEntry 0%   (0/1)0%   (0/30)0%   (0/11)
createAssemblyContext1CreationTool (): ToolEntry 0%   (0/1)0%   (0/30)0%   (0/11)
createAssemblyEventConnector4CreationTool (): ToolEntry 0%   (0/1)0%   (0/30)0%   (0/12)
createAssemblyInfrastructureConnector3CreationTool (): ToolEntry 0%   (0/1)0%   (0/30)0%   (0/13)
createLinks2Group (): PaletteContainer 0%   (0/1)0%   (0/30)0%   (0/12)
createNodes1Group (): PaletteContainer 0%   (0/1)0%   (0/22)0%   (0/7)
createOperationProvidedDelegationConnector5CreationTool (): ToolEntry 0%   (0/1)0%   (0/30)0%   (0/13)
createOperationRequiredDelegationConnector1CreationTool (): ToolEntry 0%   (0/1)0%   (0/30)0%   (0/13)
createSystemOperationProvidedRole3CreationTool (): ToolEntry 0%   (0/1)0%   (0/30)0%   (0/12)
createSystemOperationRequiredRole2CreationTool (): ToolEntry 0%   (0/1)0%   (0/30)0%   (0/12)
fillPalette (PaletteRoot): void 0%   (0/1)0%   (0/9)0%   (0/3)
     
class PalladioComponentModelPaletteFactory$LinkToolEntry0%   (0/1)0%   (0/3)0%   (0/28)0%   (0/7)
PalladioComponentModelPaletteFactory$LinkToolEntry (String, String, List): void 0%   (0/1)0%   (0/10)0%   (0/3)
PalladioComponentModelPaletteFactory$LinkToolEntry (String, String, List, Pal... 0%   (0/1)0%   (0/6)0%   (0/1)
createTool (): Tool 0%   (0/1)0%   (0/12)0%   (0/3)
     
class PalladioComponentModelPaletteFactory$NodeToolEntry0%   (0/1)0%   (0/3)0%   (0/28)0%   (0/7)
PalladioComponentModelPaletteFactory$NodeToolEntry (String, String, List): void 0%   (0/1)0%   (0/10)0%   (0/3)
PalladioComponentModelPaletteFactory$NodeToolEntry (String, String, List, Pal... 0%   (0/1)0%   (0/6)0%   (0/1)
createTool (): Tool 0%   (0/1)0%   (0/12)0%   (0/3)

1/*
2 * Copyright 2007, SDQ, IPD, Uni Karlsruhe (TH)
3 */
4package de.uka.ipd.sdq.pcm.gmf.composite.part;
5 
6import java.util.ArrayList;
7import java.util.List;
8 
9import org.eclipse.gef.Tool;
10import org.eclipse.gef.palette.PaletteContainer;
11import org.eclipse.gef.palette.PaletteDrawer;
12import org.eclipse.gef.palette.PaletteRoot;
13import org.eclipse.gef.palette.ToolEntry;
14import org.eclipse.gmf.runtime.diagram.ui.tools.UnspecifiedTypeConnectionTool;
15import org.eclipse.gmf.runtime.diagram.ui.tools.UnspecifiedTypeCreationTool;
16 
17import de.uka.ipd.sdq.pcm.gmf.composite.providers.PalladioComponentModelElementTypes;
18 
19/**
20 * @generated
21 */
22public class PalladioComponentModelPaletteFactory {
23 
24        /**
25         * @generated
26         */
27        public void fillPalette(PaletteRoot paletteRoot) {
28                paletteRoot.add(createNodes1Group());
29                paletteRoot.add(createLinks2Group());
30        }
31 
32        /**
33         * Creates "Nodes" palette tool group
34         * @generated
35         */
36        private PaletteContainer createNodes1Group() {
37                PaletteDrawer paletteContainer = new PaletteDrawer(
38                                Messages.Nodes1Group_title);
39                paletteContainer.setId("createNodes1Group"); //$NON-NLS-1$
40                paletteContainer.add(createAssemblyContext1CreationTool());
41                paletteContainer.add(createSystemOperationRequiredRole2CreationTool());
42                paletteContainer.add(createSystemOperationProvidedRole3CreationTool());
43                return paletteContainer;
44        }
45 
46        /**
47         * Creates "Links" palette tool group
48         * @generated
49         */
50        private PaletteContainer createLinks2Group() {
51                PaletteDrawer paletteContainer = new PaletteDrawer(
52                                Messages.Links2Group_title);
53                paletteContainer.setId("createLinks2Group"); //$NON-NLS-1$
54                paletteContainer
55                                .add(createOperationRequiredDelegationConnector1CreationTool());
56                paletteContainer.add(createAssemblyConnector2CreationTool());
57                paletteContainer
58                                .add(createAssemblyInfrastructureConnector3CreationTool());
59                paletteContainer.add(createAssemblyEventConnector4CreationTool());
60                paletteContainer
61                                .add(createOperationProvidedDelegationConnector5CreationTool());
62                return paletteContainer;
63        }
64 
65        /**
66         * @generated
67         */
68        private ToolEntry createAssemblyContext1CreationTool() {
69                List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1);
70                types.add(PalladioComponentModelElementTypes.AssemblyContext_3006);
71                NodeToolEntry entry = new NodeToolEntry(
72                                Messages.AssemblyContext1CreationTool_title,
73                                Messages.AssemblyContext1CreationTool_desc, types);
74                entry.setId("createAssemblyContext1CreationTool"); //$NON-NLS-1$
75                entry
76                                .setSmallIcon(PalladioComponentModelElementTypes
77                                                .getImageDescriptor(PalladioComponentModelElementTypes.AssemblyContext_3006));
78                entry.setLargeIcon(entry.getSmallIcon());
79                return entry;
80        }
81 
82        /**
83         * @generated
84         */
85        private ToolEntry createSystemOperationRequiredRole2CreationTool() {
86                List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1);
87                types
88                                .add(PalladioComponentModelElementTypes.OperationRequiredRole_3012);
89                NodeToolEntry entry = new NodeToolEntry(
90                                Messages.SystemOperationRequiredRole2CreationTool_title,
91                                Messages.SystemOperationRequiredRole2CreationTool_desc, types);
92                entry.setId("createSystemOperationRequiredRole2CreationTool"); //$NON-NLS-1$
93                entry
94                                .setSmallIcon(PalladioComponentModelElementTypes
95                                                .getImageDescriptor(PalladioComponentModelElementTypes.OperationRequiredRole_3012));
96                entry.setLargeIcon(entry.getSmallIcon());
97                return entry;
98        }
99 
100        /**
101         * @generated
102         */
103        private ToolEntry createSystemOperationProvidedRole3CreationTool() {
104                List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1);
105                types
106                                .add(PalladioComponentModelElementTypes.OperationProvidedRole_3011);
107                NodeToolEntry entry = new NodeToolEntry(
108                                Messages.SystemOperationProvidedRole3CreationTool_title,
109                                Messages.SystemOperationProvidedRole3CreationTool_desc, types);
110                entry.setId("createSystemOperationProvidedRole3CreationTool"); //$NON-NLS-1$
111                entry
112                                .setSmallIcon(PalladioComponentModelElementTypes
113                                                .getImageDescriptor(PalladioComponentModelElementTypes.OperationProvidedRole_3011));
114                entry.setLargeIcon(entry.getSmallIcon());
115                return entry;
116        }
117 
118        /**
119         * @generated
120         */
121        private ToolEntry createOperationRequiredDelegationConnector1CreationTool() {
122                List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1);
123                types
124                                .add(PalladioComponentModelElementTypes.RequiredDelegationConnector_4005);
125                LinkToolEntry entry = new LinkToolEntry(
126                                Messages.OperationRequiredDelegationConnector1CreationTool_title,
127                                Messages.OperationRequiredDelegationConnector1CreationTool_desc,
128                                types);
129                entry.setId("createOperationRequiredDelegationConnector1CreationTool"); //$NON-NLS-1$
130                entry
131                                .setSmallIcon(PalladioComponentModelElementTypes
132                                                .getImageDescriptor(PalladioComponentModelElementTypes.RequiredDelegationConnector_4005));
133                entry.setLargeIcon(entry.getSmallIcon());
134                return entry;
135        }
136 
137        /**
138         * @generated
139         */
140        private ToolEntry createAssemblyConnector2CreationTool() {
141                List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1);
142                types.add(PalladioComponentModelElementTypes.AssemblyConnector_4004);
143                LinkToolEntry entry = new LinkToolEntry(
144                                Messages.AssemblyConnector2CreationTool_title,
145                                Messages.AssemblyConnector2CreationTool_desc, types);
146                entry.setId("createAssemblyConnector2CreationTool"); //$NON-NLS-1$
147                entry
148                                .setSmallIcon(PalladioComponentModelElementTypes
149                                                .getImageDescriptor(PalladioComponentModelElementTypes.AssemblyConnector_4004));
150                entry.setLargeIcon(entry.getSmallIcon());
151                return entry;
152        }
153 
154        /**
155         * @generated
156         */
157        private ToolEntry createAssemblyInfrastructureConnector3CreationTool() {
158                List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1);
159                types
160                                .add(PalladioComponentModelElementTypes.AssemblyInfrastructureConnector_4008);
161                LinkToolEntry entry = new LinkToolEntry(
162                                Messages.AssemblyInfrastructureConnector3CreationTool_title,
163                                Messages.AssemblyInfrastructureConnector3CreationTool_desc,
164                                types);
165                entry.setId("createAssemblyInfrastructureConnector3CreationTool"); //$NON-NLS-1$
166                entry
167                                .setSmallIcon(PalladioComponentModelElementTypes
168                                                .getImageDescriptor(PalladioComponentModelElementTypes.AssemblyInfrastructureConnector_4008));
169                entry.setLargeIcon(entry.getSmallIcon());
170                return entry;
171        }
172 
173        /**
174         * @generated
175         */
176        private ToolEntry createAssemblyEventConnector4CreationTool() {
177                List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1);
178                types
179                                .add(PalladioComponentModelElementTypes.AssemblyEventConnector_4007);
180                LinkToolEntry entry = new LinkToolEntry(
181                                Messages.AssemblyEventConnector4CreationTool_title,
182                                Messages.AssemblyEventConnector4CreationTool_desc, types);
183                entry.setId("createAssemblyEventConnector4CreationTool"); //$NON-NLS-1$
184                entry
185                                .setSmallIcon(PalladioComponentModelElementTypes
186                                                .getImageDescriptor(PalladioComponentModelElementTypes.AssemblyEventConnector_4007));
187                entry.setLargeIcon(entry.getSmallIcon());
188                return entry;
189        }
190 
191        /**
192         * @generated
193         */
194        private ToolEntry createOperationProvidedDelegationConnector5CreationTool() {
195                List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1);
196                types
197                                .add(PalladioComponentModelElementTypes.ProvidedDelegationConnector_4006);
198                LinkToolEntry entry = new LinkToolEntry(
199                                Messages.OperationProvidedDelegationConnector5CreationTool_title,
200                                Messages.OperationProvidedDelegationConnector5CreationTool_desc,
201                                types);
202                entry.setId("createOperationProvidedDelegationConnector5CreationTool"); //$NON-NLS-1$
203                entry
204                                .setSmallIcon(PalladioComponentModelElementTypes
205                                                .getImageDescriptor(PalladioComponentModelElementTypes.ProvidedDelegationConnector_4006));
206                entry.setLargeIcon(entry.getSmallIcon());
207                return entry;
208        }
209 
210        /**
211         * @generated
212         */
213        private static class NodeToolEntry extends ToolEntry {
214 
215                /**
216                 * @generated
217                 */
218                private final List elementTypes;
219 
220                /**
221                 * @generated
222                 */
223                private NodeToolEntry(String title, String description,
224                                List elementTypes) {
225                        super(title, description, null, null);
226                        this.elementTypes = elementTypes;
227                }
228 
229                /**
230                 * @generated
231                 */
232                public Tool createTool() {
233                        Tool tool = new UnspecifiedTypeCreationTool(elementTypes);
234                        tool.setProperties(getToolProperties());
235                        return tool;
236                }
237        }
238 
239        /**
240         * @generated
241         */
242        private static class LinkToolEntry extends ToolEntry {
243 
244                /**
245                 * @generated
246                 */
247                private final List relationshipTypes;
248 
249                /**
250                 * @generated
251                 */
252                private LinkToolEntry(String title, String description,
253                                List relationshipTypes) {
254                        super(title, description, null, null);
255                        this.relationshipTypes = relationshipTypes;
256                }
257 
258                /**
259                 * @generated
260                 */
261                public Tool createTool() {
262                        Tool tool = new UnspecifiedTypeConnectionTool(relationshipTypes);
263                        tool.setProperties(getToolProperties());
264                        return tool;
265                }
266        }
267}

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