Skip to content

Commit 0d89707

Browse files
fipro78HannesWell
authored andcommitted
Replaced condition service with direct references
1 parent d2a6573 commit 0d89707

File tree

3 files changed

+9
-23
lines changed

3 files changed

+9
-23
lines changed

bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/BindingToModelProcessor.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
import org.eclipse.ui.internal.keys.BindingService;
4242
import org.osgi.service.component.annotations.Component;
4343
import org.osgi.service.component.annotations.Reference;
44-
import org.osgi.service.condition.Condition;
4544

4645
@Component(service = IModelProcessorContribution.class)
4746
public class BindingToModelProcessor implements IModelProcessorContribution {
@@ -51,8 +50,15 @@ public class BindingToModelProcessor implements IModelProcessorContribution {
5150
private Map<String, MBindingTable> tables = new HashMap<>();
5251
private Set<MKeyBinding> keys = new HashSet<>();
5352

54-
@Reference(target = "(osgi.condition.id=commandAndContext)")
55-
Condition commandAndContextCondition;
53+
// define dependencies to CommandToModelProcessor and ContextToModelProcessor to
54+
// ensure these two IModelProcessorContributions are registered before this
55+
// BindingToModelProcessor
56+
57+
@Reference
58+
private CommandToModelProcessor commandToModelProcessor;
59+
60+
@Reference
61+
private ContextToModelProcessor contextToModelProcessor;
5662

5763
@Execute
5864
void process(final MApplication application, IEclipseContext context) {

bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CommandAndContextCondition.java

Lines changed: 0 additions & 19 deletions
This file was deleted.

bundles/org.eclipse.ui.workbench/META-INF/MANIFEST.MF

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ Require-Capability: osgi.extender;
137137
filter:="(&(osgi.extender=osgi.component)(version>=1.2)(!(version>=2.0)))"
138138
Automatic-Module-Name: org.eclipse.ui.workbench
139139
Service-Component: OSGI-INF/org.eclipse.ui.internal.BindingToModelProcessor.xml,
140-
OSGI-INF/org.eclipse.ui.internal.CommandAndContextCondition.xml,
141140
OSGI-INF/org.eclipse.ui.internal.CommandToModelProcessor.xml,
142141
OSGI-INF/org.eclipse.ui.internal.ContextToModelProcessor.xml,
143142
OSGI-INF/org.eclipse.ui.internal.WindowsDefenderConfigurator.xml,

0 commit comments

Comments
 (0)