Summary: | [KeyBindings] Accelerators don't work just after the page is changed in the multi-page editor | ||
---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Mari Kuroki <kuroki> |
Component: | UI | Assignee: | Douglas Pollock <douglas.pollock> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P1 | CC: | david_williams, Karen_Williamson, kitlo, takes, uchi |
Version: | 2.1 | ||
Target Milestone: | 2.1.3 | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: |
Description
Mari Kuroki
2003-05-14 14:03:25 EDT
Could you provide us the status of this problem ? We would like to know what is going on about this problem. . Could you please update the status on this problem ? Thank you. the command handler service (used to be part of the key binding service in 2.1) is provided to the granularity of a page. multi-editor parts need to provide further granularity down to their individual pages and manage the page switching. doug can you look at this? *** Bug 27539 has been marked as a duplicate of this bug. *** This has been schedule to be looked at for the 2.1.3 maintenance release. I've made it so that KeyBindingService, implements INestableKeyBindingService (a sub-interface of IKeyBindingService). This interface adds methods to register and switch between active key binding services. It has been committed to the 2.1.3 stream. I will now port it to the 3.0 stream, and include the test case. (I'm only including the test case in 3.0, as we have not versioned our test suites for the maintenance stream, and it is more effort than its worth for one test.) Should be fixed in both 2.1.3 and 3.0. Not yet verified in 2.1.3. Changes only apply to MultiPageEditorPart and MultiPageEditorSite. To verify this fix, load the multi-page editor example v20030315. Modify the "createPage0()" method to include this: editor.getSite().getKeyBindingService().setScopes(new String[] { "Moo" }); Modify the "pageChange(int)" method to append: String[] scopes = getSite().getKeyBindingService().getScopes(); System.out.print("Scopes = "); for (int i = 0; i < scopes.length; ) { System.out.print(scopes[i]); if (++i < scopes.length) { System.out.print(","); } } System.out.println(); Open a multi-page editor example, you should see "Moo" printed when the first tab is activated. For the other tabs, you shouldn't. verified on MOTIF for build 2.1.3RC2 verified on Win2000 for build 2.1.3RC2 verified on mac for 2.1.3 RC2 I tried to verify this fix using the multipage editor example with 2.1.3RC2 build. However, It seems that this fix has an effect if the page is added to MultiPageEditorPart as IEditorPart. When the page is added to MultiPageEditorPart as Control, I think the accelerators have not worked yet. For example, if we want to have different scopes for each page, how should we modify the multipage editor example? (We are adding all pages to MultiPageEditorPart as Control in our program.) For controls, I would recommend creating your own nested key binding services. Similar to what is done in MultiPageEditorSite.getKeyBindingService(). You will need to control activation of these nested services (see: setFocus(int)). If you would like this functionality added in 3.0, please open a new bug and provide a suggested design. |