Skip to content

Package: DefaultLocaleViewService

DefaultLocaleViewService

nameinstructionbranchcomplexitylinemethod
DefaultLocaleViewService()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
dispose()
M: 0 C: 1
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getLocale()
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%
getPriority()
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%
instantiate(ViewModelContext)
M: 0 C: 1
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: * Eugen Neufeld - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emf.ecp.view.context.internal.locale;
15:
16: import java.util.Locale;
17:
18: import org.eclipse.emf.ecp.edit.spi.ViewLocaleService;
19: import org.eclipse.emf.ecp.view.spi.context.ViewModelContext;
20: import org.eclipse.emfforms.spi.common.locale.EMFFormsLocaleProvider;
21:
22: /**
23: * A {@link org.eclipse.emf.ecp.view.spi.context.ViewModelService ViewModelService} which provides the default locale.
24: *
25: * @author Eugen Neufeld
26: * @deprecated Please use the {@link EMFFormsLocaleProvider
27: * EMFFormsLocaleProvider}
28: *
29: */
30: @Deprecated
31: public class DefaultLocaleViewService implements ViewLocaleService {
32:
33:         /**
34:          * {@inheritDoc}
35:          *
36:          * @see org.eclipse.emf.ecp.view.spi.context.ViewModelService#instantiate(org.eclipse.emf.ecp.view.spi.context.ViewModelContext)
37:          */
38:         @Override
39:         public void instantiate(ViewModelContext context) {
40:         }
41:
42:         /**
43:          *
44:          * {@inheritDoc}
45:          *
46:          * @see org.eclipse.emf.ecp.view.spi.context.ViewModelService#dispose()
47:          */
48:         @Override
49:         public void dispose() {
50:         }
51:
52:         /**
53:          *
54:          * {@inheritDoc}
55:          *
56:          * @see org.eclipse.emf.ecp.view.spi.context.ViewModelService#getPriority()
57:          */
58:         @Override
59:         public int getPriority() {
60:                 return 10;
61:         }
62:
63:         /**
64:          *
65:          * {@inheritDoc}
66:          *
67:          * @see org.eclipse.emf.ecp.edit.spi.ViewLocaleService#getLocale()
68:          */
69:         @Override
70:         public Locale getLocale() {
71:                 return Locale.getDefault();
72:         }
73:
74: }