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

Bug 329712

Summary: Switching to task editor unnecessarily expands query in task list
Product: z_Archived Reporter: Sam Davis <sam.davis>
Component: MylynAssignee: Project Inbox <mylyn-triaged>
Status: CLOSED MOVED QA Contact:
Severity: enhancement    
Priority: P3 CC: steffen.pingel
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Sam Davis CLA 2010-11-08 16:34:17 EST
I have a task which is in a category. The task is open and the category is expanded in the task list. When I switch to the task editor, the query containing the task is expanded in the task list and the task is selected under that query. This is unnecessary since the task is already visible in the expanded category. In fact, it's exactly what I don't want to happen, since the category contains all the tasks I care about right now. (I realise I can get around this by creating a working set containing the category, but that's an extra step, and I don't think this behaviour is desirable anyhow.)

This happens for some tasks and not others. I'm guessing it depends on which is found first, the task under the query or under the category.
Comment 1 Steffen Pingel CLA 2010-11-08 17:29:43 EST
The task list caches the path of the last selection for a path. If a task hasn't previously been selected it will depend on internal ordering which one gets selected. 

I agree that it would be nice if visible paths or paths to siblings would be preferred over a random selection. Interested in providing a patch?
Comment 2 Sam Davis CLA 2010-11-08 18:15:18 EST
I'll put this on my backlog. What do you mean by paths to siblings?
Comment 3 Steffen Pingel CLA 2010-11-08 18:56:30 EST
(In reply to comment #2)
> I'll put this on my backlog. What do you mean by paths to siblings?

I was thinking the selection strategy could try visible tasks first and then look for the "closest" match, i.e. walk up the hierarchy of the current selection checking children, siblings and parent tasks. TreeWalker already implements part of that functionality.
Comment 4 Sam Davis CLA 2010-11-08 19:26:50 EST
That makes sense.
Comment 5 Sam Davis CLA 2010-11-10 17:32:48 EST
(In reply to comment #1)
> I agree that it would be nice if visible paths or paths to siblings would be
> preferred over a random selection.

It seems like that _might_ also be preferred over the cached most recent selection.
Comment 6 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