Skip to content

Commit 5740dd9

Browse files
authored
Merge branch 'master' into 1668
2 parents 0eaee71 + d3dd4bf commit 5740dd9

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

runtime/bundles/org.eclipse.e4.core.services/src/org/eclipse/e4/core/services/contributions/IContributionFactory.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@
1616
import org.eclipse.e4.core.contexts.IEclipseContext;
1717
import org.osgi.framework.Bundle;
1818

19-
// TBD this became an utility method to create object from a bundle.
20-
// Change it into an utility method somewhere.
19+
/**
20+
* {@link IContributionFactory} is responsible to create contributions and check
21+
* if a contribution is enabled
22+
*/
2123
public interface IContributionFactory {
2224

2325
Object create(String uriString, IEclipseContext context);
@@ -26,4 +28,8 @@ public interface IContributionFactory {
2628

2729
Bundle getBundle(String uriString);
2830

31+
default boolean isEnabled(String uriString) {
32+
return uriString != null;
33+
}
34+
2935
}

0 commit comments

Comments
 (0)