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

COVERAGE SUMMARY FOR SOURCE FILE [ResourceEnvironmentItemSemanticEditPolicy.java]

nameclass, %method, %block, %line, %
ResourceEnvironmentItemSemanticEditPolicy.java0%   (0/2)0%   (0/4)0%   (0/53)0%   (0/16)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ResourceEnvironmentItemSemanticEditPolicy0%   (0/1)0%   (0/3)0%   (0/43)0%   (0/12)
ResourceEnvironmentItemSemanticEditPolicy (): void 0%   (0/1)0%   (0/4)0%   (0/2)
getCreateCommand (CreateElementRequest): Command 0%   (0/1)0%   (0/26)0%   (0/7)
getDuplicateCommand (DuplicateElementsRequest): Command 0%   (0/1)0%   (0/13)0%   (0/3)
     
class ResourceEnvironmentItemSemanticEditPolicy$DuplicateAnythingCommand0%   (0/1)0%   (0/1)0%   (0/10)0%   (0/4)
ResourceEnvironmentItemSemanticEditPolicy$DuplicateAnythingCommand (Transacti... 0%   (0/1)0%   (0/10)0%   (0/4)

1/*
2 * Copyright 2009, SDQ, IPD, Uni Karlsruhe (TH)
3 */
4package de.uka.ipd.sdq.pcm.gmf.resource.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.resource.edit.commands.LinkingResource2CreateCommand;
14import de.uka.ipd.sdq.pcm.gmf.resource.edit.commands.ResourceContainerCreateCommand;
15import de.uka.ipd.sdq.pcm.gmf.resource.providers.PalladioComponentModelElementTypes;
16 
17/**
18 * @generated
19 */
20public class ResourceEnvironmentItemSemanticEditPolicy extends
21                PalladioComponentModelBaseItemSemanticEditPolicy {
22 
23        /**
24         * @generated
25         */
26        public ResourceEnvironmentItemSemanticEditPolicy() {
27                super(PalladioComponentModelElementTypes.ResourceEnvironment_1000);
28        }
29 
30        /**
31         * @generated
32         */
33        protected Command getCreateCommand(CreateElementRequest req) {
34                if (PalladioComponentModelElementTypes.ResourceContainer_2001 == req
35                                .getElementType()) {
36                        return getGEFWrapper(new ResourceContainerCreateCommand(req));
37                }
38                if (PalladioComponentModelElementTypes.LinkingResource_2003 == req
39                                .getElementType()) {
40                        return getGEFWrapper(new LinkingResource2CreateCommand(req));
41                }
42                return super.getCreateCommand(req);
43        }
44 
45        /**
46         * @generated
47         */
48        protected Command getDuplicateCommand(DuplicateElementsRequest req) {
49                TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost())
50                                .getEditingDomain();
51                return getGEFWrapper(new DuplicateAnythingCommand(editingDomain, req));
52        }
53 
54        /**
55         * @generated
56         */
57        private static class DuplicateAnythingCommand extends
58                        DuplicateEObjectsCommand {
59 
60                /**
61                 * @generated
62                 */
63                public DuplicateAnythingCommand(
64                                TransactionalEditingDomain editingDomain,
65                                DuplicateElementsRequest req) {
66                        super(editingDomain, req.getLabel(), req
67                                        .getElementsToBeDuplicated(), req
68                                        .getAllDuplicatedElementsMap());
69                }
70 
71        }
72 
73}

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