Skip to content

Commit b69c0d3

Browse files
committed
Revert "Use new @IContextFunction.ServiceContextKey component property type"
This reverts commit 5b1af9d.
1 parent 5b1af9d commit b69c0d3

File tree

17 files changed

+36
-44
lines changed

17 files changed

+36
-44
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_4
1+
dsVersion=V1_3
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 & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2009, 2024 IBM Corporation and others.
2+
* Copyright (c) 2009, 2014 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -21,8 +21,7 @@
2121
import org.eclipse.e4.core.contexts.IEclipseContext;
2222
import org.osgi.service.component.annotations.Component;
2323

24-
@Component(service = IContextFunction.class )
25-
@IContextFunction.ServiceContextKey(org.eclipse.e4.core.commands.ECommandService.class)
24+
@Component(service = IContextFunction.class, property = "service.context.key=org.eclipse.e4.core.commands.ECommandService")
2625
public class CommandServiceCreationFunction extends ContextFunction {
2726
/**
2827
* 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 & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2009, 2024 IBM Corporation and others.
2+
* Copyright (c) 2009, 2013 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -20,8 +20,7 @@
2020
import org.eclipse.e4.core.contexts.IEclipseContext;
2121
import org.osgi.service.component.annotations.Component;
2222

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

2726
@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_4
1+
dsVersion=V1_3
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: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2009, 2024 IBM Corporation and others.
2+
* Copyright (c) 2009, 2014 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -17,12 +17,10 @@
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;
2120
import org.eclipse.e4.core.contexts.IEclipseContext;
2221
import org.osgi.service.component.annotations.Component;
2322

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

2826
@Override

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_4
1+
dsVersion=V1_3
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: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2009, 2024 IBM Corporation and others.
2+
* Copyright (c) 2009, 2016 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -23,11 +23,12 @@
2323
import org.osgi.service.component.annotations.Reference;
2424
import org.osgi.service.event.EventAdmin;
2525

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

3334
// mandatory static reference to EventAdmin to ensure it is available before
@@ -49,3 +50,4 @@ public Object compute(IEclipseContext context, String contextKey) {
4950
return broker;
5051
}
5152
}
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_4
2+
dsVersion=V1_3
33
eclipse.preferences.version=1
44
enabled=true
55
generateBundleActivationPolicyLazy=true

bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/MenuServiceCreationFunction.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2010, 2024 IBM Corporation and others.
2+
* Copyright (c) 2010, 2016 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -20,8 +20,7 @@
2020
import org.eclipse.e4.core.di.InjectionException;
2121
import org.osgi.service.component.annotations.Component;
2222

23-
@Component(service = IContextFunction.class)
24-
@IContextFunction.ServiceContextKey(org.eclipse.e4.ui.services.EMenuService.class)
23+
@Component(service = IContextFunction.class, property = "service.context.key=org.eclipse.e4.ui.services.EMenuService")
2524
public class MenuServiceCreationFunction extends ContextFunction {
2625

2726
@Override

bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/StatusReporterCreationFunction.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2010, 2024 IBM Corporation and others.
2+
* Copyright (c) 2010, 2016 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,13 +19,13 @@
1919
import org.eclipse.e4.core.contexts.IEclipseContext;
2020
import org.osgi.service.component.annotations.Component;
2121

22-
@Component(service = IContextFunction.class)
23-
@IContextFunction.ServiceContextKey(org.eclipse.e4.core.services.statusreporter.StatusReporter.class)
22+
@Component(service = IContextFunction.class, property = "service.context.key=org.eclipse.e4.core.services.statusreporter.StatusReporter")
2423
public class StatusReporterCreationFunction extends ContextFunction {
2524

2625
@Override
2726
public Object compute(IEclipseContext context, String contextKey) {
28-
return ContextInjectionFactory.make(WorkbenchStatusReporter.class, context);
27+
return ContextInjectionFactory.make(WorkbenchStatusReporter.class,
28+
context);
2929
}
3030

3131
}

0 commit comments

Comments
 (0)