Bug 354430

Summary: [search][api] provide API to enable programatic creation of desktop search queries
Product: z_Archived Reporter: David Green <greensopinion>
Component: MylynAssignee: David Green <greensopinion>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 Keywords: api, noteworthy
Version: unspecified   
Target Milestone: 3.7   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on:    
Bug Blocks: 349351    
Attachments:
Description Flags
mylyn/context/zip none

Description David Green CLA 2011-08-10 15:24:28 EDT
currently there is no way to programatically create a search using the new desktop search functionality.  API should be provided to enable programatic creation/execution of searches.
Comment 1 David Green CLA 2011-08-10 17:50:58 EDT
pushed candidate command-based api to topic branch @task-354430@
This new API would enable integrations to integrate via the Eclipse command framework rather than via Java API, making it possible to create integrations that compiles both with and without search.
Comment 2 David Green CLA 2011-09-01 20:36:58 EDT
 61f1dbe75f91f6abe90044f1d6b46d5264cd59b3 merged/pushed to master
 
 New command added for command-based invocation of search:
 
bc. 
       <command
            categoryId="org.eclipse.search.ui.category.search"
            description="Perform a search"
            id="org.eclipse.mylyn.sandbox.search.ui.performSearchCommand"
            name="Perform search">
            <commandParameter
                  id="org.eclipse.mylyn.sandbox.search.ui.searchText" name="Search Text" optional="false"/>
            <commandParameter
                  id="org.eclipse.mylyn.sandbox.search.ui.filenameFilter" name="Filename Filter" optional="true"/>
      </command>
 
p. New Java API for invoking search programatically in Java, see @org.eclipse.mylyn.sandbox.search.ui.Search@
Comment 3 David Green CLA 2011-09-01 20:37:00 EDT
Created attachment 202646 [details]
mylyn/context/zip
Comment 4 David Green CLA 2011-09-01 20:38:21 EDT
Note that with the NewSearchUI there appears to be no easy way to open the search dialog prepopulated with search criteria.  It may be possible to do it by adding to the search dialog history prior to opening the dialog, though this seems somewhat incorrect since currently we're only adding to the history if the user actually presses the search button.