|
Re: How to navigate from search results view to my view [message #261583 is a reply to message #259438] |
Wed, 14 July 2004 20:39 |
Eclipse User |
|
|
|
Originally posted by: john.eclipsefaq.org
I believe your search result page must be an IAdaptable, and be able to
adapt to IShowInTargetList. Your implementation of IShowInTargetList
then provides the set of applicable views. The following snippets are
from the FileSearchPage (in the org.eclipse.search plugin):
private static final String[] SHOW_IN_TARGETS= new String[] {
IPageLayout.ID_RES_NAV };
private static final IShowInTargetList SHOW_IN_TARGET_LIST=
new IShowInTargetList() {
public String[] getShowInTargetIds() {
return SHOW_IN_TARGETS;
}
};
public Object getAdapter(Class adapter) {
if (IShowInTargetList.class.equals(adapter)) {
return SHOW_IN_TARGET_LIST;
}
return null;
}
Hope that helps...
--
Martha Andrews wrote:
> Is there an example of how to support navigating from a search results view
> to another view?
>
> For example, when I search for a Java class, I see the following Context
> menus:
> Show In > Package Explorer and Show In > Navigator. If I choose either of
> these, the appropriate view gets focus and the class is highlighted.
>
> I want to do a similar thing, but I only want my Show In item to appear in a
> certain search result page. Is that possible?
|
|
|
Powered by
FUDForum. Page generated in 0.03633 seconds