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

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