Skip to main content
summaryrefslogtreecommitdiffstats
blob: ee38a62e64ec9e4bda48bcfb6373e31f5e9c8333 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package org.eclipse.fx.ecp.ui;

import java.util.Set;

import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.fx.ecp.ui.controls.ECPControlBase;
import org.eclipse.fx.ecp.ui.impl.ControlFactoryRegistryImpl;

public interface ECPControl {
	
	void dispose();

	interface Factory {
		
		ECPControlBase createControl(IItemPropertyDescriptor itemPropertyDescriptor, ECPControlContext context);
		
		interface Descriptor {
			
			/**
			 * Creates a factory and returns it.
			 * <p>
			 * An implementation may and usually does choose to create only one instance,
			 * which it returns for each call.
			 * </p>
			 * @return a factory.
			 */
			Factory createFactory();
			
			String getID();
			
			boolean showLabel();
			
			Set<ECPApplicableTester> getTesters();
			
		}
		
		interface Registry {
			
			Registry INSTANCE = new ControlFactoryRegistryImpl();
			
			Factory getFactory(IItemPropertyDescriptor propertyDescriptor, EObject modelElement);
			
		}
		
	}

}

Back to the top