Community
Participate
Working Groups
We have some use cases where we need to remember the current active Tab and Section and later in the lifecycle we need to select those again. Currently there is no API for this functionality.
Do these belong to you? Forward as necessary. Thanks,
We (WTP graphical WSDL, XSD editors) also have a few use cases which could benefit from having these APIs for setting the current tab/section.
In plan for Eclipse 3.4
(In reply to comment #3) > In plan for Eclipse 3.4 > But did they make it into the implementation for 3.4?
This feature was on an IBM internal list for 3.4. No further follow up occurred since July 2007. Moving to 3.5 as the JUnit tests in the properties view could make use of these API.
*** Bug 237463 has been marked as a duplicate of this bug. ***
Removing plan keyword for bugs that are not linked to the 3.5 (Galileo) plan.
This enhancement is targeted for the 3.5 release, but is not in the rolled up plan for the platform for 3.5 (plan keyword has been removed). I am guessing that there are too many enhancements from the 17 or so platform components, so the list is cleaned a little to list only major enhancements.
Created attachment 118272 [details] Patch for getters and setters for the current Tab Here is the patch for the proposed changes for Tab support in TabbedPropertySheetPage public ITabDescriptor getSelectedTab() - Returns the currently selected tab. public ITabDescriptor[] getActiveTabs() - Returns the list of currently active tabs. public void setSelectedTab(String id) - Set the currently selected tab to be that of the provided tab id. The ID matches the Tab ID in the TabDescriptor extension point as we all the ITabDescriptor.getId() returned from the getters. Please confirm this is sufficient.
Created attachment 118274 [details] Junits for the tab support Updated the JUnits to take advantage of the new API. Was able to remove the need to access internals in the JUnits.
Can someone let me know how setting the active section is going to work? What is the expectation here and why would we use it?
Hi Anthony, The setSelectedTab method will be helpful. One of our use cases involves providing a context menu action, (or any action/command in the editor) that selects the specific tab showing the relevant properties for the currently selected element. This will provide direct access to this content. ie. instead of "Show Properties", it will be "Show XYZ Properties". I tested out your patch, and there's a minor change required: if (tabDescriptor.getId() != null && tabDescriptor.getId().equals(id)) { My action works just fine after this.
(In reply to comment #12) > > if (tabDescriptor.getId() != null && > tabDescriptor.getId().equals(id)) { > Ouch, good catch. My JUnit tests used setSelectedTab(tabDescriptors[4].getId()) and I did not catch that in my tests tab id == tab name. I will fix and fix the tests as well.
(In reply to comment #13) > > My JUnit tests used setSelectedTab(tabDescriptors[4].getId()) and I did not > catch that in my tests tab id == tab name. I will fix and fix the tests as > well. > This issue is fixed by Bug 256485 .
Created attachment 118702 [details] Patch for getters and setters for the current Tab Fixed patch for the issue found by Keith. Keith, can you give another test and I will commit the fix for tabs? Still waiting feedback for sections.
Committed patch for getters and setters for the current Tab to HEAD, as well as the JUnit tests.
Anthony, I've retested my action to select the tab and it's fine. Note, I've only tested setSelectedTab. Thanks for providing this feature.
(In reply to comment #15) > > Still waiting feedback for sections. > I have yet to get feedback on how remembering an active section is helpful or navigating to an active section is going to work. So Changing the name of this enhancement to "need getters and setters for the current Tab" and Resolving as fixed in 3.5 M4. If anyone wants getters and setters for sections I would request we create a new Bugzilla.
*** Bug 279421 has been marked as a duplicate of this bug. ***