Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to navigate from search results view to my view
How to navigate from search results view to my view [message #259438] Thu, 08 July 2004 00:34 Go to next message
Martha Andrews is currently offline Martha AndrewsFriend
Messages: 8
Registered: July 2009
Junior Member
Hello,

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?

Thanks,
martha
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 Go to previous message
Eclipse UserFriend
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?
Previous Topic:Log Startup Error
Next Topic:So many ways to add toolbar buttons?!
Goto Forum:
  


Current Time: Fri Nov 08 23:01:52 GMT 2024

Powered by FUDForum. Page generated in 0.03633 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top