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

COVERAGE SUMMARY FOR SOURCE FILE [DiagramEditorContextMenuProvider.java]

nameclass, %method, %block, %line, %
DiagramEditorContextMenuProvider.java0%   (0/2)0%   (0/7)0%   (0/87)0%   (0/27)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class DiagramEditorContextMenuProvider0%   (0/1)0%   (0/5)0%   (0/58)0%   (0/19)
DiagramEditorContextMenuProvider (IWorkbenchPart, EditPartViewer): void 0%   (0/1)0%   (0/17)0%   (0/5)
access$0 (DiagramEditorContextMenuProvider): IWorkbenchPart 0%   (0/1)0%   (0/3)0%   (0/1)
access$1 (DiagramEditorContextMenuProvider): DeleteElementAction 0%   (0/1)0%   (0/3)0%   (0/1)
buildContextMenu (IMenuManager): void 0%   (0/1)0%   (0/23)0%   (0/7)
dispose (): void 0%   (0/1)0%   (0/12)0%   (0/5)
     
class DiagramEditorContextMenuProvider$10%   (0/1)0%   (0/2)0%   (0/29)0%   (0/9)
DiagramEditorContextMenuProvider$1 (DiagramEditorContextMenuProvider, IMenuMa... 0%   (0/1)0%   (0/9)0%   (0/2)
run (): void 0%   (0/1)0%   (0/20)0%   (0/7)

1/*
2 * Copyright 2007, SDQ, IPD, Uni Karlsruhe (TH)
3 */
4package de.uka.ipd.sdq.pcm.gmf.composite.part;
5 
6import org.eclipse.emf.ecore.EObject;
7import org.eclipse.emf.transaction.util.TransactionUtil;
8import org.eclipse.gef.EditPartViewer;
9import org.eclipse.gmf.runtime.common.ui.services.action.contributionitem.ContributionItemService;
10import org.eclipse.gmf.runtime.diagram.ui.actions.ActionIds;
11import org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider;
12import org.eclipse.jface.action.IMenuManager;
13import org.eclipse.ui.IWorkbenchPart;
14 
15/**
16 * @generated
17 */
18public class DiagramEditorContextMenuProvider extends
19                DiagramContextMenuProvider {
20 
21        /**
22         * @generated
23         */
24        private IWorkbenchPart part;
25 
26        /**
27         * @generated
28         */
29        private DeleteElementAction deleteAction;
30 
31        /**
32         * @generated
33         */
34        public DiagramEditorContextMenuProvider(IWorkbenchPart part,
35                        EditPartViewer viewer) {
36                super(part, viewer);
37                this.part = part;
38                deleteAction = new DeleteElementAction(part);
39                deleteAction.init();
40        }
41 
42        /**
43         * @generated
44         */
45        public void dispose() {
46                if (deleteAction != null) {
47                        deleteAction.dispose();
48                        deleteAction = null;
49                }
50                super.dispose();
51        }
52 
53        /**
54         * @generated
55         */
56        public void buildContextMenu(final IMenuManager menu) {
57                getViewer().flush();
58                try {
59                        TransactionUtil.getEditingDomain(
60                                        (EObject) getViewer().getContents().getModel())
61                                        .runExclusive(new Runnable() {
62 
63                                                public void run() {
64                                                        ContributionItemService
65                                                                        .getInstance()
66                                                                        .contributeToPopupMenu(
67                                                                                        DiagramEditorContextMenuProvider.this,
68                                                                                        part);
69                                                        menu.remove(ActionIds.ACTION_DELETE_FROM_MODEL);
70                                                        menu.appendToGroup("editGroup", deleteAction);
71                                                }
72                                        });
73                } catch (Exception e) {
74                        PalladioComponentModelComposedStructureDiagramEditorPlugin
75                                        .getInstance().logError("Error building context menu", e);
76                }
77        }
78}

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