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

COVERAGE SUMMARY FOR SOURCE FILE [PalladioComponentModelValidationProvider.java]

nameclass, %method, %block, %line, %
PalladioComponentModelValidationProvider.java0%   (0/2)0%   (0/8)0%   (0/77)0%   (0/27)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class PalladioComponentModelValidationProvider0%   (0/1)0%   (0/6)0%   (0/57)0%   (0/20)
<static initializer> 0%   (0/1)0%   (0/3)0%   (0/2)
PalladioComponentModelValidationProvider (): void 0%   (0/1)0%   (0/3)0%   (0/1)
access$0 (boolean): void 0%   (0/1)0%   (0/3)0%   (0/1)
isInDefaultEditorContext (Object): boolean 0%   (0/1)0%   (0/23)0%   (0/8)
runWithConstraints (TransactionalEditingDomain, Runnable): void 0%   (0/1)0%   (0/23)0%   (0/9)
shouldConstraintsBePrivate (): boolean 0%   (0/1)0%   (0/2)0%   (0/1)
     
class PalladioComponentModelValidationProvider$10%   (0/1)0%   (0/2)0%   (0/20)0%   (0/8)
PalladioComponentModelValidationProvider$1 (Runnable): void 0%   (0/1)0%   (0/6)0%   (0/2)
run (): void 0%   (0/1)0%   (0/14)0%   (0/6)

1/*
2 * Copyright 2007, SDQ, IPD, University of Karlsruhe
3 */
4package de.uka.ipd.sdq.pcm.gmf.usage.providers;
5 
6import org.eclipse.emf.transaction.TransactionalEditingDomain;
7import org.eclipse.gmf.runtime.notation.View;
8 
9import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.UsageScenarioEditPart;
10import de.uka.ipd.sdq.pcm.gmf.usage.part.PalladioComponentModelUsageDiagramEditorPlugin;
11import de.uka.ipd.sdq.pcm.gmf.usage.part.PalladioComponentModelVisualIDRegistry;
12 
13/**
14 * @generated
15 */
16public class PalladioComponentModelValidationProvider {
17 
18        /**
19         * @generated
20         */
21        private static boolean constraintsActive = false;
22 
23        /**
24         * @generated
25         */
26        public static boolean shouldConstraintsBePrivate() {
27                return false;
28        }
29 
30        /**
31         * @generated
32         */
33        public static void runWithConstraints(
34                        TransactionalEditingDomain editingDomain, Runnable operation) {
35                final Runnable op = operation;
36                Runnable task = new Runnable() {
37                        public void run() {
38                                try {
39                                        constraintsActive = true;
40                                        op.run();
41                                } finally {
42                                        constraintsActive = false;
43                                }
44                        }
45                };
46                if (editingDomain != null) {
47                        try {
48                                editingDomain.runExclusive(task);
49                        } catch (Exception e) {
50                                PalladioComponentModelUsageDiagramEditorPlugin.getInstance()
51                                                .logError("Validation failed", e); //$NON-NLS-1$
52                        }
53                } else {
54                        task.run();
55                }
56        }
57 
58        /**
59         * @generated
60         */
61        static boolean isInDefaultEditorContext(Object object) {
62                if (shouldConstraintsBePrivate() && !constraintsActive) {
63                        return false;
64                }
65                if (object instanceof View) {
66                        return constraintsActive
67                                        && UsageScenarioEditPart.MODEL_ID
68                                                        .equals(PalladioComponentModelVisualIDRegistry
69                                                                        .getModelID((View) object));
70                }
71                return true;
72        }
73 
74} //PalladioComponentModelValidationProvider

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