Community
Participate
Working Groups
I20070227-0800 - have org.eclipse.jdt.ui v20070227-0800 - Apply Patch... - choose attachment 58261 [details] from bug 172883 - enable 'Reverse patch' - SuperInterfaceSelectionDialog.java has a lot of whitespace changes - enable 'Ignore WhiteSpace' (=> label misses space between 'White' and 'Space') => The 'Patch Contents' tree collapses and the merge viewer is closed. Expected: Tree should refresh, and previous expansion & selection should be restored if possible. - open SuperInterfaceSelectionDialog.java => Whitespace not filtered.
Created attachment 60670 [details] Proposition of changes
Unless I am missing something, I don't think we need to have a property listener on the action since a change in the checked state should only occur through the run method. Therefore, I would expect the code you added to appear in the "if (getPatcher().setIgnoreWhitespace(isChecked())" if statement. You should just be able to set the configuration property before calling rebuildTree().
Created attachment 61281 [details] Proposition of changes
That looks better. The one comment I have is that it would appear that the Ignore Whitespace action results in a double invocation of syncExec (once for the setting of the property and once for the rebuilding of the tree. One thing we could do to fix this would be to only set the property in the action and register a property change listener on the configuration that detects and Ignore Whitespace change on the configuration and rebuilds the tree in response. Since the event would be fired from the UI thread, we would only end up with a single syncExec.
Created attachment 64744 [details] Patch is response for Michael suggestions
I've released the portion of the patch related to Ignore Whitespace. There were some changes in the Reverse functionality which I did not include. Were these related to another bug?
Changes in reverese functionality are part of this bug. I made it beacause rebuildTree() not refresh merge viewer. If we have selected file in patch content and next to we mark or unmark "reverese patch" merge viewer and java structure are still the same (not refreshed) Thats why i made it deselect on patch content. We can make quck fix as in patch or open new bug to reverese functionality.
I would prefer that you open a separate bug.