KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > internal > ui > views > console > ConsoleShowPreferencesAction


1 /*******************************************************************************
2  * Copyright (c) 2000, 2007 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.debug.internal.ui.views.console;
12
13 import org.eclipse.debug.internal.ui.SWTFactory;
14 import org.eclipse.jface.action.Action;
15 import org.eclipse.jface.action.IAction;
16 import org.eclipse.jface.viewers.ISelection;
17 import org.eclipse.ui.IViewActionDelegate;
18 import org.eclipse.ui.IViewPart;
19
20 /**
21  * ConsoleShowPreferencesAction Displays the Console's Preference page
22  *
23  * @since 3.2
24  */

25 public class ConsoleShowPreferencesAction extends Action implements IViewActionDelegate {
26
27     /*
28      * (non-Javadoc)
29      *
30      * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
31      */

32     public void init(IViewPart view) {}
33
34     /*
35      * (non-Javadoc)
36      *
37      * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
38      */

39     public void run(IAction action) {
40         SWTFactory.showPreferencePage("org.eclipse.debug.ui.ConsolePreferencePage"); //$NON-NLS-1$
41
}
42
43     /*
44      * (non-Javadoc)
45      *
46      * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
47      * org.eclipse.jface.viewers.ISelection)
48      */

49     public void selectionChanged(IAction action, ISelection selection) {
50         // do nothing
51
}
52 }
53
Popular Tags