File tree Expand file tree Collapse file tree 5 files changed +28
-3
lines changed
bundles/org.eclipse.ui.workbench
Eclipse UI/org/eclipse/ui/internal Expand file tree Collapse file tree 5 files changed +28
-3
lines changed Original file line number Diff line number Diff line change 4040import org .eclipse .ui .internal .keys .BindingPersistence ;
4141import org .eclipse .ui .internal .keys .BindingService ;
4242import org .osgi .service .component .annotations .Component ;
43+ import org .osgi .service .component .annotations .Reference ;
44+ import org .osgi .service .condition .Condition ;
4345
44- @ Component
46+ @ Component ( service = IModelProcessorContribution . class )
4547public class BindingToModelProcessor implements IModelProcessorContribution {
4648
4749 private Map <String , MBindingContext > contexts = new HashMap <>();
4850 private Map <String , MCommand > commands = new HashMap <>();
4951 private Map <String , MBindingTable > tables = new HashMap <>();
5052 private Set <MKeyBinding > keys = new HashSet <>();
5153
54+ @ Reference (target = "(osgi.condition.id=commandAndContext)" )
55+ Condition commandAndContextCondition ;
56+
5257 @ Execute
5358 void process (final MApplication application , IEclipseContext context ) {
5459 gatherContexts (application .getRootContext ());
Original file line number Diff line number Diff line change 1+ package org .eclipse .ui .internal ;
2+
3+ import org .osgi .service .component .annotations .Component ;
4+ import org .osgi .service .component .annotations .Reference ;
5+ import org .osgi .service .condition .Condition ;
6+
7+ /**
8+ * @since 3.5
9+ *
10+ */
11+ @ Component (service = Condition .class , property = "osgi.condition.id=commandAndContext" )
12+ public class CommandAndContextCondition implements Condition {
13+
14+ @ Reference
15+ CommandToModelProcessor commandToModelProcessor ;
16+
17+ @ Reference
18+ ContextToModelProcessor contextToModelProcessor ;
19+ }
Original file line number Diff line number Diff line change 3737/**
3838 * @since 3.5
3939 */
40- @ Component
40+ @ Component ( service = { IModelProcessorContribution . class , CommandToModelProcessor . class })
4141public class CommandToModelProcessor implements IModelProcessorContribution {
4242
4343 private Map <String , MCategory > categories = new HashMap <>();
Original file line number Diff line number Diff line change 3333/**
3434 * @since 3.5
3535 */
36- @ Component
36+ @ Component ( service = { IModelProcessorContribution . class , ContextToModelProcessor . class })
3737public class ContextToModelProcessor implements IModelProcessorContribution {
3838 private Map <String , MBindingContext > contexts = new HashMap <>();
3939
Original file line number Diff line number Diff line change @@ -137,6 +137,7 @@ Require-Capability: osgi.extender;
137137 filter:="(&(osgi.extender=osgi.component)(version>=1.2)(!(version>=2.0)))"
138138Automatic-Module-Name : org.eclipse.ui.workbench
139139Service-Component : OSGI-INF/org.eclipse.ui.internal.BindingToModelProcessor.xml,
140+ OSGI-INF/org.eclipse.ui.internal.CommandAndContextCondition.xml,
140141 OSGI-INF/org.eclipse.ui.internal.CommandToModelProcessor.xml,
141142 OSGI-INF/org.eclipse.ui.internal.ContextToModelProcessor.xml,
142143 OSGI-INF/org.eclipse.ui.internal.WindowsDefenderConfigurator.xml,
You can’t perform that action at this time.
0 commit comments