Customised Eclipse Java Search Results View

less than 1 minute read

I want to be able to have more control over the export options, on the resuts tree from eclipse java search. i plan to customise the search results view, to enable a table view where i can copy/paste various column details.

I’ve done my initial googling, but all the examples assume that there is customised search and search results extensions being added. I want my ‘org.eclipse.search.searchResultViewPages’ extension to recieve the same ‘org.eclipse.jdt.internal.ui.search.JavaSearchResult’ objects that the default view processes.

I want to reuse the default java search dialog

<pre name="code" class="xml">

<page id="org.eclipse.jdt.ui.JavaSearchPage"
icon="icons/full/obj16/jsearch_obj.png"
label="%JavaSearchPage.label"
sizeHint="460,160"
extensions="java:90, jav:90"
showScopeSection="true"
canSearchEnclosingProjects="true"
class="org.eclipse.jdt.internal.ui.search.JavaSearchPage">
</page>

</pre>

but have a new customised class, that handles the layout of the search results.

<pre name="code" class="xml">
<extension
id=”JavaSearchResultPage”
point=”org.eclipse.search.searchResultViewPages”>
<viewPage
id=”org.eclipse.jdt.ui.JavaSearchResultPage”
searchResultClass=”org.eclipse.jdt.internal.ui.search.JavaSearchResult”
class=”org.eclipse.jdt.internal.ui.search.JavaSearchResultPage”>
</viewPage>
</extension>
</pre>

the starting point

http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/extension-points/org_eclipse_search_searchResultViewPages.html

for writing your own java search queries

http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse.jdt.doc.isv/guide/jdt_api_search.htm

Categories:

Updated:

Leave a Comment