paul
paul

Reputation: 13536

How to invoke the eclipse search dialog programmatically?

I am working on an eclipse RCP project which has added its own search dialog.

I would like to be able to find that dialog, pre-fill some of the fields (depending on selected items etc) and then open the dialog for the user to be able change settings before submitting the search.

Is this possible?

Upvotes: 0

Views: 373

Answers (1)

greg-449
greg-449

Reputation: 111217

You can use:

NewSearchUI.openSearchDialog(window, "page id");

to open the search dialog with the given page active. window is the active IWorkbenchWindow.

I don't see any standard way to initialize the page fields.

NewSearchUI is in package org.eclipse.search.ui in the org.eclipse.search plugin.

Upvotes: 2

Related Questions