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

COVERAGE SUMMARY FOR SOURCE FILE [PalladioComponentModelPaletteFactory.java]

nameclass, %method, %block, %line, %
PalladioComponentModelPaletteFactory.java0%   (0/3)0%   (0/13)0%   (0/210)0%   (0/75)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class PalladioComponentModelPaletteFactory0%   (0/1)0%   (0/7)0%   (0/154)0%   (0/61)
PalladioComponentModelPaletteFactory (): void 0%   (0/1)0%   (0/3)0%   (0/1)
createConnection4CreationTool (): ToolEntry 0%   (0/1)0%   (0/30)0%   (0/14)
createLinkingResource2CreationTool (): ToolEntry 0%   (0/1)0%   (0/30)0%   (0/11)
createPcm1Group (): PaletteContainer 0%   (0/1)0%   (0/26)0%   (0/9)
createProcessingResourceSpecification3CreationTool (): ToolEntry 0%   (0/1)0%   (0/30)0%   (0/13)
createResourceContainer1CreationTool (): ToolEntry 0%   (0/1)0%   (0/30)0%   (0/11)
fillPalette (PaletteRoot): void 0%   (0/1)0%   (0/5)0%   (0/2)
     
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 2009, SDQ, IPD, Uni Karlsruhe (TH)
3 */
4package de.uka.ipd.sdq.pcm.gmf.resource.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.PaletteGroup;
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.resource.providers.PalladioComponentModelElementTypes;
18 
19/**
20 * @generated
21 */
22public class PalladioComponentModelPaletteFactory {
23 
24        /**
25         * @generated
26         */
27        public void fillPalette(PaletteRoot paletteRoot) {
28                paletteRoot.add(createPcm1Group());
29        }
30 
31        /**
32         * Creates "pcm" palette tool group
33         * @generated
34         */
35        private PaletteContainer createPcm1Group() {
36                PaletteGroup paletteContainer = new PaletteGroup(
37                                Messages.Pcm1Group_title);
38                paletteContainer.setId("createPcm1Group"); //$NON-NLS-1$
39                paletteContainer.add(createResourceContainer1CreationTool());
40                paletteContainer.add(createLinkingResource2CreationTool());
41                paletteContainer
42                                .add(createProcessingResourceSpecification3CreationTool());
43                paletteContainer.add(createConnection4CreationTool());
44                return paletteContainer;
45        }
46 
47        /**
48         * @generated
49         */
50        private ToolEntry createResourceContainer1CreationTool() {
51                List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1);
52                types.add(PalladioComponentModelElementTypes.ResourceContainer_2001);
53                NodeToolEntry entry = new NodeToolEntry(
54                                Messages.ResourceContainer1CreationTool_title,
55                                Messages.ResourceContainer1CreationTool_desc, types);
56                entry.setId("createResourceContainer1CreationTool"); //$NON-NLS-1$
57                entry
58                                .setSmallIcon(PalladioComponentModelElementTypes
59                                                .getImageDescriptor(PalladioComponentModelElementTypes.ResourceContainer_2001));
60                entry.setLargeIcon(entry.getSmallIcon());
61                return entry;
62        }
63 
64        /**
65         * @generated
66         */
67        private ToolEntry createLinkingResource2CreationTool() {
68                List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1);
69                types.add(PalladioComponentModelElementTypes.LinkingResource_2003);
70                NodeToolEntry entry = new NodeToolEntry(
71                                Messages.LinkingResource2CreationTool_title,
72                                Messages.LinkingResource2CreationTool_desc, types);
73                entry.setId("createLinkingResource2CreationTool"); //$NON-NLS-1$
74                entry
75                                .setSmallIcon(PalladioComponentModelElementTypes
76                                                .getImageDescriptor(PalladioComponentModelElementTypes.LinkingResource_2003));
77                entry.setLargeIcon(entry.getSmallIcon());
78                return entry;
79        }
80 
81        /**
82         * @generated
83         */
84        private ToolEntry createProcessingResourceSpecification3CreationTool() {
85                List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1);
86                types
87                                .add(PalladioComponentModelElementTypes.ProcessingResourceSpecification_3001);
88                NodeToolEntry entry = new NodeToolEntry(
89                                Messages.ProcessingResourceSpecification3CreationTool_title,
90                                Messages.ProcessingResourceSpecification3CreationTool_desc,
91                                types);
92                entry.setId("createProcessingResourceSpecification3CreationTool"); //$NON-NLS-1$
93                entry
94                                .setSmallIcon(PalladioComponentModelElementTypes
95                                                .getImageDescriptor(PalladioComponentModelElementTypes.ProcessingResourceSpecification_3001));
96                entry.setLargeIcon(entry.getSmallIcon());
97                return entry;
98        }
99 
100        /**
101         * @generated
102         */
103        private ToolEntry createConnection4CreationTool() {
104                List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1);
105                types
106                                .add(PalladioComponentModelElementTypes.LinkingResourceConnectedResourceContainers_LinkingResource_4002);
107                LinkToolEntry entry = new LinkToolEntry(
108                                Messages.Connection4CreationTool_title,
109                                Messages.Connection4CreationTool_desc, types);
110                entry.setId("createConnection4CreationTool"); //$NON-NLS-1$
111                entry
112                                .setSmallIcon(PalladioComponentModelDiagramEditorPlugin
113                                                .findImageDescriptor("/de.uka.ipd.sdq.pcm.edit/icons/full/obj16/CommunicationLink.gif")); //$NON-NLS-1$
114                entry
115                                .setLargeIcon(PalladioComponentModelDiagramEditorPlugin
116                                                .findImageDescriptor("/de.uka.ipd.sdq.pcm.edit/icons/full/obj16/CommunicationLink.gif")); //$NON-NLS-1$
117                return entry;
118        }
119 
120        /**
121         * @generated
122         */
123        private static class NodeToolEntry extends ToolEntry {
124 
125                /**
126                 * @generated
127                 */
128                private final List elementTypes;
129 
130                /**
131                 * @generated
132                 */
133                private NodeToolEntry(String title, String description,
134                                List elementTypes) {
135                        super(title, description, null, null);
136                        this.elementTypes = elementTypes;
137                }
138 
139                /**
140                 * @generated
141                 */
142                public Tool createTool() {
143                        Tool tool = new UnspecifiedTypeCreationTool(elementTypes);
144                        tool.setProperties(getToolProperties());
145                        return tool;
146                }
147        }
148 
149        /**
150         * @generated
151         */
152        private static class LinkToolEntry extends ToolEntry {
153 
154                /**
155                 * @generated
156                 */
157                private final List relationshipTypes;
158 
159                /**
160                 * @generated
161                 */
162                private LinkToolEntry(String title, String description,
163                                List relationshipTypes) {
164                        super(title, description, null, null);
165                        this.relationshipTypes = relationshipTypes;
166                }
167 
168                /**
169                 * @generated
170                 */
171                public Tool createTool() {
172                        Tool tool = new UnspecifiedTypeConnectionTool(relationshipTypes);
173                        tool.setProperties(getToolProperties());
174                        return tool;
175                }
176        }
177}

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