Skip to content

Package: ViewService

ViewService

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.emf.ecp.view.model.common.di.annotations;
15:
16: import static java.lang.annotation.ElementType.FIELD;
17: import static java.lang.annotation.ElementType.PARAMETER;
18: import static java.lang.annotation.RetentionPolicy.RUNTIME;
19:
20: import java.lang.annotation.Documented;
21: import java.lang.annotation.Retention;
22: import java.lang.annotation.Target;
23:
24: import javax.inject.Qualifier;
25:
26: import org.eclipse.emf.ecp.view.spi.context.ViewModelService;
27: import org.eclipse.emfforms.spi.core.services.view.EMFFormsViewContext;
28: import org.eclipse.emfforms.spi.core.services.view.EMFFormsViewServiceFactory;
29:
30: /**
31: * Annotation indicating an injectable dependency of some view-model service type. This
32: * may actually be a {@link ViewModelService} or some other kind of service provided
33: * by an {@link EMFFormsViewServiceFactory}. In any case, injection of services from the
34: * view context does depend on the Eclipse context containing an {@link EMFFormsViewContext}.
35: *
36: * @since 1.22
37: */
38: @Documented
39: @Qualifier
40: @Retention(RUNTIME)
41: @Target({ FIELD, PARAMETER })
42: public @interface ViewService {
43:         // No attributes
44: }