| Summary: | remove printout of 'no binding table...' to std err | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Brian de Alwis <bsd> |
| Component: | UI | Assignee: | Brian de Alwis <bsd> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | beth, henrik.lindberg, Michael_Rennie, pwebster, torkildr |
| Version: | 4.2 | ||
| Target Milestone: | 4.2.2 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
with the processing addon adding the MBindingContext and potentially the MBindingTable should fill in the running service binding table system. But why is the binding context not defined? Is this an e4 problem, or a compat/plugin.xml problem? Or are we running functionality out of order? PW (In reply to comment #1) > But why is the binding context not defined? Is this an e4 problem, or a > compat/plugin.xml problem? Or are we running functionality out of order? When running, I see: No binding table for org.eclipse.ui.contexts.dialog No binding table for org.eclipse.ui.contexts.dialog Those are the System.err.println in #activateBinding and #deactiveBinding(). There are two outputs as I first call #deactivateBinding() followed by an #activateBinding() as #activateBinding() doesn't check if the binding already exists. This processing is done through an addon too, but the addon is itself installed through a fragment processor. The processor specifies beforefragment="false", and the addon is added to the end of the list, so it *should* run after binding addon. And indeed I see the order is: BindingServiceAddon, BindingProcessingAddon, CocoaUIHandler. The code in question in the CocoaUIHandler does the following: private static final String COMMAND_ID_CLOSE_DIALOG = "org.eclipse.ui.cocoa.closeDialog"; //$NON-NLS-1$ private static final String CLOSE_DIALOG_KEYSEQUENCE = "M1+W"; //$NON-NLS-1$ private static final String DEFAULT_ACCELERATOR_CONFIGURATION = "org.eclipse.ui.defaultAcceleratorConfiguration"; //$NON-NLS-1$ TriggerSequence sequence = bindingService .createSequence(CLOSE_DIALOG_KEYSEQUENCE); ParameterizedCommand cmd = commandService.createCommand( COMMAND_ID_CLOSE_DIALOG, null); Binding binding = bindingService.createBinding(sequence, cmd, DEFAULT_ACCELERATOR_CONFIGURATION, EBindingService.DIALOG_CONTEXT_ID); bindingService.deactivateBinding(binding); bindingService.activateBinding(binding); I also get this on Mac OSX 10.6.8 (Snow Leopard)
on Juno, most recently RC2, on eclipse SDK ("eclipse classic"), epp parallel package, and others.
Does this mean there is something wrong? Will be hard to explain to users.
Brian, I thought you updated the code to add the binding table on mac? PW This is a harmless warning message that can be safely ignored; we could comment it out. Paul: I didn't change activateBinding to create the table — in looking at bug 353628, I determined the only consequence was that the close-dialog binding was effectively ignored, and didn't seem a high-priority must-fix compared to the other issues I was investigating at the time. Marking this for 4.2.1. I don't know that I want activateBinding to create tables randomly. Our Eclipse4 system should be "update model correctly" -> bindings update correctly. PW Ok, makes sense. closing as WONTFIX. WONTFIX .. But ... will the error message be commented out? Reopen and rename to "remove printout of 'no binding table...' to std err" ? (please). we should either log it or remove it completely. PW The logging statement's been removed for 4.2.1. This bug was about activateBindings and got (inadvertently) hijacked. verified in latest code. looks like it was committed as part of: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=406bb59bb96e0eebb17317cc3e6fbcdf470fc494 and http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=e8654a1fc4c9dc50cd2eea6803cffa672dd5c304 |
BindingServiceImpl #activateBinding() ignores bindings when the specified binding table does not exist. It should create the table and hook it into the model. public void activateBinding(Binding binding) { String contextId = binding.getContextId(); BindingTable table = manager.getTable(contextId); if (table == null) { System.err.println("No binding table for " + contextId); //$NON-NLS-1$ return; } table.addBinding(binding); }