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

COVERAGE SUMMARY FOR SOURCE FILE [ResourceContainerAllocationCompartmentItemSemanticEditPolicy.java]

nameclass, %method, %block, %line, %
ResourceContainerAllocationCompartmentItemSemanticEditPolicy.java0%   (0/1)0%   (0/2)0%   (0/35)0%   (0/10)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ResourceContainerAllocationCompartmentItemSemanticEditPolicy0%   (0/1)0%   (0/2)0%   (0/35)0%   (0/10)
ResourceContainerAllocationCompartmentItemSemanticEditPolicy (): void 0%   (0/1)0%   (0/3)0%   (0/1)
getCreateCommand (CreateElementRequest): Command 0%   (0/1)0%   (0/32)0%   (0/9)

1/*
2 *Copyright 2007, SDQ, IPD, U KA
3 */
4package de.uka.ipd.sdq.pcm.gmf.allocation.edit.policies;
5 
6import de.uka.ipd.sdq.pcm.allocation.Allocation;
7import de.uka.ipd.sdq.pcm.allocation.AllocationPackage;
8 
9import de.uka.ipd.sdq.pcm.gmf.allocation.edit.commands.AllocationContextCreateCommand;
10 
11import de.uka.ipd.sdq.pcm.gmf.allocation.providers.PalladioComponentModelElementTypes;
12 
13import org.eclipse.gef.commands.Command;
14 
15import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
16import org.eclipse.gmf.runtime.notation.View;
17 
18/**
19 * @generated
20 */
21public class ResourceContainerAllocationCompartmentItemSemanticEditPolicy
22                extends PalladioComponentModelBaseItemSemanticEditPolicy {
23 
24        /**
25         * @generated not
26         */
27        protected Command getCreateCommand(CreateElementRequest req) {
28                if (PalladioComponentModelElementTypes.AllocationContext_3001 == req
29                                .getElementType()) {
30                        if (req.getContainmentFeature() == null) {
31                                req.setContainmentFeature(AllocationPackage.eINSTANCE
32                                                .getAllocation_AllocationContexts_Allocation());
33                        }
34                        Allocation a = (Allocation) ((View) getHost().getParent()
35                                        .getParent().getModel()).getElement();
36                        return getMSLWrapper(new AllocationContextCreateCommand(req, a));
37                }
38                return super.getCreateCommand(req);
39        }
40}

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