Skip to content

Package: UIProviderRegistry

UIProviderRegistry

nameinstructionbranchcomplexitylinemethod
static {...}
M: 3 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) 2011 Eike Stepper (Berlin, Germany) 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: * Eike Stepper - initial API and implementation
13: ********************************************************************************/
14: package org.eclipse.emf.ecp.spi.ui;
15:
16: import java.util.Collection;
17:
18: /**
19: * @author Eike Stepper
20: * @since 1.1
21: */
22: public interface UIProviderRegistry {
23:         /**
24:          * This is the Instance to use for the {@link UIProviderRegistry}.
25:          */
26:         UIProviderRegistry INSTANCE = org.eclipse.emf.ecp.internal.ui.UIProviderRegistryImpl.INSTANCE;
27:
28:         /**
29:          * It the adaptable is ECPProviderAware then the {@link UIProvider} that corresponds to the
30:          * {@link org.eclipse.emf.ecp.core.ECPProvider} is
31:          * returned. Otherwise the AdapterUtil tries to resolve this.
32:          *
33:          * @param adaptable the Object to adapt
34:          * @return the {@link UIProvider} or null if none was found
35:          */
36:         UIProvider getUIProvider(Object adaptable);
37:
38:         /**
39:          * Returns the {@link UIProvider} by its name.
40:          *
41:          * @param name the name of the ui provider
42:          * @return the {@link UIProvider} or null if none was found
43:          */
44:         UIProvider getUIProvider(String name);
45:
46:         /**
47:          * Returns all known {@link UIProvider}.
48:          *
49:          * @return the array containing all known {@link UIProvider}
50:          */
51:         Collection<UIProvider> getUIProviders();
52:
53:         /**
54:          * Whether any {@link UIProvider} are registered.
55:          *
56:          * @return true if at least one {@link UIProvider} is registered, false otherwise
57:          */
58:         boolean hasUIProviders();
59: }