Skip to content

Package: EcoreValidationDelegateProvider

EcoreValidationDelegateProvider

nameinstructionbranchcomplexitylinemethod
EcoreValidationDelegateProvider()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
createValidationDelegate()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2019 Christian W. Damus 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: * Christian W. Damus - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emfforms.ide.ecore.internal.builder;
15:
16: import org.eclipse.emf.ecore.EcorePackage;
17: import org.eclipse.emfforms.bazaar.Create;
18: import org.eclipse.emfforms.bazaar.Precondition;
19: import org.eclipse.emfforms.bazaar.StaticBid;
20: import org.eclipse.emfforms.ide.builder.BuilderConstants;
21: import org.eclipse.emfforms.ide.builder.ValidationDelegate;
22: import org.eclipse.emfforms.ide.builder.ValidationDelegateProvider;
23: import org.eclipse.emfforms.ide.builder.ValidationServiceDelegate;
24: import org.osgi.service.component.annotations.Component;
25:
26: /**
27: * Validation delegate provider for Ecore models.
28: */
29: @Component
30: @StaticBid(bid = 10.0)
31: @Precondition(key = BuilderConstants.CONTENT_TYPE, value = EcorePackage.eCONTENT_TYPE)
32: public class EcoreValidationDelegateProvider implements ValidationDelegateProvider {
33:
34:         /**
35:          * Initializes me.
36:          */
37:         public EcoreValidationDelegateProvider() {
38:                 super();
39:         }
40:
41:         /**
42:          * Create the validation delegate.
43:          *
44:          * @return the validation delegate
45:          */
46:         @Create
47:         public ValidationDelegate createValidationDelegate() {
48:                 return new ValidationServiceDelegate();
49:         }
50: }