| Summary: | Open Declaration is currently only supported via Hyperlinking, create a specific menu action for it as well | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Adam Taylor <awtaylor> | ||||
| Component: | IMP | Assignee: | Robert M. Fuhrer <rfuhrer> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | enhancement | ||||||
| Priority: | P3 | ||||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Adam Taylor
Created attachment 179698 [details]
Proposed Implementation
Additionally this patch simplifies TextEditorActionContributor and corrects ITextEditorActionDefinitionIds
Yes, this has been missing for a long time now; thanks for the patch! It had a couple of other additions mingled in, which I omitted (like support for warning/info annotations). That's for another day. :-) Some of the code looks as though it's been copied from the JDT, which is of course fine. Did you copy code from any other source? Sorry, I thought I had isolated the code which pertained to this particular bug. JDT was the only source. Ok, it took a while to tease out of the patch the pieces of code that were really intended for this bit of functionality, along with adapting it a bit here and there (including a bit of much-needed refactoring to TargetLink and EditoryUtility). Also, OpenAction.selectionChanged(ITextSelection) did nothing, which caused the action never to be enabled when the current selection was in a text editor. I fixed that by extracting the code from run(...) that looks at the current selection and identifies the ref target, and using that to determine whether the action should be enabled. At any rate, it's all checked in now. BTW, I omitted the piece of logic that called OpenAction.isProcessable(), since this didn't seem to be useful - if this action gets called, the editor in question is always a UniversalEditor. So, as long as there's a valid IParseController, and an IReferenceResolver, and those cough up something useful, the action is able to do what it needs. I think this may mean that we don't actually need the IAdapter that turns things into IEditorInputs (or was it ISourceEntity's?), but I'm not sure at the moment. Thanks again for the patch!! |