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 [AllocationItemSemanticEditPolicy.java]

nameclass, %method, %block, %line, %
AllocationItemSemanticEditPolicy.java0%   (0/2)0%   (0/4)0%   (0/41)0%   (0/12)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class AllocationItemSemanticEditPolicy0%   (0/1)0%   (0/3)0%   (0/31)0%   (0/8)
AllocationItemSemanticEditPolicy (): void 0%   (0/1)0%   (0/3)0%   (0/1)
getCreateCommand (CreateElementRequest): Command 0%   (0/1)0%   (0/15)0%   (0/4)
getDuplicateCommand (DuplicateElementsRequest): Command 0%   (0/1)0%   (0/13)0%   (0/3)
     
class AllocationItemSemanticEditPolicy$DuplicateAnythingCommand0%   (0/1)0%   (0/1)0%   (0/10)0%   (0/4)
AllocationItemSemanticEditPolicy$DuplicateAnythingCommand (TransactionalEditi... 0%   (0/1)0%   (0/10)0%   (0/4)

1/*
2 *Copyright 2007, SDQ, IPD, U KA
3 */
4package de.uka.ipd.sdq.pcm.gmf.allocation.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.DuplicateElementsRequest;
11import de.uka.ipd.sdq.pcm.gmf.allocation.edit.commands.ResourceContainerCreateCommand;
12 
13import de.uka.ipd.sdq.pcm.gmf.allocation.providers.PalladioComponentModelElementTypes;
14 
15import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
16 
17/**
18 * @generated
19 */
20public class AllocationItemSemanticEditPolicy extends
21                PalladioComponentModelBaseItemSemanticEditPolicy {
22 
23        /**
24         * @generated
25         */
26        protected Command getCreateCommand(CreateElementRequest req) {
27                if (PalladioComponentModelElementTypes.ResourceContainer_2002 == req
28                                .getElementType()) {
29                        return getGEFWrapper(new ResourceContainerCreateCommand(req));
30                }
31                return super.getCreateCommand(req);
32        }
33 
34        /**
35         * @generated
36         */
37        protected Command getDuplicateCommand(DuplicateElementsRequest req) {
38                TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost())
39                                .getEditingDomain();
40                return getGEFWrapper(new DuplicateAnythingCommand(editingDomain, req));
41        }
42 
43        /**
44         * @generated
45         */
46        private static class DuplicateAnythingCommand extends
47                        DuplicateEObjectsCommand {
48 
49                /**
50                 * @generated
51                 */
52                public DuplicateAnythingCommand(
53                                TransactionalEditingDomain editingDomain,
54                                DuplicateElementsRequest req) {
55                        super(editingDomain, req.getLabel(), req
56                                        .getElementsToBeDuplicated(), req
57                                        .getAllDuplicatedElementsMap());
58                }
59        }
60}

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