KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > internal > ui > views > memory > SelectCodePagesAction


1 /*******************************************************************************
2  * Copyright (c) 2005 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.memory;
12
13 import org.eclipse.debug.internal.ui.DebugUIPlugin;
14 import org.eclipse.jface.action.IAction;
15 import org.eclipse.jface.viewers.ISelection;
16 import org.eclipse.swt.widgets.Shell;
17 import org.eclipse.ui.IViewActionDelegate;
18 import org.eclipse.ui.IViewPart;
19
20 /**
21  * Action to allow user to change code page preference.
22  * @since 3.1
23  */

24 public class SelectCodePagesAction implements IViewActionDelegate {
25
26     /* (non-Javadoc)
27      * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
28      */

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

35     public void run(IAction action) {
36         Shell shell = DebugUIPlugin.getActiveWorkbenchWindow().getShell();
37         
38         CodePagesPrefDialog dialog = new CodePagesPrefDialog(shell);
39         dialog.open();
40         
41     }
42
43     /* (non-Javadoc)
44      * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
45      */

46     public void selectionChanged(IAction action, ISelection selection) {
47     }
48
49 }
50
Popular Tags