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 [ComposedProvidingRequiringEntityCompositeStructureInnerCompartmentViewFactory.java]

nameclass, %method, %block, %line, %
ComposedProvidingRequiringEntityCompositeStructureInnerCompartmentViewFactory.java0%   (0/1)0%   (0/5)0%   (0/88)0%   (0/35)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ComposedProvidingRequiringEntityCompositeStructureInnerCompartmentViewFactory0%   (0/1)0%   (0/5)0%   (0/88)0%   (0/35)
ComposedProvidingRequiringEntityCompositeStructureInnerCompartmentViewFactory... 0%   (0/1)0%   (0/3)0%   (0/1)
createStyles (View): List 0%   (0/1)0%   (0/16)0%   (0/4)
decorateView (View, View, IAdaptable, String, int, boolean): void 0%   (0/1)0%   (0/45)0%   (0/20)
setupCompartmentCollapsed (View): void 0%   (0/1)0%   (0/12)0%   (0/5)
setupCompartmentTitle (View): void 0%   (0/1)0%   (0/12)0%   (0/5)

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.ComposedProvidingRequiringEntityCompositeStructureInnerCompartmentEditPart;
7import de.uka.ipd.sdq.pcm.gmf.composite.edit.parts.ComposedProvidingRequiringEntityEditPart;
8 
9import de.uka.ipd.sdq.pcm.gmf.composite.part.PalladioComponentModelVisualIDRegistry;
10 
11import java.util.ArrayList;
12import java.util.List;
13 
14import org.eclipse.core.runtime.IAdaptable;
15 
16import org.eclipse.emf.ecore.EAnnotation;
17import org.eclipse.emf.ecore.EcoreFactory;
18 
19import org.eclipse.gmf.runtime.diagram.ui.view.factories.ListCompartmentViewFactory;
20 
21import org.eclipse.gmf.runtime.notation.DrawerStyle;
22import org.eclipse.gmf.runtime.notation.NotationFactory;
23import org.eclipse.gmf.runtime.notation.NotationPackage;
24import org.eclipse.gmf.runtime.notation.TitleStyle;
25import org.eclipse.gmf.runtime.notation.View;
26 
27/**
28 * @generated
29 */
30public class ComposedProvidingRequiringEntityCompositeStructureInnerCompartmentViewFactory
31                extends ListCompartmentViewFactory {
32 
33        /**
34         * @generated 
35         */
36        protected List createStyles(View view) {
37                List styles = new ArrayList();
38                styles.add(NotationFactory.eINSTANCE.createSortingStyle());
39                styles.add(NotationFactory.eINSTANCE.createFilteringStyle());
40                return styles;
41        }
42 
43        /**
44         * @generated
45         */
46        protected void decorateView(View containerView, View view,
47                        IAdaptable semanticAdapter, String semanticHint, int index,
48                        boolean persisted) {
49                if (semanticHint == null) {
50                        semanticHint = PalladioComponentModelVisualIDRegistry
51                                        .getType(ComposedProvidingRequiringEntityCompositeStructureInnerCompartmentEditPart.VISUAL_ID);
52                        view.setType(semanticHint);
53                }
54                super.decorateView(containerView, view, semanticAdapter, semanticHint,
55                                index, persisted);
56                setupCompartmentTitle(view);
57                setupCompartmentCollapsed(view);
58                if (!ComposedProvidingRequiringEntityEditPart.MODEL_ID
59                                .equals(PalladioComponentModelVisualIDRegistry
60                                                .getModelID(containerView))) {
61                        EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE
62                                        .createEAnnotation();
63                        shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$
64                        shortcutAnnotation
65                                        .getDetails()
66                                        .put(
67                                                        "modelID", ComposedProvidingRequiringEntityEditPart.MODEL_ID); //$NON-NLS-1$
68                        view.getEAnnotations().add(shortcutAnnotation);
69                }
70        }
71 
72        /**
73         * @generated
74         */
75        protected void setupCompartmentTitle(View view) {
76                TitleStyle titleStyle = (TitleStyle) view
77                                .getStyle(NotationPackage.eINSTANCE.getTitleStyle());
78                if (titleStyle != null) {
79                        titleStyle.setShowTitle(true);
80                }
81        }
82 
83        /**
84         * @generated
85         */
86        protected void setupCompartmentCollapsed(View view) {
87                DrawerStyle drawerStyle = (DrawerStyle) view
88                                .getStyle(NotationPackage.eINSTANCE.getDrawerStyle());
89                if (drawerStyle != null) {
90                        drawerStyle.setCollapsed(false);
91                }
92        }
93 
94}

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