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

COVERAGE SUMMARY FOR SOURCE FILE [InternalFailureOccurrenceDescriptionItemSemanticEditPolicy.java]

nameclass, %method, %block, %line, %
InternalFailureOccurrenceDescriptionItemSemanticEditPolicy.java0%   (0/1)0%   (0/2)0%   (0/49)0%   (0/13)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class InternalFailureOccurrenceDescriptionItemSemanticEditPolicy0%   (0/1)0%   (0/2)0%   (0/49)0%   (0/13)
InternalFailureOccurrenceDescriptionItemSemanticEditPolicy (): void 0%   (0/1)0%   (0/4)0%   (0/3)
getDestroyElementCommand (DestroyElementRequest): Command 0%   (0/1)0%   (0/45)0%   (0/10)

1/*
2 * Copyright 2006 SDQ Research Group, University of Karlsruhe (TH)
3 */
4package de.uka.ipd.sdq.pcm.gmf.seff.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.seff.providers.PalladioComponentModelElementTypes;
15 
16/**
17 * @generated
18 */
19public class InternalFailureOccurrenceDescriptionItemSemanticEditPolicy extends
20                PalladioComponentModelBaseItemSemanticEditPolicy {
21 
22        /**
23         * @generated
24         */
25        public InternalFailureOccurrenceDescriptionItemSemanticEditPolicy() {
26                super(
27                                PalladioComponentModelElementTypes.InternalFailureOccurrenceDescription_3050);
28        }
29 
30        /**
31         * @generated
32         */
33        protected Command getDestroyElementCommand(DestroyElementRequest req) {
34                View view = (View) getHost().getModel();
35                CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(
36                                getEditingDomain(), null);
37                cmd.setTransactionNestingEnabled(false);
38                EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
39                if (annotation == null) {
40                        // there are indirectly referenced children, need extra commands: false
41                        addDestroyShortcutsCommand(cmd, view);
42                        // delete host element
43                        cmd.add(new DestroyElementCommand(req));
44                } else {
45                        cmd.add(new DeleteCommand(getEditingDomain(), view));
46                }
47                return getGEFWrapper(cmd.reduce());
48        }
49 
50}

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