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

COVERAGE SUMMARY FOR SOURCE FILE [RepositoryItemSemanticEditPolicy.java]

nameclass, %method, %block, %line, %
RepositoryItemSemanticEditPolicy.java0%   (0/2)0%   (0/4)0%   (0/119)0%   (0/34)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class RepositoryItemSemanticEditPolicy0%   (0/1)0%   (0/3)0%   (0/109)0%   (0/30)
RepositoryItemSemanticEditPolicy (): void 0%   (0/1)0%   (0/4)0%   (0/2)
getCreateCommand (CreateElementRequest): Command 0%   (0/1)0%   (0/92)0%   (0/25)
getDuplicateCommand (DuplicateElementsRequest): Command 0%   (0/1)0%   (0/13)0%   (0/3)
     
class RepositoryItemSemanticEditPolicy$DuplicateAnythingCommand0%   (0/1)0%   (0/1)0%   (0/10)0%   (0/4)
RepositoryItemSemanticEditPolicy$DuplicateAnythingCommand (TransactionalEditi... 0%   (0/1)0%   (0/10)0%   (0/4)

1/*
2 *Copyright 2007, IPD, SDQ, University of Karlsruhe
3 */
4package de.uka.ipd.sdq.pcm.gmf.repository.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.repository.edit.commands.BasicComponentCreateCommand;
14import de.uka.ipd.sdq.pcm.gmf.repository.edit.commands.CompleteComponentTypeCreateCommand;
15import de.uka.ipd.sdq.pcm.gmf.repository.edit.commands.CompositeComponentCreateCommand;
16import de.uka.ipd.sdq.pcm.gmf.repository.edit.commands.EventGroupCreateCommand;
17import de.uka.ipd.sdq.pcm.gmf.repository.edit.commands.InfrastructureInterfaceCreateCommand;
18import de.uka.ipd.sdq.pcm.gmf.repository.edit.commands.OperationInterfaceCreateCommand;
19import de.uka.ipd.sdq.pcm.gmf.repository.edit.commands.ProvidesComponentTypeCreateCommand;
20import de.uka.ipd.sdq.pcm.gmf.repository.edit.commands.SubSystemCreateCommand;
21import de.uka.ipd.sdq.pcm.gmf.repository.providers.PalladioComponentModelElementTypes;
22 
23/**
24 * @generated
25 */
26public class RepositoryItemSemanticEditPolicy extends
27                PalladioComponentModelBaseItemSemanticEditPolicy {
28 
29        /**
30         * @generated
31         */
32        public RepositoryItemSemanticEditPolicy() {
33                super(PalladioComponentModelElementTypes.Repository_1000);
34        }
35 
36        /**
37         * @generated
38         */
39        protected Command getCreateCommand(CreateElementRequest req) {
40                if (PalladioComponentModelElementTypes.OperationInterface_2107 == req
41                                .getElementType()) {
42                        return getGEFWrapper(new OperationInterfaceCreateCommand(req));
43                }
44                if (PalladioComponentModelElementTypes.EventGroup_2108 == req
45                                .getElementType()) {
46                        return getGEFWrapper(new EventGroupCreateCommand(req));
47                }
48                if (PalladioComponentModelElementTypes.BasicComponent_2102 == req
49                                .getElementType()) {
50                        return getGEFWrapper(new BasicComponentCreateCommand(req));
51                }
52                if (PalladioComponentModelElementTypes.CompositeComponent_2103 == req
53                                .getElementType()) {
54                        return getGEFWrapper(new CompositeComponentCreateCommand(req));
55                }
56                if (PalladioComponentModelElementTypes.CompleteComponentType_2104 == req
57                                .getElementType()) {
58                        return getGEFWrapper(new CompleteComponentTypeCreateCommand(req));
59                }
60                if (PalladioComponentModelElementTypes.ProvidesComponentType_2105 == req
61                                .getElementType()) {
62                        return getGEFWrapper(new ProvidesComponentTypeCreateCommand(req));
63                }
64                if (PalladioComponentModelElementTypes.SubSystem_2106 == req
65                                .getElementType()) {
66                        return getGEFWrapper(new SubSystemCreateCommand(req));
67                }
68                if (PalladioComponentModelElementTypes.InfrastructureInterface_2109 == req
69                                .getElementType()) {
70                        return getGEFWrapper(new InfrastructureInterfaceCreateCommand(req));
71                }
72                return super.getCreateCommand(req);
73        }
74 
75        /**
76         * @generated
77         */
78        protected Command getDuplicateCommand(DuplicateElementsRequest req) {
79                TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost())
80                                .getEditingDomain();
81                return getGEFWrapper(new DuplicateAnythingCommand(editingDomain, req));
82        }
83 
84        /**
85         * @generated
86         */
87        private static class DuplicateAnythingCommand extends
88                        DuplicateEObjectsCommand {
89 
90                /**
91                 * @generated
92                 */
93                public DuplicateAnythingCommand(
94                                TransactionalEditingDomain editingDomain,
95                                DuplicateElementsRequest req) {
96                        super(editingDomain, req.getLabel(), req
97                                        .getElementsToBeDuplicated(), req
98                                        .getAllDuplicatedElementsMap());
99                }
100        }
101}

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