Skip to content

Package: SWTStackItemRenderer

SWTStackItemRenderer

nameinstructionbranchcomplexitylinemethod
SWTStackItemRenderer(VStackItem, ViewModelContext, ReportService, EMFFormsRendererFactory)
M: 0 C: 7
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
getChildren()
M: 0 C: 5
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getCustomVariant()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2014 EclipseSource Muenchen GmbH and others.
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License 2.0
6: * which accompanies this distribution, and is available at
7: * https://www.eclipse.org/legal/epl-2.0/
8: *
9: * SPDX-License-Identifier: EPL-2.0
10: *
11: * Contributors:
12: * Johannes Faltermeier - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emf.ecp.view.spi.stack.ui.swt;
15:
16: import java.util.Collection;
17:
18: import javax.inject.Inject;
19:
20: import org.eclipse.emf.ecp.view.spi.context.ViewModelContext;
21: import org.eclipse.emf.ecp.view.spi.core.swt.ContainerSWTRenderer;
22: import org.eclipse.emf.ecp.view.spi.model.VContainedElement;
23: import org.eclipse.emf.ecp.view.spi.stack.model.VStackItem;
24: import org.eclipse.emfforms.spi.common.report.ReportService;
25: import org.eclipse.emfforms.spi.swt.core.EMFFormsRendererFactory;
26:
27: /**
28: * The SWT {@link VStackItem} renderer.
29: *
30: * @author jfaltermeier
31: *
32: */
33: public class SWTStackItemRenderer extends ContainerSWTRenderer<VStackItem> {
34:
35:         /**
36:          * Default constructor.
37:          *
38:          * @param vElement the view model element to be rendered
39:          * @param viewContext the view context
40:          * @param reportService the {@link ReportService}
41:          * @param factory the {@link EMFFormsRendererFactory}
42:          * @since 1.6
43:          */
44:         @Inject
45:         public SWTStackItemRenderer(VStackItem vElement, ViewModelContext viewContext,
46:                 ReportService reportService,
47:                 EMFFormsRendererFactory factory) {
48:                 super(vElement, viewContext, reportService, factory);
49:         }
50:
51:         private static final String LAYOUT_STACK_ITEM = "org_eclipse_emf_ecp_ui_layout_stackitem"; //$NON-NLS-1$
52:
53:         /**
54:          * {@inheritDoc}
55:          *
56:          * @see org.eclipse.emf.ecp.view.spi.core.swt.ContainerSWTRenderer#getChildren()
57:          */
58:         @Override
59:         protected Collection<VContainedElement> getChildren() {
60:                 return getVElement().getChildren();
61:         }
62:
63:         /**
64:          * {@inheritDoc}
65:          *
66:          * @see org.eclipse.emf.ecp.view.spi.core.swt.ContainerSWTRenderer#getCustomVariant()
67:          */
68:         @Override
69:         protected String getCustomVariant() {
70:                 return LAYOUT_STACK_ITEM;
71:         }
72:
73: }