Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 168756 - When you type Ctrl+H with TaskList on focus it should bring the Task Search
Summary: When you type Ctrl+H with TaskList on focus it should bring the Task Search
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 2.0 M2   Edit
Assignee: Willian Mitsuda CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-20 14:21 EST by Willian Mitsuda CLA
Modified: 2007-03-03 15:50 EST (History)
1 user (show)

See Also:


Attachments
Patch (8.52 KB, patch)
2006-12-22 21:22 EST, Willian Mitsuda CLA
no flags Details | Diff
mylar/context/zip (115.53 KB, application/octet-stream)
2006-12-22 21:23 EST, Willian Mitsuda CLA
no flags Details
Updated patch (12.76 KB, patch)
2007-02-20 20:43 EST, Willian Mitsuda CLA
no flags Details | Diff
mylar/context/zip (147.01 KB, application/octet-stream)
2007-02-20 20:43 EST, Willian Mitsuda CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Willian Mitsuda CLA 2006-12-20 14:21:25 EST
If you invoke the Ctrl+H (Search dialog) when your focus is on task list, it should bring the "Task Search" tab on focus, like when you type Ctrl+H on a Java editor and it brings you the "Java Search" tab.
Comment 1 Mik Kersten CLA 2006-12-20 20:24:40 EST
Agreed.  Although I often wonder whether this workbench behavior is wrong more of the time than just bring up the previous search page would be, due to the frequency of re-running searches.

Willian: do you know the workbench hook needed to support this?
Comment 2 Willian Mitsuda CLA 2006-12-20 21:23:00 EST
No, unfortunately I don't know what's the "magic"... but I can investigate...
Comment 3 Willian Mitsuda CLA 2006-12-22 21:22:34 EST
Created attachment 56118 [details]
Patch

I had to turn ITaskListElement into a IAdaptable, because this mechanism relies on getting a adapter for ISearchPageScoreComputer for current selection.

Also, this only works if you have something selected on task list, i.e. only having the task list focused with nothing select won't bring the task search page.
Comment 4 Willian Mitsuda CLA 2006-12-22 21:23:01 EST
Created attachment 56119 [details]
mylar/context/zip
Comment 5 Willian Mitsuda CLA 2006-12-23 11:33:43 EST
Also, with this patch you will need to include a dependency on org.eclipse.equinox.common in org.eclipse.mylar.doc plugin. I forgot to include this on previous patch.
Comment 6 Mik Kersten CLA 2007-01-05 15:46:00 EST
Great.  Since this changes API it will need to wait until we branch for 2.0, probably within the next couple of weeks.  Also need to consider along with bug 107169.
Comment 7 Eugene Kuleshov CLA 2007-02-14 00:56:24 EST
Mik, are planning to apply this?
Comment 8 Mik Kersten CLA 2007-02-15 15:50:05 EST
Will review this shortly.
Comment 9 Mik Kersten CLA 2007-02-15 18:55:20 EST
Willian: my apologies, I let this go stale due to all the refactorings I did this week.  Could you cut the patch again?
Comment 10 Willian Mitsuda CLA 2007-02-20 20:43:22 EST
Created attachment 59441 [details]
Updated patch
Comment 11 Willian Mitsuda CLA 2007-02-20 20:43:30 EST
Created attachment 59442 [details]
mylar/context/zip
Comment 12 Mik Kersten CLA 2007-02-22 20:20:48 EST
Patch applied but I couldn't make the search page come up with the Task Search.  Do you need some kind of plugin.xml entry to make this work?
Comment 13 Willian Mitsuda CLA 2007-02-23 08:37:17 EST
I think I forgot to include the adapter extension from plugin.xml or for some unknown reason the context does not consider it "interesting" anymore, because it was present on the first patch.

BTW Mik, do you have some article, paper, etc, describing how the increasing/decreasing of interest works internally on Mylar? (I don't mean source code ;)

I have some contexts that have a strange behavior, like folders not touched for a long time does not getting uninterested, or editors not being restored after some days not touching the context.

I thought about opening bugs for these, but I'd like to understand better how the score, rules work before to have a reproducible test case.

Here is the snippet:

Index: plugin.xml
===================================================================
RCS file: /cvsroot/technology/org.eclipse.mylar/org.eclipse.mylar.tasks.ui/plugin.xml,v
retrieving revision 1.185
diff -u -r1.185 plugin.xml
--- plugin.xml	19 Dec 2006 23:06:07 -0000	1.185
+++ plugin.xml	23 Dec 2006 02:17:46 -0000
@@ -692,6 +692,16 @@
           </commandParameter>
        </command>
     </extension>
+   <extension
+         point="org.eclipse.core.runtime.adapters">
+      <factory
+            adaptableType="org.eclipse.mylar.tasks.core.ITaskListElement"
+            class="org.eclipse.mylar.tasks.ui.search.SearchScoreComputerAdapterFactory">
+         <adapter
+               type="org.eclipse.search.ui.ISearchPageScoreComputer">
+         </adapter>
+      </factory>
+   </extension>
   
 </plugin>
 
Comment 14 Mik Kersten CLA 2007-03-02 23:12:31 EST
Patch applied and verified, great stuff Willian.  

Regarding packages getting 'stuck' as interesting, that's bug 118542

Regarding documentation on the model, I'll post a link to my PhD thesis soon, but for now the best description is the Foundations of Software Engineering paper available from the Publications page: http://www.eclipse.org/mylar/publications/2006-11-mylar-fse.pdf
Comment 15 Willian Mitsuda CLA 2007-03-03 15:50:16 EST
(In reply to comment #14)
> Regarding packages getting 'stuck' as interesting, that's bug 118542
> 

I think what I'm experiencing is somewhat related to this. I'll post there.

> Regarding documentation on the model, I'll post a link to my PhD thesis soon,
> but for now the best description is the Foundations of Software Engineering
> paper available from the Publications page:
> http://www.eclipse.org/mylar/publications/2006-11-mylar-fse.pdf
> 

Good. I'll take a look.