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

COVERAGE SUMMARY FOR SOURCE FILE [AssemblyContextViewFactory.java]

nameclass, %method, %block, %line, %
AssemblyContextViewFactory.java0%   (0/1)0%   (0/3)0%   (0/79)0%   (0/30)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class AssemblyContextViewFactory0%   (0/1)0%   (0/3)0%   (0/79)0%   (0/30)
AssemblyContextViewFactory (): void 0%   (0/1)0%   (0/3)0%   (0/1)
createStyles (View): List 0%   (0/1)0%   (0/26)0%   (0/6)
decorateView (View, View, IAdaptable, String, int, boolean): void 0%   (0/1)0%   (0/50)0%   (0/23)

1/*
2 *Copyright 2007, SDQ, IPD, Uni Karlsruhe (TH)
3 */
4package de.uka.ipd.sdq.pcm.gmf.composite.view.factories;
5 
6import de.uka.ipd.sdq.pcm.gmf.composite.edit.parts.AssemblyContextEditPart;
7import de.uka.ipd.sdq.pcm.gmf.composite.edit.parts.AssemblyContextEntityNameEditPart;
8import de.uka.ipd.sdq.pcm.gmf.composite.edit.parts.ComposedProvidingRequiringEntityEditPart;
9 
10import de.uka.ipd.sdq.pcm.gmf.composite.part.PalladioComponentModelVisualIDRegistry;
11 
12import java.util.ArrayList;
13import java.util.List;
14 
15import org.eclipse.core.runtime.IAdaptable;
16 
17import org.eclipse.emf.ecore.EAnnotation;
18import org.eclipse.emf.ecore.EcoreFactory;
19 
20import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
21 
22import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractShapeViewFactory;
23 
24import org.eclipse.gmf.runtime.notation.NotationFactory;
25import org.eclipse.gmf.runtime.notation.View;
26 
27/**
28 * @generated
29 */
30public class AssemblyContextViewFactory extends AbstractShapeViewFactory {
31 
32        /**
33         * @generated 
34         */
35        protected List createStyles(View view) {
36                List styles = new ArrayList();
37                styles.add(NotationFactory.eINSTANCE.createFontStyle());
38                styles.add(NotationFactory.eINSTANCE.createDescriptionStyle());
39                styles.add(NotationFactory.eINSTANCE.createFillStyle());
40                styles.add(NotationFactory.eINSTANCE.createLineStyle());
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(AssemblyContextEditPart.VISUAL_ID);
53                        view.setType(semanticHint);
54                }
55                super.decorateView(containerView, view, semanticAdapter, semanticHint,
56                                index, persisted);
57                if (!ComposedProvidingRequiringEntityEditPart.MODEL_ID
58                                .equals(PalladioComponentModelVisualIDRegistry
59                                                .getModelID(containerView))) {
60                        EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE
61                                        .createEAnnotation();
62                        shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$
63                        shortcutAnnotation
64                                        .getDetails()
65                                        .put(
66                                                        "modelID", ComposedProvidingRequiringEntityEditPart.MODEL_ID); //$NON-NLS-1$
67                        view.getEAnnotations().add(shortcutAnnotation);
68                }
69                getViewService().createNode(
70                                semanticAdapter,
71                                view,
72                                PalladioComponentModelVisualIDRegistry
73                                                .getType(AssemblyContextEntityNameEditPart.VISUAL_ID),
74                                ViewUtil.APPEND, true, getPreferencesHint());
75        }
76 
77}

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