Skip to content

Package: ECPControlFactory

ECPControlFactory

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2013 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: *******************************************************************************/
15: package org.eclipse.emf.ecp.edit.spi;
16:
17: import java.util.Set;
18:
19: import org.eclipse.emf.ecore.EObject;
20: import org.eclipse.emf.ecp.view.spi.model.VDomainModelReference;
21:
22: /**
23: * The ControlFactory provides a
24: * method ({@link ECPControlFactory#createControl(Class,EObject, VDomainModelReference)}) for creating a
25: * suitable
26: * control with the known widgets.
27: *
28: * @author Eugen Neufeld
29: *
30: * @noextend This interface is not intended to be extended by clients.
31: * @noimplement This interface is not intended to be implemented by clients.
32: * @deprecated
33: */
34: @Deprecated
35: public interface ECPControlFactory {
36:
37:         /**
38:          * Creates an {@link ECPAbstractControl} based on a {@link Class} and the {@link VDomainModelReference}.
39:          *
40:          * @param controlTypeClass the type of the control to return
41:          * @param domainModel The domain model object which is the root of the domain model reference
42:          * @param domainModelReference the {@link VDomainModelReference} to use to identify the control
43:          * @param <T> the type of the control to return
44:          * @return the found control or null
45:          *
46:          * @since 1.6
47:          */
48:         <T> T createControl(Class<T> controlTypeClass, EObject domainModel, VDomainModelReference domainModelReference);
49:
50:         /**
51:          * Creates an {@link ECPAbstractControl} based on an id.
52:          *
53:          * @param controlId the if of the control to return
54:          * @param <T> the type of the control to return
55:          * @return the found control or null
56:          *
57:          * @since 1.1
58:          */
59:         <T> T createControl(String controlId);
60:
61:         /**
62:          * A copy of all known {@link ECPControlDescription}.
63:          *
64:          * @return a copy of the set of all known controlDescriptions
65:          */
66:         Set<ECPControlDescription> getControlDescriptors();
67: }