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.editor.plugin;
11:
12: import org.eclipse.core.runtime.IProgressMonitor;
13: import org.eclipse.core.runtime.IStatus;
14: import org.eclipse.core.runtime.OperationCanceledException;
15: import org.eclipse.core.runtime.Status;
16: import org.eclipse.pde.internal.core.text.bundle.PackageObject;
17: import org.eclipse.pde.internal.ui.IPDEUIConstants;
18: import org.eclipse.pde.internal.ui.search.SearchResult;
19: import org.eclipse.search.ui.ISearchQuery;
20: import org.eclipse.search.ui.ISearchResult;
21:
22: public class BlankQuery implements ISearchQuery {
23:
24: private PackageObject fObject;
25:
26: BlankQuery(PackageObject object) {
27: fObject = object;
28: }
29:
30: public IStatus run(IProgressMonitor monitor)
31: throws OperationCanceledException {
32: monitor.done();
33: return new Status(IStatus.OK, IPDEUIConstants.PLUGIN_ID,
34: IStatus.OK, "", null); //$NON-NLS-1$
35: }
36:
37: public String getLabel() {
38: return '\'' + fObject.getName() + '\'';
39: }
40:
41: public boolean canRerun() {
42: return true;
43: }
44:
45: public boolean canRunInBackground() {
46: return true;
47: }
48:
49: public ISearchResult getSearchResult() {
50: return new SearchResult(this);
51: }
52:
53: }
|