KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > search2 > internal > ui > OpenSearchPreferencesAction


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.search2.internal.ui;
12
13 import org.eclipse.swt.widgets.Shell;
14
15 import org.eclipse.jface.action.Action;
16
17 import org.eclipse.ui.dialogs.PreferencesUtil;
18
19 import org.eclipse.search.internal.ui.SearchPlugin;
20 import org.eclipse.search.internal.ui.SearchPreferencePage;
21
22
23 /**
24  * Opens the search preferences dialog
25  */

26 public class OpenSearchPreferencesAction extends Action {
27     public OpenSearchPreferencesAction() {
28         super(SearchMessages.OpenSearchPreferencesAction_label);
29         setToolTipText(SearchMessages.OpenSearchPreferencesAction_tooltip);
30         //PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IWorkbenchHelpContextIds.OPEN_PREFERENCES_ACTION);
31
}
32
33     /* (non-Javadoc)
34      * Method declared on Action.
35      */

36     public void run() {
37         Shell shell= SearchPlugin.getActiveWorkbenchShell();
38         PreferencesUtil.createPreferenceDialogOn(shell, SearchPreferencePage.PAGE_ID, null, null).open();
39     }
40
41 }
42
Popular Tags