Package: PGroupRendererService
PGroupRendererService
name | instruction | branch | complexity | line | method | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PGroupRendererService() |
|
|
|
|
|
||||||||||||||||||||
getRendererClass() |
|
|
|
|
|
||||||||||||||||||||
isApplicable(VElement, ViewModelContext) |
|
|
|
|
|
Coverage
1: /*******************************************************************************
2: * Copyright (c) 2011-2015 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: * Eugen Neufeld - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emf.ecp.makeithappen.view.group.swt.pgroup;
15:
16: import org.eclipse.emf.ecp.view.spi.context.ViewModelContext;
17: import org.eclipse.emf.ecp.view.spi.group.model.VGroup;
18: import org.eclipse.emf.ecp.view.spi.model.VElement;
19: import org.eclipse.emfforms.spi.swt.core.AbstractSWTRenderer;
20: import org.eclipse.emfforms.spi.swt.core.di.EMFFormsDIRendererService;
21:
22: /**
23: * PGroupSWTRendererService which provides the PGroupSWTRenderer.
24: *
25: * @author Eugen Neufeld
26: *
27: */
28: public class PGroupRendererService implements EMFFormsDIRendererService<VGroup> {
29:
30:         /**
31:          * {@inheritDoc}
32:          *
33:          * @see org.eclipse.emfforms.spi.swt.core.di.EMFFormsDIRendererService#isApplicable(VElement,ViewModelContext)
34:          */
35:         @Override
36:         public double isApplicable(VElement vElement, ViewModelContext viewModelContext) {
37:•                if (!VGroup.class.isInstance(vElement)) {
38:                         return NOT_APPLICABLE;
39:                 }
40:                 return 10;
41:         }
42:
43:         /**
44:          * {@inheritDoc}
45:          *
46:          * @see org.eclipse.emfforms.spi.swt.core.di.EMFFormsDIRendererService#getRendererClass()
47:          */
48:         @Override
49:         public Class<? extends AbstractSWTRenderer<VGroup>> getRendererClass() {
50:                 return PGroupRenderer.class;
51:         }
52:
53: }