Skip to content

Package: Renderer

Renderer

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.model.common.AbstractRenderer;
27: import org.eclipse.emf.ecp.view.spi.model.VElement;
28: import org.eclipse.emfforms.spi.core.services.view.EMFFormsViewContext;
29:
30: /**
31: * Annotation indicating an injectable dependency of {@link AbstractRenderer} type.
32: * Injection of an existing renderer via this annotation requires that the Eclipse context
33: * include values for both of
34: * <ul>
35: * <li>the renderer view-model element: {@link VElement VElement.class}</li>
36: * <li>the view context in which the element is rendered: {@link EMFFormsViewContext EMFFormsViewContext.class}</li>
37: * </ul>
38: *
39: * @since 1.22
40: */
41: @Documented
42: @Qualifier
43: @Retention(RUNTIME)
44: @Target({ FIELD, PARAMETER })
45: public @interface Renderer {
46:         // No attributes
47: }