Short answer: not possible, and here is why:
The Mylyn help page drwas a clear distinction between:
- Mylyn task
- Eclipse resources:
The task-focused interface consider tasks orthogonal to resources (e.g., files and web pages).
- Resources make sense to star/bookmark, since their primary residence is in some structural hierarchy (e.g. folders or a type hierarchy).
- Tasks are inherently different than resources because their primary residence is in time (e.g. due dates, milestones, things completed in the past).
That help explain why bookmarks aren't filtered when you switch tasks (even though Tasks can be created from any marker view in Eclipse, including the Bookmarks).
As mentioned in this thread:
Note that there are two different types of bookmarks:
- Web bookmarks (which the Tasktop Bookmarks view shows)
- and the code bookmarks (which the regular Bookmarks view shows).
I think Marcin is talking about code bookmarks. Code bookmarks are associated with files, not contexts, so you can't share them well.
While you can't go down to the exact line, you can go down to the method level.
Right-click on the task in the Package Explorer, and Mark As Landmark. This is available in Mylyn as well as Tasktop.
Mark As Landmark
is a standard way of creating context and the lowest level of it is method's level. I can mark method but can't mark any particular line in a method.
With bookmarks it is possible to mark a line and, what is more important for me, add a comment.Adding a bookmark for particular line in a source file is fairly brittle as locations tends to change frequently.
Therefore the context model is based on the logical model elements and not locations.
I would recommend using aTODO
orFIXME
marker in conjunction with landmarking the corresponding Java method to highlight a specific line in a context.
The bug 364109 open in 2011 has since been closed as "RESOLVED WONTFIX
", and instead redirected to issue 358554 ([api] provide an extensible store for task-related information).