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

COVERAGE SUMMARY FOR SOURCE FILE [UsageScenarioItemSemanticEditPolicy.java]

nameclass, %method, %block, %line, %
UsageScenarioItemSemanticEditPolicy.java0%   (0/2)0%   (0/4)0%   (0/42)0%   (0/13)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class UsageScenarioItemSemanticEditPolicy0%   (0/1)0%   (0/3)0%   (0/32)0%   (0/9)
UsageScenarioItemSemanticEditPolicy (): void 0%   (0/1)0%   (0/4)0%   (0/2)
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 UsageScenarioItemSemanticEditPolicy$DuplicateAnythingCommand0%   (0/1)0%   (0/1)0%   (0/10)0%   (0/4)
UsageScenarioItemSemanticEditPolicy$DuplicateAnythingCommand (TransactionalEd... 0%   (0/1)0%   (0/10)0%   (0/4)

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

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