Community
Participate
Working Groups
I20071127-0800 The Quick Outline (e.g. on a plugin.xml source page) should start with the enclosing element selected.
Agreed, tagging bugday, adding context.
Created attachment 84314 [details] mylyn/context/zip
Created attachment 86256 [details] PDE source quick outline context setting How's this?
Pre-empting a question :- another obvious solution would be to amend the PDESourcePage#getSelection() method to perform as expected; since at the moment the selection is only set for IStructuredSelection types (i.e. ITextSelection events are completely ignored). The reason I've gone with this solution rather than fixing that is two fold. Firstly, processing the ITextSelection events on the fly could impose an unnecessary performance hit to the source pages; and secondly, a mechanism to simply store the selection events for processing on a call to getSelection is hindered by the PDESourcePage#fSelection variable being protected rather than private, meaning a much more significant refactoring. For now, it's seemed much more prudent to go with this solution, although it may be worth raising another bug to refactor the fSelection to be private (there's already a TODO marker in the code for this just under getSelection), to store the selection event and process it on getSelection(), and then coming back to fix this bug in a different way.
reviewing now...
oh, btw, can you open a bug for that refactoring issue Les? I will commit the patch as is but we should revisit the refactoring when we decide to work on PDE's editing framework more (or someone is courageous enough to step up and do it ;p)
Thanks Les, Markus will love you for it ;)
Created attachment 86326 [details] mylyn/context/zip
Bug 214511 raised for the refactoring issue.
Verified on I20080204-0010