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

COVERAGE SUMMARY FOR SOURCE FILE [AllocationContextViewFactory.java]

nameclass, %method, %block, %line, %
AllocationContextViewFactory.java0%   (0/1)0%   (0/3)0%   (0/67)0%   (0/26)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class AllocationContextViewFactory0%   (0/1)0%   (0/3)0%   (0/67)0%   (0/26)
AllocationContextViewFactory (): void 0%   (0/1)0%   (0/3)0%   (0/1)
createStyles (View): List 0%   (0/1)0%   (0/11)0%   (0/3)
decorateView (View, View, IAdaptable, String, int, boolean): void 0%   (0/1)0%   (0/53)0%   (0/22)

1/*
2 *Copyright 2007, SDQ, IPD, U KA
3 */
4package de.uka.ipd.sdq.pcm.gmf.allocation.view.factories;
5 
6import de.uka.ipd.sdq.pcm.gmf.allocation.edit.parts.AllocationComponentLabelEditPart;
7import de.uka.ipd.sdq.pcm.gmf.allocation.edit.parts.AllocationContextEditPart;
8import de.uka.ipd.sdq.pcm.gmf.allocation.edit.parts.AllocationContextEntityNameEditPart;
9import de.uka.ipd.sdq.pcm.gmf.allocation.edit.parts.AllocationEditPart;
10 
11import de.uka.ipd.sdq.pcm.gmf.allocation.part.PalladioComponentModelVisualIDRegistry;
12 
13import java.util.ArrayList;
14import java.util.List;
15 
16import org.eclipse.core.runtime.IAdaptable;
17 
18import org.eclipse.emf.ecore.EAnnotation;
19import org.eclipse.emf.ecore.EObject;
20import org.eclipse.emf.ecore.EcoreFactory;
21 
22import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
23 
24import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractShapeViewFactory;
25 
26import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
27import org.eclipse.gmf.runtime.notation.NotationFactory;
28import org.eclipse.gmf.runtime.notation.View;
29 
30/**
31 * @generated
32 */
33public class AllocationContextViewFactory extends AbstractShapeViewFactory {
34 
35        /**
36         * @generated 
37         */
38        protected List createStyles(View view) {
39                List styles = new ArrayList();
40                styles.add(NotationFactory.eINSTANCE.createShapeStyle());
41                return styles;
42        }
43 
44        /**
45         * @generated
46         */
47        protected void decorateView(View containerView, View view,
48                        IAdaptable semanticAdapter, String semanticHint, int index,
49                        boolean persisted) {
50                if (semanticHint == null) {
51                        semanticHint = PalladioComponentModelVisualIDRegistry
52                                        .getType(AllocationContextEditPart.VISUAL_ID);
53                        view.setType(semanticHint);
54                }
55                super.decorateView(containerView, view, semanticAdapter, semanticHint,
56                                index, persisted);
57                IAdaptable eObjectAdapter = null;
58                EObject eObject = (EObject) semanticAdapter.getAdapter(EObject.class);
59                if (eObject != null) {
60                        eObjectAdapter = new EObjectAdapter(eObject);
61                }
62                getViewService()
63                                .createNode(
64                                                eObjectAdapter,
65                                                view,
66                                                PalladioComponentModelVisualIDRegistry
67                                                                .getType(AllocationContextEntityNameEditPart.VISUAL_ID),
68                                                ViewUtil.APPEND, true, getPreferencesHint());
69                getViewService().createNode(
70                                eObjectAdapter,
71                                view,
72                                PalladioComponentModelVisualIDRegistry
73                                                .getType(AllocationComponentLabelEditPart.VISUAL_ID),
74                                ViewUtil.APPEND, true, getPreferencesHint());
75        }
76 
77}

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