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

nameclass, %method, %block, %line, %
ResourceContainerAllocationCompartmentViewFactory.java0%   (0/1)0%   (0/5)0%   (0/66)0%   (0/24)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ResourceContainerAllocationCompartmentViewFactory0%   (0/1)0%   (0/5)0%   (0/66)0%   (0/24)
ResourceContainerAllocationCompartmentViewFactory (): void 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/23)0%   (0/9)
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, U KA
3 */
4package de.uka.ipd.sdq.pcm.gmf.allocation.view.factories;
5 
6import de.uka.ipd.sdq.pcm.gmf.allocation.edit.parts.AllocationEditPart;
7import de.uka.ipd.sdq.pcm.gmf.allocation.edit.parts.ResourceContainerAllocationCompartmentEditPart;
8 
9import de.uka.ipd.sdq.pcm.gmf.allocation.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.BasicNodeViewFactory;
20import org.eclipse.gmf.runtime.diagram.ui.view.factories.ListCompartmentViewFactory;
21 
22import org.eclipse.gmf.runtime.notation.DrawerStyle;
23import org.eclipse.gmf.runtime.notation.NotationFactory;
24import org.eclipse.gmf.runtime.notation.NotationPackage;
25import org.eclipse.gmf.runtime.notation.TitleStyle;
26import org.eclipse.gmf.runtime.notation.View;
27 
28/**
29 * @generated
30 */
31public class ResourceContainerAllocationCompartmentViewFactory extends
32                BasicNodeViewFactory {
33 
34        /**
35         * @generated 
36         */
37        protected List createStyles(View view) {
38                List styles = new ArrayList();
39                styles.add(NotationFactory.eINSTANCE.createSortingStyle());
40                styles.add(NotationFactory.eINSTANCE.createFilteringStyle());
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(ResourceContainerAllocationCompartmentEditPart.VISUAL_ID);
53                        view.setType(semanticHint);
54                }
55                super.decorateView(containerView, view, semanticAdapter, semanticHint,
56                                index, persisted);
57                setupCompartmentTitle(view);
58                setupCompartmentCollapsed(view);
59        }
60 
61        /**
62         * @generated
63         */
64        protected void setupCompartmentTitle(View view) {
65                TitleStyle titleStyle = (TitleStyle) view
66                                .getStyle(NotationPackage.eINSTANCE.getTitleStyle());
67                if (titleStyle != null) {
68                        titleStyle.setShowTitle(true);
69                }
70        }
71 
72        /**
73         * @generated
74         */
75        protected void setupCompartmentCollapsed(View view) {
76                DrawerStyle drawerStyle = (DrawerStyle) view
77                                .getStyle(NotationPackage.eINSTANCE.getDrawerStyle());
78                if (drawerStyle != null) {
79                        drawerStyle.setCollapsed(false);
80                }
81        }
82 
83}

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