Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 417478

Summary: create tasks directly from code
Product: z_Archived Reporter: Frank Musolf <frank.musolf>
Component: MylynAssignee: Project Inbox <mylyn-triaged>
Status: CLOSED MOVED QA Contact:
Severity: normal    
Priority: P3 CC: mjmeijer
Version: 3.9Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
mylyn/context/zip none

Description Frank Musolf CLA 2013-09-18 03:50:08 EDT
if i found smelling code and i think it's necessary to refactor this code - can i mark this code and create mylyn task directly?

with class name, method name, line number and marked code in the new mylyn task?

regards
frank
Comment 1 Sam Davis CLA 2013-09-27 16:56:20 EDT
This sounds like a good idea, similar to the "new task from failure" command for JUnit. Due to time constraints we are unable to implement this at the moment. The bug has been marked helpwanted though to indicate that we would be happy to support a community contribution to resolve it.
Comment 2 maarten meijer CLA 2014-03-08 16:17:15 EST
There is already code for a NewTaskFromSelectionAction that is only active while a TaskEditor is open.
It appears to me that this request is just a matter of adding this action to plugin.xml and making rules that require a TextSelection to be present.

Similarly you could state that when a StructuredSelection is present, one should also be able to copy that as text into a task.
This would require an AdapterFactory where a StructuredSelection can be converted to a TextSelection, possibly using the LabelProviders of the active view.
Comment 3 maarten meijer CLA 2014-03-08 16:17:18 EST
Created attachment 240690 [details]
mylyn/context/zip
Comment 4 Sam Davis CLA 2014-03-10 15:47:58 EDT
Getting the class name, method name, and line number would be more involved.
Comment 5 Eclipse Webmaster CLA 2022-11-15 11:45:08 EST
Mylyn has been restructured, and our issue tracking has moved to GitHub [1].

We are closing ~14K Bugzilla issues to give the new team a fresh start. If you feel that this issue is still relevant, please create a new one on GitHub.

[1] https://github.com/orgs/eclipse-mylyn