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

COVERAGE SUMMARY FOR SOURCE FILE [BasicComponentSEFFCompartmentCanonicalEditPolicy.java]

nameclass, %method, %block, %line, %
BasicComponentSEFFCompartmentCanonicalEditPolicy.java0%   (0/1)0%   (0/6)0%   (0/74)0%   (0/23)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class BasicComponentSEFFCompartmentCanonicalEditPolicy0%   (0/1)0%   (0/6)0%   (0/74)0%   (0/23)
BasicComponentSEFFCompartmentCanonicalEditPolicy (): void 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/26)0%   (0/8)
getViewDescriptor (IAdaptable, Class, String, int): CreateViewRequest$ViewDes... 0%   (0/1)0%   (0/12)0%   (0/2)
isOrphaned (Collection, View): boolean 0%   (0/1)0%   (0/14)0%   (0/5)

1/*
2 *Copyright 2007, IPD, SDQ, University of Karlsruhe
3 */
4package de.uka.ipd.sdq.pcm.gmf.repository.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.core.runtime.IAdaptable;
14import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
15import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
16import org.eclipse.gmf.runtime.notation.View;
17 
18import de.uka.ipd.sdq.pcm.gmf.repository.edit.parts.ResourceDemandingSEFFEditPart;
19import de.uka.ipd.sdq.pcm.gmf.repository.part.PalladioComponentModelDiagramUpdater;
20import de.uka.ipd.sdq.pcm.gmf.repository.part.PalladioComponentModelNodeDescriptor;
21import de.uka.ipd.sdq.pcm.gmf.repository.part.PalladioComponentModelVisualIDRegistry;
22import de.uka.ipd.sdq.pcm.repository.RepositoryPackage;
23 
24/**
25 * @generated
26 */
27public class BasicComponentSEFFCompartmentCanonicalEditPolicy extends
28                CanonicalEditPolicy {
29 
30        /**
31         * @generated
32         */
33        Set myFeaturesToSynchronize;
34 
35        /**
36         * @generated
37         */
38        protected List getSemanticChildrenList() {
39                View viewObject = (View) getHost().getModel();
40                List result = new LinkedList();
41                for (Iterator it = PalladioComponentModelDiagramUpdater
42                                .getBasicComponentSEFFCompartment_7102SemanticChildren(
43                                                viewObject).iterator(); it.hasNext();) {
44                        result.add(((PalladioComponentModelNodeDescriptor) it.next())
45                                        .getModelElement());
46                }
47                return result;
48        }
49 
50        /**
51         * @generated
52         */
53        protected boolean isOrphaned(Collection semanticChildren, final View view) {
54                int visualID = PalladioComponentModelVisualIDRegistry.getVisualID(view);
55                switch (visualID) {
56                case ResourceDemandingSEFFEditPart.VISUAL_ID:
57                        if (!semanticChildren.contains(view.getElement())) {
58                                return true;
59                        }
60                }
61                return false;
62        }
63 
64        /**
65         * @generated
66         */
67        protected String getDefaultFactoryHint() {
68                return null;
69        }
70 
71        /**
72         * @generated
73         */
74        protected Set getFeaturesToSynchronize() {
75                if (myFeaturesToSynchronize == null) {
76                        myFeaturesToSynchronize = new HashSet();
77                        myFeaturesToSynchronize
78                                        .add(RepositoryPackage.eINSTANCE
79                                                        .getBasicComponent_ServiceEffectSpecifications__BasicComponent());
80                }
81                return myFeaturesToSynchronize;
82        }
83 
84        protected CreateViewRequest.ViewDescriptor getViewDescriptor(
85                        IAdaptable elementAdapter, Class viewKind, String hint, int index) {
86 
87                return new CreateViewRequest.ViewDescriptor(elementAdapter, viewKind,
88                                hint, index, true, host().getDiagramPreferencesHint());
89        }
90}

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