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

COVERAGE SUMMARY FOR SOURCE FILE [ComposedProvidingRequiringEntityCompositeStructureInnerCompartmentCanonicalEditPolicy.java]

nameclass, %method, %block, %line, %
ComposedProvidingRequiringEntityCompositeStructureInnerCompartmentCanonicalEditPolicy.java0%   (0/1)0%   (0/5)0%   (0/79)0%   (0/24)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ComposedProvidingRequiringEntityCompositeStructureInnerCompartmentCanonicalEditPolicy0%   (0/1)0%   (0/5)0%   (0/79)0%   (0/24)
ComposedProvidingRequiringEntityCompositeStructureInnerCompartmentCanonicalEd... 0%   (0/1)0%   (0/3)0%   (0/1)
getDefaultFactoryHint (): String 0%   (0/1)0%   (0/2)0%   (0/1)
getFeaturesToSynchronize (): Set 0%   (0/1)0%   (0/17)0%   (0/6)
getSemanticChildrenList (): List 0%   (0/1)0%   (0/43)0%   (0/11)
isOrphaned (Collection, View): boolean 0%   (0/1)0%   (0/14)0%   (0/5)

1/*
2 *Copyright 2007, SDQ, IPD, Uni Karlsruhe (TH)
3 */
4package de.uka.ipd.sdq.pcm.gmf.composite.edit.policies;
5 
6import java.util.Collection;
7import java.util.HashSet;
8import java.util.Iterator;
9import java.util.LinkedList;
10import java.util.List;
11import java.util.Set;
12 
13import org.eclipse.emf.ecore.EObject;
14import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
15import org.eclipse.gmf.runtime.notation.View;
16 
17import de.uka.ipd.sdq.pcm.core.composition.AssemblyContext;
18import de.uka.ipd.sdq.pcm.core.composition.ComposedStructure;
19import de.uka.ipd.sdq.pcm.core.entity.EntityPackage;
20import de.uka.ipd.sdq.pcm.gmf.composite.edit.parts.AssemblyContextEditPart;
21import de.uka.ipd.sdq.pcm.gmf.composite.part.PalladioComponentModelDiagramUpdater;
22import de.uka.ipd.sdq.pcm.gmf.composite.part.PalladioComponentModelNodeDescriptor;
23import de.uka.ipd.sdq.pcm.gmf.composite.part.PalladioComponentModelVisualIDRegistry;
24 
25/**
26 * @generated
27 */
28public class ComposedProvidingRequiringEntityCompositeStructureInnerCompartmentCanonicalEditPolicy
29                extends CanonicalEditPolicy {
30 
31        /**
32         * @generated
33         */
34        Set myFeaturesToSynchronize;
35 
36        /**
37         * @generated not
38         */
39        protected List getSemanticChildrenList() {
40                View viewObject = (View) getHost().getModel();
41                EObject modelObject = viewObject.getElement();
42                List result = new LinkedList();
43 
44                if (modelObject != null && modelObject instanceof ComposedStructure) {
45                        for (AssemblyContext assemblyContext : ((ComposedStructure) modelObject)
46                                        .getAssemblyContexts__ComposedStructure()) {
47 
48                                int assemblyNodeVID = PalladioComponentModelVisualIDRegistry
49                                                .getNodeVisualID(viewObject, assemblyContext);
50                                if (AssemblyContextEditPart.VISUAL_ID == assemblyNodeVID) {
51                                        result.add(assemblyContext);
52                                }
53                        }
54                }
55                return result;
56        }
57 
58        /**
59         * @generated
60         */
61        protected boolean isOrphaned(Collection semanticChildren, final View view) {
62                int visualID = PalladioComponentModelVisualIDRegistry.getVisualID(view);
63                switch (visualID) {
64                case AssemblyContextEditPart.VISUAL_ID:
65                        if (!semanticChildren.contains(view.getElement())) {
66                                return true;
67                        }
68                }
69                return false;
70        }
71 
72        /**
73         * @generated
74         */
75        protected String getDefaultFactoryHint() {
76                return null;
77        }
78 
79        /**
80         * @generated
81         */
82        protected Set getFeaturesToSynchronize() {
83                if (myFeaturesToSynchronize == null) {
84                        myFeaturesToSynchronize = new HashSet();
85                        myFeaturesToSynchronize
86                                        .add(EntityPackage.eINSTANCE
87                                                        .getInterfaceProvidingEntity_ProvidedRoles_InterfaceProvidingEntity());
88                }
89                return myFeaturesToSynchronize;
90        }
91 
92}

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