diff options
Diffstat (limited to 'org.eclipse.search/search/org/eclipse/search/internal/ui/OpenFileSearchPageAction.java')
-rw-r--r-- | org.eclipse.search/search/org/eclipse/search/internal/ui/OpenFileSearchPageAction.java | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/OpenFileSearchPageAction.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/OpenFileSearchPageAction.java deleted file mode 100644 index 1c4f4ee5570..00000000000 --- a/org.eclipse.search/search/org/eclipse/search/internal/ui/OpenFileSearchPageAction.java +++ /dev/null @@ -1,61 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2003 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Common Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/cpl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.search.internal.ui; - -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; - -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.viewers.ISelection; - -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.IWorkbenchWindowActionDelegate; - -import org.eclipse.search.ui.SearchUI; - -/** - * Opens the Search Dialog. - */ -public class OpenFileSearchPageAction implements IWorkbenchWindowActionDelegate { - - private static final String TEXT_SEARCH_PAGE_ID= "org.eclipse.search.internal.ui.text.TextSearchPage"; //$NON-NLS-1$ - - private IWorkbenchWindow fWindow; - - public OpenFileSearchPageAction() { - } - - public void init(IWorkbenchWindow window) { - fWindow= window; - } - - public void run(IAction action) { - if (fWindow == null || fWindow.getActivePage() == null) { - SearchPlugin.beep(); - logErrorMessage("Could not open the search dialog - for some reason the window handle was null"); //$NON-NLS-1$ - return; - } - SearchUI.openSearchDialog(fWindow, TEXT_SEARCH_PAGE_ID); //$NON-NLS-1$ - } - - public void selectionChanged(IAction action, ISelection selection) { - // do nothing since the action isn't selection dependent. - } - - public void dispose() { - fWindow= null; - } - - public static void logErrorMessage(String message) { - IStatus status= new Status(IStatus.ERROR, SearchUI.PLUGIN_ID, IStatus.ERROR, message, null); - SearchPlugin.log(status); - } -} |