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

nameclass, %method, %block, %line, %
PalladioComponentModelDiagramUpdater.java0%   (0/1)0%   (0/23)0%   (0/373)0%   (0/139)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class PalladioComponentModelDiagramUpdater0%   (0/1)0%   (0/23)0%   (0/373)0%   (0/139)
PalladioComponentModelDiagramUpdater (): void 0%   (0/1)0%   (0/3)0%   (0/1)
getCommunicationLinkResourceSpecification_3002ContainedLinks (View): List 0%   (0/1)0%   (0/2)0%   (0/1)
getCommunicationLinkResourceSpecification_3002IncomingLinks (View): List 0%   (0/1)0%   (0/2)0%   (0/1)
getCommunicationLinkResourceSpecification_3002OutgoingLinks (View): List 0%   (0/1)0%   (0/2)0%   (0/1)
getContainedLinks (View): List 0%   (0/1)0%   (0/20)0%   (0/7)
getIncomingFeatureModelFacetLinks_LinkingResource_ConnectedResourceContainers... 0%   (0/1)0%   (0/38)0%   (0/14)
getIncomingLinks (View): List 0%   (0/1)0%   (0/17)0%   (0/6)
getLinkingResourceNetworkSwitchCompartment_7003SemanticChildren (View): List 0%   (0/1)0%   (0/43)0%   (0/16)
getLinkingResource_2003ContainedLinks (View): List 0%   (0/1)0%   (0/15)0%   (0/5)
getLinkingResource_2003IncomingLinks (View): List 0%   (0/1)0%   (0/2)0%   (0/1)
getLinkingResource_2003OutgoingLinks (View): List 0%   (0/1)0%   (0/15)0%   (0/5)
getOutgoingFeatureModelFacetLinks_LinkingResource_ConnectedResourceContainers... 0%   (0/1)0%   (0/28)0%   (0/13)
getOutgoingLinks (View): List 0%   (0/1)0%   (0/17)0%   (0/6)
getProcessingResourceSpecification_3001ContainedLinks (View): List 0%   (0/1)0%   (0/2)0%   (0/1)
getProcessingResourceSpecification_3001IncomingLinks (View): List 0%   (0/1)0%   (0/2)0%   (0/1)
getProcessingResourceSpecification_3001OutgoingLinks (View): List 0%   (0/1)0%   (0/2)0%   (0/1)
getResourceContainerResourceContainerCompartment_7001SemanticChildren (View):... 0%   (0/1)0%   (0/52)0%   (0/19)
getResourceContainer_2001ContainedLinks (View): List 0%   (0/1)0%   (0/2)0%   (0/1)
getResourceContainer_2001IncomingLinks (View): List 0%   (0/1)0%   (0/22)0%   (0/8)
getResourceContainer_2001OutgoingLinks (View): List 0%   (0/1)0%   (0/2)0%   (0/1)
getResourceEnvironment_1000ContainedLinks (View): List 0%   (0/1)0%   (0/2)0%   (0/1)
getResourceEnvironment_1000SemanticChildren (View): List 0%   (0/1)0%   (0/69)0%   (0/24)
getSemanticChildren (View): List 0%   (0/1)0%   (0/14)0%   (0/5)

1/*
2 * Copyright 2009, SDQ, IPD, Uni Karlsruhe (TH)
3 */
4package de.uka.ipd.sdq.pcm.gmf.resource.part;
5 
6import java.util.Collection;
7import java.util.Collections;
8import java.util.Iterator;
9import java.util.LinkedList;
10import java.util.List;
11import java.util.Map;
12 
13import org.eclipse.emf.ecore.EStructuralFeature;
14import org.eclipse.emf.ecore.util.EcoreUtil;
15import org.eclipse.gmf.runtime.notation.View;
16 
17import de.uka.ipd.sdq.pcm.gmf.resource.edit.parts.CommunicationLinkResourceSpecificationEditPart;
18import de.uka.ipd.sdq.pcm.gmf.resource.edit.parts.LinkingResource2EditPart;
19import de.uka.ipd.sdq.pcm.gmf.resource.edit.parts.LinkingResourceConnectedResourceContainers_LinkingResourceEditPart;
20import de.uka.ipd.sdq.pcm.gmf.resource.edit.parts.LinkingResourceNetworkSwitchCompartmentEditPart;
21import de.uka.ipd.sdq.pcm.gmf.resource.edit.parts.ProcessingResourceSpecificationEditPart;
22import de.uka.ipd.sdq.pcm.gmf.resource.edit.parts.ResourceContainerEditPart;
23import de.uka.ipd.sdq.pcm.gmf.resource.edit.parts.ResourceContainerResourceContainerCompartmentEditPart;
24import de.uka.ipd.sdq.pcm.gmf.resource.edit.parts.ResourceEnvironmentEditPart;
25import de.uka.ipd.sdq.pcm.gmf.resource.providers.PalladioComponentModelElementTypes;
26import de.uka.ipd.sdq.pcm.resourceenvironment.CommunicationLinkResourceSpecification;
27import de.uka.ipd.sdq.pcm.resourceenvironment.LinkingResource;
28import de.uka.ipd.sdq.pcm.resourceenvironment.ProcessingResourceSpecification;
29import de.uka.ipd.sdq.pcm.resourceenvironment.ResourceContainer;
30import de.uka.ipd.sdq.pcm.resourceenvironment.ResourceEnvironment;
31import de.uka.ipd.sdq.pcm.resourceenvironment.ResourceenvironmentPackage;
32 
33/**
34 * @generated
35 */
36public class PalladioComponentModelDiagramUpdater {
37 
38        /**
39         * @generated
40         */
41        public static List getSemanticChildren(View view) {
42                switch (PalladioComponentModelVisualIDRegistry.getVisualID(view)) {
43                case ResourceContainerResourceContainerCompartmentEditPart.VISUAL_ID:
44                        return getResourceContainerResourceContainerCompartment_7001SemanticChildren(view);
45                case LinkingResourceNetworkSwitchCompartmentEditPart.VISUAL_ID:
46                        return getLinkingResourceNetworkSwitchCompartment_7003SemanticChildren(view);
47                case ResourceEnvironmentEditPart.VISUAL_ID:
48                        return getResourceEnvironment_1000SemanticChildren(view);
49                }
50                return Collections.EMPTY_LIST;
51        }
52 
53        /**
54         * @generated
55         */
56        public static List getResourceContainerResourceContainerCompartment_7001SemanticChildren(
57                        View view) {
58                if (false == view.eContainer() instanceof View) {
59                        return Collections.EMPTY_LIST;
60                }
61                View containerView = (View) view.eContainer();
62                if (!containerView.isSetElement()) {
63                        return Collections.EMPTY_LIST;
64                }
65                ResourceContainer modelElement = (ResourceContainer) containerView
66                                .getElement();
67                List result = new LinkedList();
68                for (Iterator it = modelElement
69                                .getActiveResourceSpecifications_ResourceContainer().iterator(); it
70                                .hasNext();) {
71                        ProcessingResourceSpecification childElement = (ProcessingResourceSpecification) it
72                                        .next();
73                        int visualID = PalladioComponentModelVisualIDRegistry
74                                        .getNodeVisualID(view, childElement);
75                        if (visualID == ProcessingResourceSpecificationEditPart.VISUAL_ID) {
76                                result.add(new PalladioComponentModelNodeDescriptor(
77                                                childElement, visualID));
78                                continue;
79                        }
80                }
81                return result;
82        }
83 
84        /**
85         * @generated
86         */
87        public static List getLinkingResourceNetworkSwitchCompartment_7003SemanticChildren(
88                        View view) {
89                if (false == view.eContainer() instanceof View) {
90                        return Collections.EMPTY_LIST;
91                }
92                View containerView = (View) view.eContainer();
93                if (!containerView.isSetElement()) {
94                        return Collections.EMPTY_LIST;
95                }
96                LinkingResource modelElement = (LinkingResource) containerView
97                                .getElement();
98                List result = new LinkedList();
99                {
100                        CommunicationLinkResourceSpecification childElement = modelElement
101                                        .getCommunicationLinkResourceSpecifications_LinkingResource();
102                        int visualID = PalladioComponentModelVisualIDRegistry
103                                        .getNodeVisualID(view, childElement);
104                        if (visualID == CommunicationLinkResourceSpecificationEditPart.VISUAL_ID) {
105                                result.add(new PalladioComponentModelNodeDescriptor(
106                                                childElement, visualID));
107                        }
108                }
109                return result;
110        }
111 
112        /**
113         * @generated
114         */
115        public static List getResourceEnvironment_1000SemanticChildren(View view) {
116                if (!view.isSetElement()) {
117                        return Collections.EMPTY_LIST;
118                }
119                ResourceEnvironment modelElement = (ResourceEnvironment) view
120                                .getElement();
121                List result = new LinkedList();
122                for (Iterator it = modelElement
123                                .getResourceContainer_ResourceEnvironment().iterator(); it
124                                .hasNext();) {
125                        ResourceContainer childElement = (ResourceContainer) it.next();
126                        int visualID = PalladioComponentModelVisualIDRegistry
127                                        .getNodeVisualID(view, childElement);
128                        if (visualID == ResourceContainerEditPart.VISUAL_ID) {
129                                result.add(new PalladioComponentModelNodeDescriptor(
130                                                childElement, visualID));
131                                continue;
132                        }
133                }
134                for (Iterator it = modelElement
135                                .getLinkingResources__ResourceEnvironment().iterator(); it
136                                .hasNext();) {
137                        LinkingResource childElement = (LinkingResource) it.next();
138                        int visualID = PalladioComponentModelVisualIDRegistry
139                                        .getNodeVisualID(view, childElement);
140                        if (visualID == LinkingResource2EditPart.VISUAL_ID) {
141                                result.add(new PalladioComponentModelNodeDescriptor(
142                                                childElement, visualID));
143                                continue;
144                        }
145                }
146                return result;
147        }
148 
149        /**
150         * @generated
151         */
152        public static List getContainedLinks(View view) {
153                switch (PalladioComponentModelVisualIDRegistry.getVisualID(view)) {
154                case ResourceEnvironmentEditPart.VISUAL_ID:
155                        return getResourceEnvironment_1000ContainedLinks(view);
156                case ResourceContainerEditPart.VISUAL_ID:
157                        return getResourceContainer_2001ContainedLinks(view);
158                case LinkingResource2EditPart.VISUAL_ID:
159                        return getLinkingResource_2003ContainedLinks(view);
160                case ProcessingResourceSpecificationEditPart.VISUAL_ID:
161                        return getProcessingResourceSpecification_3001ContainedLinks(view);
162                case CommunicationLinkResourceSpecificationEditPart.VISUAL_ID:
163                        return getCommunicationLinkResourceSpecification_3002ContainedLinks(view);
164                }
165                return Collections.EMPTY_LIST;
166        }
167 
168        /**
169         * @generated
170         */
171        public static List getIncomingLinks(View view) {
172                switch (PalladioComponentModelVisualIDRegistry.getVisualID(view)) {
173                case ResourceContainerEditPart.VISUAL_ID:
174                        return getResourceContainer_2001IncomingLinks(view);
175                case LinkingResource2EditPart.VISUAL_ID:
176                        return getLinkingResource_2003IncomingLinks(view);
177                case ProcessingResourceSpecificationEditPart.VISUAL_ID:
178                        return getProcessingResourceSpecification_3001IncomingLinks(view);
179                case CommunicationLinkResourceSpecificationEditPart.VISUAL_ID:
180                        return getCommunicationLinkResourceSpecification_3002IncomingLinks(view);
181                }
182                return Collections.EMPTY_LIST;
183        }
184 
185        /**
186         * @generated
187         */
188        public static List getOutgoingLinks(View view) {
189                switch (PalladioComponentModelVisualIDRegistry.getVisualID(view)) {
190                case ResourceContainerEditPart.VISUAL_ID:
191                        return getResourceContainer_2001OutgoingLinks(view);
192                case LinkingResource2EditPart.VISUAL_ID:
193                        return getLinkingResource_2003OutgoingLinks(view);
194                case ProcessingResourceSpecificationEditPart.VISUAL_ID:
195                        return getProcessingResourceSpecification_3001OutgoingLinks(view);
196                case CommunicationLinkResourceSpecificationEditPart.VISUAL_ID:
197                        return getCommunicationLinkResourceSpecification_3002OutgoingLinks(view);
198                }
199                return Collections.EMPTY_LIST;
200        }
201 
202        /**
203         * @generated
204         */
205        public static List getResourceEnvironment_1000ContainedLinks(View view) {
206                return Collections.EMPTY_LIST;
207        }
208 
209        /**
210         * @generated
211         */
212        public static List getResourceContainer_2001ContainedLinks(View view) {
213                return Collections.EMPTY_LIST;
214        }
215 
216        /**
217         * @generated
218         */
219        public static List getLinkingResource_2003ContainedLinks(View view) {
220                LinkingResource modelElement = (LinkingResource) view.getElement();
221                List result = new LinkedList();
222                result
223                                .addAll(getOutgoingFeatureModelFacetLinks_LinkingResource_ConnectedResourceContainers_LinkingResource_4002(modelElement));
224                return result;
225        }
226 
227        /**
228         * @generated
229         */
230        public static List getProcessingResourceSpecification_3001ContainedLinks(
231                        View view) {
232                return Collections.EMPTY_LIST;
233        }
234 
235        /**
236         * @generated
237         */
238        public static List getCommunicationLinkResourceSpecification_3002ContainedLinks(
239                        View view) {
240                return Collections.EMPTY_LIST;
241        }
242 
243        /**
244         * @generated
245         */
246        public static List getResourceContainer_2001IncomingLinks(View view) {
247                ResourceContainer modelElement = (ResourceContainer) view.getElement();
248                Map crossReferences = EcoreUtil.CrossReferencer.find(view.eResource()
249                                .getResourceSet().getResources());
250                List result = new LinkedList();
251                result
252                                .addAll(getIncomingFeatureModelFacetLinks_LinkingResource_ConnectedResourceContainers_LinkingResource_4002(
253                                                modelElement, crossReferences));
254                return result;
255        }
256 
257        /**
258         * @generated
259         */
260        public static List getLinkingResource_2003IncomingLinks(View view) {
261                return Collections.EMPTY_LIST;
262        }
263 
264        /**
265         * @generated
266         */
267        public static List getProcessingResourceSpecification_3001IncomingLinks(
268                        View view) {
269                return Collections.EMPTY_LIST;
270        }
271 
272        /**
273         * @generated
274         */
275        public static List getCommunicationLinkResourceSpecification_3002IncomingLinks(
276                        View view) {
277                return Collections.EMPTY_LIST;
278        }
279 
280        /**
281         * @generated
282         */
283        public static List getResourceContainer_2001OutgoingLinks(View view) {
284                return Collections.EMPTY_LIST;
285        }
286 
287        /**
288         * @generated
289         */
290        public static List getLinkingResource_2003OutgoingLinks(View view) {
291                LinkingResource modelElement = (LinkingResource) view.getElement();
292                List result = new LinkedList();
293                result
294                                .addAll(getOutgoingFeatureModelFacetLinks_LinkingResource_ConnectedResourceContainers_LinkingResource_4002(modelElement));
295                return result;
296        }
297 
298        /**
299         * @generated
300         */
301        public static List getProcessingResourceSpecification_3001OutgoingLinks(
302                        View view) {
303                return Collections.EMPTY_LIST;
304        }
305 
306        /**
307         * @generated
308         */
309        public static List getCommunicationLinkResourceSpecification_3002OutgoingLinks(
310                        View view) {
311                return Collections.EMPTY_LIST;
312        }
313 
314        /**
315         * @generated
316         */
317        private static Collection getIncomingFeatureModelFacetLinks_LinkingResource_ConnectedResourceContainers_LinkingResource_4002(
318                        ResourceContainer target, Map crossReferences) {
319                Collection result = new LinkedList();
320                Collection settings = (Collection) crossReferences.get(target);
321                for (Iterator it = settings.iterator(); it.hasNext();) {
322                        EStructuralFeature.Setting setting = (EStructuralFeature.Setting) it
323                                        .next();
324                        if (setting.getEStructuralFeature() == ResourceenvironmentPackage.eINSTANCE
325                                        .getLinkingResource_ConnectedResourceContainers_LinkingResource()) {
326                                result
327                                                .add(new PalladioComponentModelLinkDescriptor(
328                                                                setting.getEObject(),
329                                                                target,
330                                                                PalladioComponentModelElementTypes.LinkingResourceConnectedResourceContainers_LinkingResource_4002,
331                                                                LinkingResourceConnectedResourceContainers_LinkingResourceEditPart.VISUAL_ID));
332                        }
333                }
334                return result;
335        }
336 
337        /**
338         * @generated
339         */
340        private static Collection getOutgoingFeatureModelFacetLinks_LinkingResource_ConnectedResourceContainers_LinkingResource_4002(
341                        LinkingResource source) {
342                Collection result = new LinkedList();
343                for (Iterator destinations = source
344                                .getConnectedResourceContainers_LinkingResource().iterator(); destinations
345                                .hasNext();) {
346                        ResourceContainer destination = (ResourceContainer) destinations
347                                        .next();
348                        result
349                                        .add(new PalladioComponentModelLinkDescriptor(
350                                                        source,
351                                                        destination,
352                                                        PalladioComponentModelElementTypes.LinkingResourceConnectedResourceContainers_LinkingResource_4002,
353                                                        LinkingResourceConnectedResourceContainers_LinkingResourceEditPart.VISUAL_ID));
354                }
355                return result;
356        }
357 
358}

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