01: /*******************************************************************************
02: * Copyright (c) 2005, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.pde.internal.ui.search;
11:
12: import org.eclipse.jface.action.Action;
13: import org.eclipse.search.ui.ISearchQuery;
14: import org.eclipse.search.ui.NewSearchUI;
15:
16: public abstract class BaseSearchAction extends Action {
17:
18: public BaseSearchAction(String text) {
19: setText(text);
20: }
21:
22: /* (non-Javadoc)
23: * @see org.eclipse.jface.action.Action#run()
24: */
25: public void run() {
26: NewSearchUI.activateSearchResultView();
27: NewSearchUI.runQueryInBackground(createSearchQuery());
28: }
29:
30: protected abstract ISearchQuery createSearchQuery();
31:
32: }
|