KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*******************************************************************************
2  * Copyright (c) 2004 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-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.DebugUIMessages;
14 import org.eclipse.debug.internal.ui.DebugUIPlugin;
15 import org.eclipse.debug.ui.IDebugUIConstants;
16 import org.eclipse.jface.action.Action;
17 import org.eclipse.swt.widgets.Shell;
18 import org.eclipse.ui.help.WorkbenchHelp;
19
20
21 public class SetDefaultColumnSizePrefAction extends Action {
22     
23     private static final String JavaDoc PREFIX = "SetDefaultColumnSizePrefAction."; //$NON-NLS-1$
24
private static final String JavaDoc DEFAULT_COLUMN_SIZE = PREFIX + "DefaultColumnSize"; //$NON-NLS-1$
25
private static final String JavaDoc SET_DEFAULT_COLUMN_SIZE = PREFIX + "SetDefaultColumnSize"; //$NON-NLS-1$
26

27     public SetDefaultColumnSizePrefAction()
28     {
29         setText(DebugUIMessages.getString(DEFAULT_COLUMN_SIZE));
30         setToolTipText(DebugUIMessages.getString(SET_DEFAULT_COLUMN_SIZE));
31         WorkbenchHelp.setHelp(this, IDebugUIConstants.PLUGIN_ID + ".DefaultColumnSizePrefAction_context"); //$NON-NLS-1$
32
}
33     
34     /* (non-Javadoc)
35      * @see org.eclipse.jface.action.IAction#run()
36      */

37     public void run() {
38         Shell shell = DebugUIPlugin.getShell();
39         DefaultColumnSizeDialog dialog = new DefaultColumnSizeDialog(shell);
40         dialog.open();
41     }
42 }
43
Popular Tags