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

COVERAGE SUMMARY FOR SOURCE FILE [AllocationContextCreateCommand.java]

nameclass, %method, %block, %line, %
AllocationContextCreateCommand.java0%   (0/1)0%   (0/5)0%   (0/39)0%   (0/16)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class AllocationContextCreateCommand0%   (0/1)0%   (0/5)0%   (0/39)0%   (0/16)
AllocationContextCreateCommand (CreateElementRequest): void 0%   (0/1)0%   (0/4)0%   (0/2)
AllocationContextCreateCommand (CreateElementRequest, Allocation): void 0%   (0/1)0%   (0/7)0%   (0/3)
doDefaultElementCreation (): EObject 0%   (0/1)0%   (0/13)0%   (0/6)
getEClassToEdit (): EClass 0%   (0/1)0%   (0/3)0%   (0/1)
getElementToEdit (): EObject 0%   (0/1)0%   (0/12)0%   (0/4)

1/*
2 *Copyright 2007, SDQ, IPD, U KA
3 */
4package de.uka.ipd.sdq.pcm.gmf.allocation.edit.commands;
5 
6import de.uka.ipd.sdq.pcm.allocation.Allocation;
7import de.uka.ipd.sdq.pcm.allocation.AllocationContext;
8import de.uka.ipd.sdq.pcm.allocation.AllocationPackage;
9import de.uka.ipd.sdq.pcm.resourceenvironment.ResourceContainer;
10 
11import org.eclipse.emf.ecore.EClass;
12import org.eclipse.emf.ecore.EObject;
13 
14import org.eclipse.gmf.runtime.emf.type.core.commands.CreateElementCommand;
15 
16import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
17 
18import org.eclipse.gmf.runtime.notation.View;
19 
20/**
21 * @generated
22 */
23public class AllocationContextCreateCommand extends CreateElementCommand {
24 
25        /**
26         * @generated
27         */
28        public AllocationContextCreateCommand(CreateElementRequest req) {
29                super(req);
30        }
31 
32        private Allocation allocation;
33 
34        /**
35         * @generated not
36         */
37        public AllocationContextCreateCommand(CreateElementRequest req, Allocation a) {
38                super(req);
39                this.allocation = a;
40        }
41 
42        /**
43         * @generated
44         */
45        protected EClass getEClassToEdit() {
46                return AllocationPackage.eINSTANCE.getAllocation();
47        }
48 
49        /**
50         * @generated not
51         */
52        protected EObject getElementToEdit() {
53                EObject container = allocation;
54                if (container instanceof View) {
55                        container = ((View) container).getElement();
56                }
57                return container;
58        }
59 
60        @Override
61        protected EObject doDefaultElementCreation() {
62                AllocationContext ctx = (AllocationContext) super
63                                .doDefaultElementCreation();
64                ctx
65                                .setResourceContainer_AllocationContext((ResourceContainer) ((CreateElementRequest) this
66                                                .getRequest()).getContainer());
67                return ctx;
68        }
69 
70}

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