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

COVERAGE SUMMARY FOR SOURCE FILE [ResourceDemandingSEFFItemSemanticEditPolicy.java]

nameclass, %method, %block, %line, %
ResourceDemandingSEFFItemSemanticEditPolicy.java0%   (0/2)0%   (0/4)0%   (0/174)0%   (0/49)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ResourceDemandingSEFFItemSemanticEditPolicy0%   (0/1)0%   (0/3)0%   (0/164)0%   (0/45)
ResourceDemandingSEFFItemSemanticEditPolicy (): void 0%   (0/1)0%   (0/4)0%   (0/2)
getCreateCommand (CreateElementRequest): Command 0%   (0/1)0%   (0/147)0%   (0/40)
getDuplicateCommand (DuplicateElementsRequest): Command 0%   (0/1)0%   (0/13)0%   (0/3)
     
class ResourceDemandingSEFFItemSemanticEditPolicy$DuplicateAnythingCommand0%   (0/1)0%   (0/1)0%   (0/10)0%   (0/4)
ResourceDemandingSEFFItemSemanticEditPolicy$DuplicateAnythingCommand (Transac... 0%   (0/1)0%   (0/10)0%   (0/4)

1/*
2 *Copyright 2006 SDQ Research Group, University of Karlsruhe (TH)
3 */
4package de.uka.ipd.sdq.pcm.gmf.seff.edit.policies;
5 
6import org.eclipse.emf.transaction.TransactionalEditingDomain;
7import org.eclipse.gef.commands.Command;
8import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
9import org.eclipse.gmf.runtime.emf.commands.core.commands.DuplicateEObjectsCommand;
10import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
11import org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest;
12 
13import de.uka.ipd.sdq.pcm.gmf.seff.edit.commands.AcquireActionCreateCommand;
14import de.uka.ipd.sdq.pcm.gmf.seff.edit.commands.BranchActionCreateCommand;
15import de.uka.ipd.sdq.pcm.gmf.seff.edit.commands.CollectionIteratorActionCreateCommand;
16import de.uka.ipd.sdq.pcm.gmf.seff.edit.commands.EmitEventActionCreateCommand;
17import de.uka.ipd.sdq.pcm.gmf.seff.edit.commands.ExternalCallActionCreateCommand;
18import de.uka.ipd.sdq.pcm.gmf.seff.edit.commands.ForkActionCreateCommand;
19import de.uka.ipd.sdq.pcm.gmf.seff.edit.commands.InternalActionCreateCommand;
20import de.uka.ipd.sdq.pcm.gmf.seff.edit.commands.LoopActionCreateCommand;
21import de.uka.ipd.sdq.pcm.gmf.seff.edit.commands.RecoveryActionCreateCommand;
22import de.uka.ipd.sdq.pcm.gmf.seff.edit.commands.ReleaseActionCreateCommand;
23import de.uka.ipd.sdq.pcm.gmf.seff.edit.commands.SetVariableActionCreateCommand;
24import de.uka.ipd.sdq.pcm.gmf.seff.edit.commands.StartActionCreateCommand;
25import de.uka.ipd.sdq.pcm.gmf.seff.edit.commands.StopActionCreateCommand;
26import de.uka.ipd.sdq.pcm.gmf.seff.providers.PalladioComponentModelElementTypes;
27 
28/**
29 * @generated
30 */
31public class ResourceDemandingSEFFItemSemanticEditPolicy extends
32                PalladioComponentModelBaseItemSemanticEditPolicy {
33 
34        /**
35         * @generated
36         */
37        public ResourceDemandingSEFFItemSemanticEditPolicy() {
38                super(PalladioComponentModelElementTypes.ResourceDemandingSEFF_1000);
39        }
40 
41        /**
42         * @generated
43         */
44        protected Command getCreateCommand(CreateElementRequest req) {
45                if (PalladioComponentModelElementTypes.StartAction_2001 == req
46                                .getElementType()) {
47                        return getGEFWrapper(new StartActionCreateCommand(req));
48                }
49                if (PalladioComponentModelElementTypes.StopAction_2002 == req
50                                .getElementType()) {
51                        return getGEFWrapper(new StopActionCreateCommand(req));
52                }
53                if (PalladioComponentModelElementTypes.ExternalCallAction_2003 == req
54                                .getElementType()) {
55                        return getGEFWrapper(new ExternalCallActionCreateCommand(req));
56                }
57                if (PalladioComponentModelElementTypes.EmitEventAction_2013 == req
58                                .getElementType()) {
59                        return getGEFWrapper(new EmitEventActionCreateCommand(req));
60                }
61                if (PalladioComponentModelElementTypes.LoopAction_2004 == req
62                                .getElementType()) {
63                        return getGEFWrapper(new LoopActionCreateCommand(req));
64                }
65                if (PalladioComponentModelElementTypes.BranchAction_2005 == req
66                                .getElementType()) {
67                        return getGEFWrapper(new BranchActionCreateCommand(req));
68                }
69                if (PalladioComponentModelElementTypes.InternalAction_2006 == req
70                                .getElementType()) {
71                        return getGEFWrapper(new InternalActionCreateCommand(req));
72                }
73                if (PalladioComponentModelElementTypes.CollectionIteratorAction_2007 == req
74                                .getElementType()) {
75                        return getGEFWrapper(new CollectionIteratorActionCreateCommand(req));
76                }
77                if (PalladioComponentModelElementTypes.SetVariableAction_2008 == req
78                                .getElementType()) {
79                        return getGEFWrapper(new SetVariableActionCreateCommand(req));
80                }
81                if (PalladioComponentModelElementTypes.AcquireAction_2012 == req
82                                .getElementType()) {
83                        return getGEFWrapper(new AcquireActionCreateCommand(req));
84                }
85                if (PalladioComponentModelElementTypes.ReleaseAction_2010 == req
86                                .getElementType()) {
87                        return getGEFWrapper(new ReleaseActionCreateCommand(req));
88                }
89                if (PalladioComponentModelElementTypes.ForkAction_2011 == req
90                                .getElementType()) {
91                        return getGEFWrapper(new ForkActionCreateCommand(req));
92                }
93                if (PalladioComponentModelElementTypes.RecoveryAction_2016 == req
94                                .getElementType()) {
95                        return getGEFWrapper(new RecoveryActionCreateCommand(req));
96                }
97                return super.getCreateCommand(req);
98        }
99 
100        /**
101         * @generated
102         */
103        protected Command getDuplicateCommand(DuplicateElementsRequest req) {
104                TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost())
105                                .getEditingDomain();
106                return getGEFWrapper(new DuplicateAnythingCommand(editingDomain, req));
107        }
108 
109        /**
110         * @generated
111         */
112        private static class DuplicateAnythingCommand extends
113                        DuplicateEObjectsCommand {
114 
115                /**
116                 * @generated
117                 */
118                public DuplicateAnythingCommand(
119                                TransactionalEditingDomain editingDomain,
120                                DuplicateElementsRequest req) {
121                        super(editingDomain, req.getLabel(), req
122                                        .getElementsToBeDuplicated(), req
123                                        .getAllDuplicatedElementsMap());
124                }
125        }
126}

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