Provides a fix for Issue #611, requires SWT PR #2392 #1940
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR allows us to fix issues with the CSS Spy, detailed in Issue #611 Completed with @neilcabanilla.
Only set style bits will be shown when inspecting a widget whose class has a getStyles method defined in Eclipse SWT.
Changes
Modified section of CssSpyPart's populate method to use the getStyles method when grabbing a list of styles for a widget class that has it defined. No other files are changed.
Motivation
This implementation was chosen because it isn't overly complex, while meeting all the requirements we need. It doesn't require much upkeep, moving most of the code to Eclipse SWT allows us to potentially help other projects, and we don't have to use a complex parser.
As of writing this PR, we have completed the getStyles implementations for the Button and Text classes. We plan on getting the rest (and anyone else can work on this too), but this will take a lot of time. This implementation will allow us to correctly display any currently implemented widget's styles, without having to update PDE all the time.