Summary: | [code mining] Support for action CodeMining | ||
---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Angelo ZERR <azerr> |
Component: | Text | Assignee: | Angelo ZERR <azerr> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | enhancement | ||
Priority: | P3 | CC: | daniel_megert, gautier.desaintmartinlacaze, Lars.Vogel, mistria |
Version: | 4.8 | Keywords: | noteworthy |
Target Milestone: | 4.8 M5 | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://git.eclipse.org/r/115075 https://git.eclipse.org/c/platform/eclipse.platform.text.git/commit/?id=e8186dc22f970dae14d07ccb5341906955989f29 https://git.eclipse.org/r/115809 https://git.eclipse.org/c/www.eclipse.org/eclipse/news.git/commit/?id=7af0e31a19e9566f7fb8819ed75278c6cf42265b |
||
Whiteboard: | |||
Bug Depends on: | 527720, 529087 | ||
Bug Blocks: | 529316, 526969 |
Description
Angelo ZERR
2017-12-11 08:29:58 EST
+1. Note that these workflows can already be implemented by placing MouseListeners in the `draw` method. It's not extremely straightforward, but it works ;) (In reply to Angelo ZERR from comment #0) > * hover mining: when mining is hovered, the label mining (or icons) must be > displayed as hovered (like an hyperlink for label) I don't think we should give user the opportunity to tweak it. If they use an AbstractCodeMining, hover should just underline the label or icon for instance. Users shouldn't be requested to implement it manually. > * gives the capability to add an action with a new API like > ------------------------------------------ > ICodeMining#addSelectionListener(CodeMiningSelectionListener listener) > ICodeMining#removeSelectionListener(CodeMiningSelectionListener listener) > ------------------------------------------ > Question: if we have addSelectionListener, it means that we have several > actions to execute, is it a good idea? Perhaps we should provide an hover > which displays list of available actions to execute (like Hyperlink)? Let's start smaller and minimize APIs there. The 'codeMiningSelected' action could simply be an (optional) method to implement in the ICodeMining implementation. Let's avoid creating specific listener, and start by assuming the provider of the CodeMining has the full control over the action, before implementing some extensibility we may not need. For example, the `N implementations` codemining would implement a `codeMiningSelected()` method that would show the search result. @Mickael, once you will accept https://bugs.eclipse.org/bugs/show_bug.cgi?id=529087 I will create a gerrit patch to support action. It will help more to discuss about this feature. Please note that, I'm using this action support for: * inside the InlinedAnnotationDemo (now you can click on the colorized square to open the ColorDialog). * to Run/Debug Junit test See demo at https://bugs.eclipse.org/bugs/show_bug.cgi?id=529316 New Gerrit change created: https://git.eclipse.org/r/115075 Gerrit change https://git.eclipse.org/r/115075 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.text.git/commit/?id=e8186dc22f970dae14d07ccb5341906955989f29 New Gerrit change created: https://git.eclipse.org/r/115809 @Mickael, please review my N&N. Thanks! Gerrit change https://git.eclipse.org/r/115809 was merged to [master]. Commit: http://git.eclipse.org/c/www.eclipse.org/eclipse/news.git/commit/?id=7af0e31a19e9566f7fb8819ed75278c6cf42265b Thanks @Lars, @Mickael for your review! |