Reputation: 19892
The question pretty much says it all. I just updated Mylyn, so I'm using the very latest.
If I put bookmarks B1 and B2 in files A.java and B.java for task T1, then switch to task T2 which involves files B.java and C.java, I see bookmark B2 in my Bookmarks view - even though it references a completely different part of the file than I'm working with in task T2.
It looks like Bookmarks only filters based on which files are included in the task context, not which bookmarks are included in the task.
Is there any way to filter Bookmarks more granularly, based on tasks, NOT files in tasks?
Upvotes: 4
Views: 287
Reputation: 1325017
Short answer: not possible, and here is why:
The Mylyn help page drwas a clear distinction between:
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:
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).
Upvotes: 4