Bug 182714 - [Contributions] Improve toolbar configurability
Summary: [Contributions] Improve toolbar configurability
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal with 5 votes (vote)
Target Milestone: 3.5   Edit
Assignee: Matthew Bisson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 257204 181308 257179 257185 257903 258037 258148 258153 258158
Blocks: 181040 181075 181614
  Show dependency tree
 
Reported: 2007-04-17 05:13 EDT by Martin Aeschlimann CLA
Modified: 2009-06-03 14:15 EDT (History)
19 users (show)

See Also:


Attachments
First go at menu hiding UI (40.18 KB, patch)
2008-09-22 10:37 EDT, Matthew Bisson CLA
no flags Details | Diff
Progress on improvement (128.03 KB, patch)
2008-10-06 17:36 EDT, Matthew Bisson CLA
no flags Details | Diff
CheckProvider (8.81 KB, patch)
2008-10-21 14:41 EDT, Matthew Bisson CLA
no flags Details | Diff
CustomizePerspectiveDialog logic - latest attempt (144.17 KB, patch)
2008-10-21 14:42 EDT, Matthew Bisson CLA
no flags Details | Diff
Tests for TreeManager (23.52 KB, patch)
2008-10-23 14:40 EDT, Matthew Bisson CLA
emoffatt: iplog+
Details | Diff
Tests for setCheckStateProvider (19.52 KB, patch)
2008-10-29 11:17 EDT, Matthew Bisson CLA
no flags Details | Diff
ICheckStateProvider - revised (28.43 KB, patch)
2008-10-31 09:56 EDT, Matthew Bisson CLA
no flags Details | Diff
ICheckStateProvider - revised again (29.07 KB, patch)
2008-10-31 16:40 EDT, Matthew Bisson CLA
no flags Details | Diff
CustomizePerspectiveDialog UI Work (191.71 KB, patch)
2008-11-06 15:16 EST, Matthew Bisson CLA
no flags Details | Diff
CustomizePerspectiveDialog UI Work (191.72 KB, patch)
2008-11-06 16:54 EST, Matthew Bisson CLA
no flags Details | Diff
Workbench Window Menu hook v01 (7.57 KB, patch)
2008-11-07 10:16 EST, Paul Webster CLA
no flags Details | Diff
ICheckStateProvider - final? (33.65 KB, patch)
2008-11-12 14:56 EST, Matthew Bisson CLA
emoffatt: iplog+
Details | Diff
CustomizePerspectiveDialog UI and Logic (236.41 KB, patch)
2008-11-18 10:14 EST, Matthew Bisson CLA
no flags Details | Diff
CustomizePerspectiveDialog UI and Logic (236.43 KB, text/plain)
2008-11-18 14:44 EST, Matthew Bisson CLA
no flags Details
documentation for the revised CPD (110.39 KB, patch)
2008-11-18 16:01 EST, Matthew Bisson CLA
no flags Details | Diff
CustomizePerspectiveDialog UI and Logic - post code review (233.84 KB, patch)
2008-11-21 15:46 EST, Matthew Bisson CLA
no flags Details | Diff
Customize Perspective Dialog UI and Logic - revised (233.96 KB, patch)
2008-11-28 23:56 EST, Matthew Bisson CLA
emoffatt: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Aeschlimann CLA 2007-04-17 05:13:11 EDT
20070417

The current way of configuring the items shown on the toolbar is limited as
items can only be enabled/disabled by action set.
a.) need a way to enable/disable single toolbar items
The workaround to define more action sets is not the same, as each action set creates a vertical separator on the toolbar. The list of action sets also gets very big and hard to manage.
b.) want to enable/disable toolbar items independent from menus
Currently disabling a action set removes toolbar buttons and menus.
c.) Add a context menu to the toolbar with a 'Configure Toolbar...' action.
The current way: Window > Customize Perspective > Commands.. is not intuitive (I miss the term 'Toolbar' here).

This comes from discussion in bug 181040 (remove New Java project from toolbar), and would be, IMO, a requirement before we start changing tool bar items.
Comment 1 Paul Webster CLA 2007-04-17 07:20:51 EDT
I think this fits in well with the menu override functionality.  It unfortunately didn't make it into 3.3, but targets per-item toolbar or menu control.

Then perhaps a dialog that displayed all buttons currently in the toolbar with their visibility status, and allowed the user to toggle them individually.

A similar process could be targetted for the menus.

PW
Comment 2 Boris Bokowski CLA 2007-07-23 05:37:37 EDT
Note that due to the highly dynamic nature of toolbar or menu contributions, it will be hard to make toolbars and menus configurable in the full sense, like being able to reorder items, or making items appear when they are not.

What should be doable is a UI with which you can hide items, and subsequently unhide items that you've hidden.  Could we start with this and then take it from there?
Comment 3 Michael Scharf CLA 2007-08-08 10:36:12 EDT
Why is it hard to allow to reorder things? The "Customize Perspective" dialog has a list of all command groups. Reordering this list and using this order as the order in which things are displayed should be possible....

Anyway. Here are my priorities (first is most important):
- make menu contributions independent of toolbar contributions
- allow do override the default visibility of command groups (e.g. ClearCase
  contributes 10 toolbar buttons to all perspectives, and I have to remove them
  by hand for every perspective (some contributions think they are so important
  that they should appear on all perspectives)) 
- allow to enable/disable single items from a command group
- reordering is not really important
Comment 4 Markus Keller CLA 2007-08-15 11:07:51 EDT
See also bug 75934 and bug 2861 (has lots of dups).
Comment 5 Matthew Bisson CLA 2008-09-22 10:37:35 EDT
Created attachment 113124 [details]
First go at menu hiding UI

This patch presents the first draft ui which would be used to hide menu items. 

To use:

1. Download patch
2. Check out org.eclipse.ui.workbench.
3. Apply the patch to the project (right click on the project > Team > Apply Patch...)
4. Start a new instance of Eclipse.
5. Start the "Customize Perspective..." dialog (right click on a toolbar > Customize Perspective...)
6. There is a new tab "Menu Items". Click on it.

Use the "Menu Structure" tree on the left to choose which menu items to hide or show: checked means it is shown, unchecked means it is hidden.

Use the "Hidden Menu Items" list on the right to view all hidden menu items in this perspective. Click anything in this list to highlight it in the "Menu Structure".

Use "Suppress hidden menu items from Menu Structure tree" to remove hidden menu items from the "Menu Structure" - you can still see them in the "Hidden Menu Items" list.
Comment 6 Matthew Bisson CLA 2008-10-06 17:36:58 EDT
Created attachment 114358 [details]
Progress on improvement

this is an intermediate snapshot of a solution for this bug. It's still very much in progress.
Comment 7 Matthew Bisson CLA 2008-10-21 14:41:16 EDT
Created attachment 115732 [details]
CheckProvider

Further work has been done on this bug. We are starting to approach a final solution.

We created a model to manage standard check state behaviour in CheckboxTreeViewers and added CheckProvider functionality - allowing on-demand check state querying on a per-element basis. Putting these together with the dialog logic, a useful dialog is almost complete. 

We discovered that our current behaviour is not perfect, however. We attempted to merge the functionality of the "Commands" tab (used to turn action sets on and off) with the "Menu Items" tab (used to turn individual menu items on and off) and the "Toolbar Items" tab. Unfortunately, simply turning menu and toolbar items on and off does not affect their keybindings, whereas turning action sets on and off activate or deactivates all keybindings underneath them. They are not interoperable, so our implementation is rather confusing to a user. As such we realized we need to take the GUI in a new direction.

Attached is our work up until now - before taking the aforementioned "new direction" in an effort to take a snapshot of work up until now. It's still not complete - saving and restoring state is not yet fully implemented, and actually causing a change to be reflected in the menus and toolbars is not implemented. Nonetheless, a lot of work is represented here.

I am submitting the work in two separate patches: the CheckProvider logic in one patch (as it can be applied independently of the menu / toolbar item hiding work) - this patch itself, and the remainder of the CustomizePerspectiveDialog logic in a second patch to follow. 

Patch 1 / 2 - CheckProvider
Comment 8 Matthew Bisson CLA 2008-10-21 14:42:30 EDT
Created attachment 115733 [details]
CustomizePerspectiveDialog logic - latest attempt

Patch 2 / 2 - CustomizePerspectiveDialog. See previous attachment comments for details.
Comment 9 Matthew Bisson CLA 2008-10-21 14:47:56 EDT
I should have mentioned, that in the two above patches, Patch 2 / 2 requires Patch 1 / 2 to be applied first.
Comment 10 Matthew Bisson CLA 2008-10-23 14:40:41 EDT
Created attachment 115971 [details]
Tests for TreeManager

This includes a test class which verifies the standard check tree behaviour in the included model TreeModel.
Comment 11 Dani Megert CLA 2008-10-24 04:03:27 EDT
I didn't look at the patch yet but have a question: will this also allow to configure the view tool bars?
Comment 12 Eric Moffatt CLA 2008-10-24 09:56:09 EDT
Dani, short answer is no. This new functionality appears in the 'Customize Perspective' dialog so won't affect a view's Menu, Toolbar or Context menu (I don't think we want per-perspective view TB arrangements do we?).

Also worth noting here is that this will -not- allow repositioning of menu/tb elements, it only affects the -visibility- of the various components. Hiding a menu or toolbar item will -not- disable its key-bindings either (but we will have a link to the key bindings preference page that will help if you want to unbind them).

Disabling a 'Command Group' (aka ActionSet) -will- both hide the set's items as well as disabling any existing key bindings.
Comment 13 Dani Megert CLA 2008-10-24 10:47:35 EDT
>I don't think we want per-perspective view TB arrangements do we?
No, I'd expect the view toolbar and menu configuration to have the same life-cycle as its settings.
Comment 14 Matthew Bisson CLA 2008-10-29 11:17:00 EDT
Created attachment 116424 [details]
Tests for setCheckStateProvider

First go at creating tests for the new setCheckStateProvider in CheckboxTreeViewer and CheckboxTableViewer
Comment 15 Eric Moffatt CLA 2008-10-29 17:10:45 EDT
Thanks Matt, I'll go over the patch(es) tomorrow...
Comment 16 Eric Moffatt CLA 2008-10-30 15:39:40 EDT
Matt, this looks very good...just a few nits:

1) We should use the same logical values as are currently used in SWT; The current ICheckProvider has a slightly different interpretation but consistency should win out here (should likely change 'isGray' to 'isGrayed' for the same reason).

2) There seems to be quite a lot of overlap in the testing of Tree vs Table versions. Perhaps we can create a common 'utility' class shared by both. This will at least make future folks in this area aware that there are two different controls sharing the bilk of the logic.

Test Coverage: run the test coverage tool on your tests. What current coverage do we have? What's missing?

Comment 17 Matthew Bisson CLA 2008-10-31 09:56:00 EDT
Created attachment 116615 [details]
ICheckStateProvider - revised

This patch reflects the changes Eric suggested. It contains both the ICheckStateProvider/viewer code and the test code.

1. The isChecked/isGrayed semantics now reflect SWT's use in the viewers.

2. I've extracted a lot of common functionality between test cases within test classes, and in turn extracted a lot of common functionality between the two test classes into a utility class.

3. I've run test coverage. All new code is covered. The two tests I modified - CheckboxTableViewerTest and CheckboxTreeViewerTest each have about 50% coverage. Untested parts of these viewers include ICheckStateListener handling, about half of the check state methods, selection handling, some constructors and some static methods.
Comment 18 Eric Moffatt CLA 2008-10-31 13:49:43 EDT
Really, really close!

So far in the implementation I've seen the following:

Still missing the @since tags on the new API (come see me and we'll set you up with an API baseline).

I'm a bit confused about the comment in the 'preservingSelection' method (in both Viewers):

//Still run the updateCode, just don't try to preserve
//the selection

Doesn't the 'super' call explicitly preserve the selection? Perhaps something like:

// Try to preserve the selection, let the ICheckProvider manage the check states

I'm not even sure if that's enough change to re-spin the patch but it likely wouldn't hurt...;-).

Test evaluation coming...BTW, thanks for the nice synopsis on the coverage (you might think about some tests to up the %'age for out post-M3 'test days'...;-).
Comment 19 Eric Moffatt CLA 2008-10-31 16:00:52 EDT
Matt, the tests look fine. I'd add some explicit tests to cover each of the four boolean states just to ensure that all the 'boxes' are covered.

Comment 20 Matthew Bisson CLA 2008-10-31 16:40:31 EDT
Created attachment 116657 [details]
ICheckStateProvider - revised again

Thanks for the comments Eric. Here's what I've done:

1. Set up the baseline in my IDE, added the @since tags.

2. Changed comments to make more sense

3. I hope to bolster the CheckboxTableViewer and CheckboxTreeViewer tests :-)

4. Modified the CheckboxTableViewer and CheckboxTreeViewer logic to consider all four cases (unchecked-ungrayed, unchecked-grayed, checked-ungrayed, checked-grayed) whereas it had previous converted the unchecked-grayed case to unchecked-ungrayed. The current SWT behaviour is described in the ICheckStateProvider interface: unchecked-ungrayed and unchecked-grayed are rendered identically. 

5. Modified the tests I already had written to cover all four cases, whereas they had previously had only generated and checked the tree cases. Now they generate and check both.

6. Added explicit tests which simply setup a single element and test its state. I made one test for each of the four cases.
Comment 21 Matthew Bisson CLA 2008-11-06 15:16:07 EST
Created attachment 117242 [details]
CustomizePerspectiveDialog UI Work

This patch represents all work done to the UI portion of hiding menu items and toolbar items by modifying CustomizePerspectiveDialog. It requires a full code review, however at present all the necessary functionality (that I'm aware of) is there. 

In summary:
Shortcuts tab -- same functionality
Action Sets tab -- same functionality, renamed to "Command Group Availability"
Menu Visibility tab -- allows menu item visibility to be set, menu items can be filtered by command group
Toolbar Visibility tab -- allows toolbar item visibility to be set, toolbar items can be filtered by command group

All these tabs remain up-to-date with each other's information. Action which put other tabs in an inconsistent state are not allowed (e.g. trying to make a menu item visible whose command group is unavailable).

Also, tabs have not yet been reordered, however we plan on doing this.
Comment 22 Matthew Bisson CLA 2008-11-06 16:54:53 EST
Created attachment 117267 [details]
CustomizePerspectiveDialog UI Work

Found some errors in the typos. One less thing to cover in the code review :-)
Comment 23 Paul Webster CLA 2008-11-07 10:16:02 EST
Created attachment 117321 [details]
Workbench Window Menu hook v01

Matt, here's a patch for you to explore overriding the main workbench window menu.

PW
Comment 24 Pawel Piech CLA 2008-11-10 12:06:18 EST
Hi Paul and Matt,
I did something very similar to this bug a few months ago (bug 75934 comment #9).  It only deals with toolbar visibility, but the main idea is the same.  I'm really glad this issue is being addressed in 3.5 and I hope my patch may save you some time.

-Pawel


Comment 25 Eric Moffatt CLA 2008-11-10 16:18:35 EST
Matt, Boris and I have reviewed the patch for the CheckboxViewer (and tests). It looks very good. The final tweaks we've identified are:

- Test with setting a sorter and or a filter...
- Test to ensure proper 'lazy' tree behavior (i.e. the check provider is -not- called for unexpanded tree children)

- setCheckstateProvider should force 'refresh' to match 'setLabelProvider' (+ a test to ensure that the refresh happens)

- The 'updateCheckStates' should either be private or the code moved into the doUpdate... method

As a special bonus we should put a reference to SWT Snippet274 in the j'doc (for CheckboxTreeViewer) to point folks at the 'standard' boxing behavior sample.

Once you're done attach the patch here. I'll copy it over to the actual enhancement request bug once I've found it...

Comment 26 Matthew Bisson CLA 2008-11-12 14:56:06 EST
Created attachment 117701 [details]
ICheckStateProvider - final?

I've incorporated all of your comments into this patch - hopefully it's satisfactory!
Comment 27 Matthew Bisson CLA 2008-11-18 10:14:00 EST
Created attachment 118138 [details]
CustomizePerspectiveDialog UI and Logic

Thanks to Paul's help, the CPD now actually hides menu and tool bar items!

This patch also has:
- cleaned up code
- tabs reordered
- tooltips have been given some more useful information
- tooltips now have a minimum width
Comment 28 Matthew Bisson CLA 2008-11-18 14:44:07 EST
Created attachment 118176 [details]
CustomizePerspectiveDialog UI and Logic

found a bug in the last patch... it's corrected in here!
Comment 29 Matthew Bisson CLA 2008-11-18 16:01:07 EST
Created attachment 118192 [details]
documentation for the revised CPD

New help files, including interactive help, Tasks=>Perspectives help and Tutorials. Includes new pictures (mostly screen caps) - not sure if the patch will transmit them properly. Let me know and I'll send them to you.
Comment 30 Eric Moffatt CLA 2008-11-19 14:35:50 EST

CPD Review:

Overall it looks fine...the class is a monster now at ~3400 lines but it does -lots-! Once you fix the nits below and I get Paul to review the Commands changes it's likely good to go...;-)

ToolBarContributionItem: apparently unnecessary override of 'update'
CoolBarManager2: only change is a newline

Perspective: non-null checked 'get' of the CoolBarManager (@2602) + Fix 'ToDo' (IWorkbenchRegistryConstants?)

ReopenEditorMenu: only change is whitespace

CPD:

Is there no way to get rid of all of the constants ? See WorkbenchTriggerPoints...

Too many inner classes ?? Some of these (The TTip support classes) look like that could go into jface (internal?)

"nonentity" ? How does this work ? Override your layout's 'computeSize' instead.

1116: typo 'oppose' -> 'opposed'

can 'toDispose' ever get dups? if so, need an 'isDisposed()' check before disposing...use Set?

Do we need funky accessibility column support?

getIDFromIContributionItem: Not sure if throwing an exception is the right thing (destroys control flow) just return 'null'

Refactor the CPD:ContributionItem to something that doesn't match an existing class that's already being used

TreeManager: Just directly cast the object, that'll throw a CCE at the same place as you do but the code is cleaner
Comment 31 Matthew Bisson CLA 2008-11-21 15:46:52 EST
Created attachment 118518 [details]
CustomizePerspectiveDialog UI and Logic - post code review

Replies to comments:

> ToolBarContributionItem: apparently unnecessary override of 'update'
fixed

> CoolBarManager2: only change is a newline
fixed

> Perspective: non-null checked 'get' of the CoolBarManager (@2602)
fixed

> + Fix 'ToDo'
> (IWorkbenchRegistryConstants?)
fixed
 
> ReopenEditorMenu: only change is whitespace
fixed

> CPD:
> 
> Is there no way to get rid of all of the constants ? See
> WorkbenchTriggerPoints...
I'm afraid it wasn't so simple...
* icons - could not find the text anywhere else
* "new" - replaced with org.eclipse.ui.ActionFactory.NEW.getId()
* "openPerspective", "showView" - no way to access text
* "org.eclipse.ui.newWizard" - not same as the constant in WorkbenchTriggerPoints
* "org.eclipse.ui.perspectives.showPerspective" - not visible anywhere (it is private in some places)
* "org.eclipse.ui.views.showView" - replaced with ShowViewMenu.SHOW_VIEW_ID
* "newWizardId" - unavailable
* "org.eclipse.ui.perspectives.showPerspective.perspectiveId" - unavailable
* "org.eclipse.ui.views.showView.viewId" - replaced with ShowViewMenu.VIEW_ID_PARM
* "org.eclipse.ui.preferencePages.Keys" - not accessible anywhere else
* System.getProperty("line.separator") - every where else is used in the same way

> Too many inner classes ?? Some of these (The TTip support classes) look like
> that could go into jface (internal?)
for the time being, we'll leave alone. In the future we may want to promote these to top-level classes

> "nonentity" ? How does this work ? Override your layout's 'computeSize'
> instead.
totally rewrote this part: previously, many sub-composites were being used, now the GridLayout is being used properly to achieve both layout and minimum size

> 1116: typo 'oppose' -> 'opposed'
fixed

> can 'toDispose' ever get dups? if so, need an 'isDisposed()' check before
> disposing...use Set?
fixed

> Do we need funky accessibility column support?
we've decided for the time being not to worry about this. It's very minor.

> getIDFromIContributionItem: Not sure if throwing an exception is the right
> thing (destroys control flow) just return 'null'
changed

> Refactor the CPD:ContributionItem to something that doesn't match an existing
> class that's already being used
renamed it to "DisplayItem"

> TreeManager: Just directly cast the object, that'll throw a CCE at the same
> place as you do but the code is cleaner
done

As well, I found a bug: when we turned filtering by command group on, the decision of whether to disable a menu item (i.e. make it grey) did not take into account which children of the item were visible: it simply calculated this state from all its children. The result was some parent menu items showing children which were all grey/disabled, but the parent did not appear grey/disabled. Clicking on its checkbox had no feedback (including no checkbox state change). I've fixed this as well.
Comment 32 Matthew Bisson CLA 2008-11-28 23:56:48 EST
Created attachment 119064 [details]
Customize Perspective Dialog UI and Logic - revised

Found a bug - in Command Groups tab, hovering over leaf menu or toolbar item in an unavailable command group gives wrong message.
Comment 33 Boris Bokowski CLA 2008-11-29 00:19:00 EST
Should we try to get this in for M4? This is a large change and needs as much testing as possible from the community. There is a risk involved, being so close to M4, but it is a change to a feature that seems (at least to me) not critical. What do you think?
Comment 34 Dani Megert CLA 2008-11-29 06:01:55 EST
I agree that we should get early and as much testing on this from the community as we can get, hence putting it in M4 is good. However, I see two conditions for putting this into M4 (which is claimed to be a STABLE build):
1) it must be in the next I-build (I20081202-0800) - putting it into an I-build during for the milestone week would be clearly too late and risky in my opinion
2) while enabled by default there should be a switch to turn off the new code in case of severe damage to M4
Comment 35 Eric Moffatt CLA 2008-11-30 15:31:37 EST
That was the intent. I'm running the tests now and if they don't show anything bad this will go in on Monday.
Comment 36 Eric Moffatt CLA 2008-12-01 08:39:38 EST
There are four tests that currently fail. They all occur when there is no open perspective, causing an NPE at line 1279 of WorkbenchWidnow.

I'll add the null check and keep going...
Comment 37 Eric Moffatt CLA 2008-12-01 08:42:17 EST
Missed one, another check added at line 1193.
Comment 38 Paul Webster CLA 2008-12-01 09:20:16 EST
(In reply to comment #32)
> Created an attachment (id=119064) [details]
> Customize Perspective Dialog UI and Logic - revised
> 

Looks good.  The only 3 comments I have are:

1) In org.eclipse.ui.internal.Perspective.setHiddenToolbarItems(Collection) you extract the CoolBarManager from the WorkbenchWindow.  This might be one of the places that requires one of the WorkbenchWindow update or re-layout methods.  I'd talk to Eric about this.

2) I would still add an @since tag to org.eclipse.jface.internal.provisional.action.ICoolBarManager2.setOverrides(IContributionManagerOverrides)


3) org.eclipse.ui.menus.CommandContributionItem.getCommand() needs a proper javadoc since it is API, and I would add that the ParameterizedCommand returned from this method should be treated as a read-only object.  We can remove the restriction in M5 if it is unnecessary.

PW
Comment 39 Boris Bokowski CLA 2008-12-01 09:28:02 EST
(In reply to comment #36)
> There are four tests that currently fail. They all occur when there is no open
> perspective, causing an NPE at line 1279 of WorkbenchWidnow.
> 
> I'll add the null check and keep going...

Could you post the pieces of code that fail with a NPE here? I'd like to know what kind of NPEs these are.
Comment 40 Eric Moffatt CLA 2008-12-01 09:39:20 EST
Boris, they were in the WorkbenchPageTest suite, any that set the current perspective to null (testGetOpenPerspectives, testGetSortedPerspectives, testClosePerspective & testCloseAllPerspectives) would NPE...the code was:

//Has the client intentionally hidden the menu item?
if(perspective.getHiddenMenuItems().contains(id)) {
     return Boolean.FALSE;
}

I just added a null check...
Comment 41 Eric Moffatt CLA 2008-12-01 10:22:55 EST
Paul, I've just added the changes as you've suggested. We've been looking into the layout issues and I'll open a separate defect to cover it...

Matt, looks really nice, good work! Paul, thanks dude (a lot) for making this all possible by updating the menu infrastructure to make this doable...

Committed in >20081201. Applied the last patch -and- the TreeManagerTests patch.
Comment 42 Paul Webster CLA 2008-12-01 10:25:56 EST
Committed in >20081201. Applied the last patch -and- the TreeManagerTests
patch.
Comment 43 Boris Bokowski CLA 2008-12-01 10:44:14 EST
(In reply to comment #40)
> Boris, they were in the WorkbenchPageTest suite

OK so the null checks were needed in the tests, not in WorkbenchWindow.java?
Have you checked the Javadoc for the called methods to make sure that they don't return null illegally?
Comment 44 Matthew Bisson CLA 2008-12-01 11:35:17 EST
Boris, the changes were in WorkbenchWindow - you can see them on line 1193. The null variable was the result of invoking WorkbenchPage.getActivePerspective(), which is permitted to return null. The null check now takes care of this case.
Comment 45 Dani Megert CLA 2008-12-02 06:55:41 EST
O-o: this caused severe damage, see bug 257179.
Comment 46 Paul Webster CLA 2008-12-02 07:54:39 EST
Added bug 257185 to consider dynamic contribution edge case.
PW
Comment 47 Eric Moffatt CLA 2008-12-02 14:32:04 EST
Committed in >20081202. Committed the documentation patch.
Comment 48 Eric Moffatt CLA 2008-12-02 14:32:52 EST
NOTE: I had to get a valid copy of the images directly from Matt, the ones in the patch are corrupt...
Comment 49 Markus Keller CLA 2008-12-02 15:36:57 EST
> NOTE: I had to get a valid copy of the images directly from Matt, the ones in
> the patch are corrupt...

Matt should have seen a warning when he created the patch. See bug 67306 and bug 257263.
Comment 50 Eric Moffatt CLA 2008-12-12 12:22:49 EST
Verified in I20081210-1800.