Skip to content

Commit c64beb9

Browse files
committed
Use new @IContextFunction.ServiceContextKey component property type
1 parent f35df38 commit c64beb9

File tree

18 files changed

+37
-28
lines changed

18 files changed

+37
-28
lines changed

bundles/org.eclipse.e4.core.commands/.settings/org.eclipse.pde.ds.annotations.prefs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
dsVersion=V1_3
1+
dsVersion=V1_4
22
eclipse.preferences.version=1
33
enabled=true
44
generateBundleActivationPolicyLazy=true

bundles/org.eclipse.e4.core.commands/src/org/eclipse/e4/core/commands/internal/CommandServiceCreationFunction.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
import org.eclipse.e4.core.contexts.IEclipseContext;
2222
import org.osgi.service.component.annotations.Component;
2323

24-
@Component(service = IContextFunction.class, property = "service.context.key=org.eclipse.e4.core.commands.ECommandService")
24+
@Component(service = IContextFunction.class )
25+
@IContextFunction.ServiceContextKey(org.eclipse.e4.core.commands.ECommandService.class)
2526
public class CommandServiceCreationFunction extends ContextFunction {
2627
/**
2728
* A context key (value "rootContext") that identifies the root of this context chain. It does

bundles/org.eclipse.e4.core.commands/src/org/eclipse/e4/core/commands/internal/HandlerServiceCreationFunction.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
import org.eclipse.e4.core.contexts.IEclipseContext;
2121
import org.osgi.service.component.annotations.Component;
2222

23-
@Component(service = IContextFunction.class, property = "service.context.key=org.eclipse.e4.core.commands.EHandlerService")
23+
@Component(service = IContextFunction.class)
24+
@IContextFunction.ServiceContextKey(org.eclipse.e4.core.commands.EHandlerService.class)
2425
public class HandlerServiceCreationFunction extends ContextFunction {
2526

2627
@Override

bundles/org.eclipse.e4.ui.bindings/.settings/org.eclipse.pde.ds.annotations.prefs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
dsVersion=V1_3
1+
dsVersion=V1_4
22
eclipse.preferences.version=1
33
enabled=true
44
generateBundleActivationPolicyLazy=true

bundles/org.eclipse.e4.ui.bindings/src/org/eclipse/e4/ui/bindings/internal/BindingServiceCreationFunction.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@
1717
import org.eclipse.e4.core.contexts.ContextFunction;
1818
import org.eclipse.e4.core.contexts.ContextInjectionFactory;
1919
import org.eclipse.e4.core.contexts.IContextFunction;
20+
import org.eclipse.e4.core.contexts.IContextFunction.ServiceContextKey;
2021
import org.eclipse.e4.core.contexts.IEclipseContext;
2122
import org.osgi.service.component.annotations.Component;
2223

23-
@Component(service = IContextFunction.class, property = "service.context.key=org.eclipse.e4.ui.bindings.EBindingService")
24+
@Component(service = IContextFunction.class)
25+
@ServiceContextKey(org.eclipse.e4.ui.bindings.EBindingService.class)
2426
public class BindingServiceCreationFunction extends ContextFunction {
2527

2628
@Override

bundles/org.eclipse.e4.ui.di/META-INF/MANIFEST.MF

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ Import-Package: jakarta.inject;version="[2.0.0,3.0.0)",
1212
org.eclipse.e4.core.di.annotations;version="0.15.0",
1313
org.eclipse.e4.core.di.internal.extensions;version="0.15.0",
1414
org.eclipse.e4.core.di.suppliers,
15-
org.osgi.service.event;version="[1.3.0,2.0.0)"
15+
org.osgi.service.event;version="[1.3.0,2.0.0)",
16+
org.osgi.service.event.propertytypes;version="[1.4.0,2.0.0)"
1617
Export-Package: org.eclipse.e4.ui.di,
1718
org.eclipse.e4.ui.internal.di;x-internal:=true
1819
Require-Capability: osgi.extender;

bundles/org.eclipse.e4.ui.di/src/org/eclipse/e4/ui/internal/di/UIEventObjectSupplier.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,13 @@
2828
import org.osgi.service.component.annotations.Reference;
2929
import org.osgi.service.event.EventAdmin;
3030
import org.osgi.service.event.EventHandler;
31+
import org.osgi.service.event.propertytypes.EventTopics;
3132

3233
import jakarta.inject.Inject;
3334

3435
@Component(service = { ExtendedObjectSupplier.class, EventHandler.class }, property = {
35-
"dependency.injection.annotation=org.eclipse.e4.ui.di.UIEventTopic",
36-
"event.topics=" + IEclipseContext.TOPIC_DISPOSE })
36+
"dependency.injection.annotation=org.eclipse.e4.ui.di.UIEventTopic" })
37+
@EventTopics(IEclipseContext.TOPIC_DISPOSE)
3738
public class UIEventObjectSupplier extends EventObjectSupplier {
3839

3940
class UIEventHandler implements EventHandler {

bundles/org.eclipse.e4.ui.services/.settings/org.eclipse.pde.ds.annotations.prefs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
dsVersion=V1_3
1+
dsVersion=V1_4
22
eclipse.preferences.version=1
33
enabled=true
44
generateBundleActivationPolicyLazy=true

bundles/org.eclipse.e4.ui.services/src/org/eclipse/e4/ui/services/events/EventBrokerFactory.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,11 @@
2323
import org.osgi.service.component.annotations.Reference;
2424
import org.osgi.service.event.EventAdmin;
2525

26-
27-
2826
/**
2927
* Use this class to obtain an instance of {@link IEventBroker}.
3028
*/
31-
@Component(service = IContextFunction.class, property = "service.context.key=org.eclipse.e4.core.services.events.IEventBroker")
29+
@Component(service = IContextFunction.class)
30+
@IContextFunction.ServiceContextKey(IEventBroker.class)
3231
public class EventBrokerFactory extends ContextFunction {
3332

3433
// mandatory static reference to EventAdmin to ensure it is available before
@@ -50,4 +49,3 @@ public Object compute(IEclipseContext context, String contextKey) {
5049
return broker;
5150
}
5251
}
53-

bundles/org.eclipse.e4.ui.workbench.swt/.settings/org.eclipse.pde.ds.annotations.prefs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
classpath=true
2-
dsVersion=V1_3
2+
dsVersion=V1_4
33
eclipse.preferences.version=1
44
enabled=true
55
generateBundleActivationPolicyLazy=true

0 commit comments

Comments
 (0)