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 [OperationSignatureItemSemanticEditPolicy.java]

nameclass, %method, %block, %line, %
OperationSignatureItemSemanticEditPolicy.java0%   (0/1)0%   (0/2)0%   (0/49)0%   (0/12)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class OperationSignatureItemSemanticEditPolicy0%   (0/1)0%   (0/2)0%   (0/49)0%   (0/12)
OperationSignatureItemSemanticEditPolicy (): void 0%   (0/1)0%   (0/4)0%   (0/2)
getDestroyElementCommand (DestroyElementRequest): Command 0%   (0/1)0%   (0/45)0%   (0/10)

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.ecore.EAnnotation;
7import org.eclipse.gef.commands.Command;
8import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
9import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
10import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
11import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
12import org.eclipse.gmf.runtime.notation.View;
13 
14import de.uka.ipd.sdq.pcm.gmf.repository.providers.PalladioComponentModelElementTypes;
15 
16/**
17 * @generated
18 */
19public class OperationSignatureItemSemanticEditPolicy extends
20                PalladioComponentModelBaseItemSemanticEditPolicy {
21 
22        /**
23         * @generated
24         */
25        public OperationSignatureItemSemanticEditPolicy() {
26                super(PalladioComponentModelElementTypes.OperationSignature_3106);
27        }
28 
29        /**
30         * @generated
31         */
32        protected Command getDestroyElementCommand(DestroyElementRequest req) {
33                View view = (View) getHost().getModel();
34                CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(
35                                getEditingDomain(), null);
36                cmd.setTransactionNestingEnabled(false);
37                EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
38                if (annotation == null) {
39                        // there are indirectly referenced children, need extra commands: false
40                        addDestroyShortcutsCommand(cmd, view);
41                        // delete host element
42                        cmd.add(new DestroyElementCommand(req));
43                } else {
44                        cmd.add(new DeleteCommand(getEditingDomain(), view));
45                }
46                return getGEFWrapper(cmd.reduce());
47        }
48 
49}

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