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

COVERAGE SUMMARY FOR SOURCE FILE [RepositoryEditPart.java]

nameclass, %method, %block, %line, %
RepositoryEditPart.java0%   (0/2)0%   (0/4)0%   (0/65)0%   (0/18)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class RepositoryEditPart0%   (0/1)0%   (0/2)0%   (0/26)0%   (0/10)
RepositoryEditPart (View): void 0%   (0/1)0%   (0/4)0%   (0/2)
createDefaultEditPolicies (): void 0%   (0/1)0%   (0/22)0%   (0/8)
     
class RepositoryEditPart$10%   (0/1)0%   (0/2)0%   (0/39)0%   (0/9)
RepositoryEditPart$1 (RepositoryEditPart): void 0%   (0/1)0%   (0/6)0%   (0/2)
createViewsAndArrangeCommand (DropObjectsRequest, List): Command 0%   (0/1)0%   (0/33)0%   (0/7)

1/*
2 * Copyright 2007, IPD, SDQ, University of Karlsruhe
3 */
4package de.uka.ipd.sdq.pcm.gmf.repository.edit.parts;
5 
6import java.util.ArrayList;
7import java.util.Iterator;
8import java.util.List;
9 
10import org.eclipse.emf.ecore.EObject;
11import org.eclipse.gef.commands.Command;
12import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
13import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
14import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DiagramDragDropEditPolicy;
15import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
16import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
17import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
18import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
19import org.eclipse.gmf.runtime.notation.Node;
20import org.eclipse.gmf.runtime.notation.View;
21 
22import de.uka.ipd.sdq.pcm.gmf.repository.edit.commands.PalladioComponentModelCreateShortcutDecorationsCommand;
23import de.uka.ipd.sdq.pcm.gmf.repository.edit.policies.RepositoryCanonicalEditPolicy;
24import de.uka.ipd.sdq.pcm.gmf.repository.edit.policies.RepositoryItemSemanticEditPolicy;
25 
26/**
27 * @generated
28 */
29public class RepositoryEditPart extends DiagramEditPart {
30 
31        /**
32         * @generated
33         */
34        public final static String MODEL_ID = "PCM Repository Model"; //$NON-NLS-1$
35 
36        /**
37         * @generated
38         */
39        public static final int VISUAL_ID = 1000;
40 
41        /**
42         * @generated
43         */
44        public RepositoryEditPart(View view) {
45                super(view);
46        }
47 
48        /**
49         * @generated not
50         */
51        protected void createDefaultEditPolicies() {
52                super.createDefaultEditPolicies();
53                installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE,
54                                new RepositoryItemSemanticEditPolicy());
55                // Make diagram unsynched
56                installEditPolicy(EditPolicyRoles.CANONICAL_ROLE,
57                                new RepositoryCanonicalEditPolicy());
58                // Install an edit policy which also create links to the new created view
59                // according to the semantic model
60                //                installEditPolicy(EditPolicyRoles.CREATION_ROLE,
61                //                                new RepositoryCreationEditPolicy());
62                installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, // Fix a bug in GMF. Workaround
63                                new DiagramDragDropEditPolicy() {
64 
65                                        @Override
66                                        protected Command createViewsAndArrangeCommand(
67                                                        DropObjectsRequest dropRequest, List viewDescriptors) {
68                                                ArrayList newDesc = new ArrayList();
69                                                for (CreateViewRequest.ViewDescriptor d : (List<CreateViewRequest.ViewDescriptor>) viewDescriptors) {
70                                                        newDesc.add(new CreateViewRequest.ViewDescriptor(d
71                                                                        .getElementAdapter(), d.getViewKind(),
72                                                                        null, d.getPreferencesHint()));
73                                                }
74                                                return super.createViewsAndArrangeCommand(dropRequest,
75                                                                newDesc);
76                                        }
77 
78                                });
79        }
80}

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