1 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.internal.ui.preferences.IDebugPreferenceConstants; 16 import org.eclipse.debug.ui.IDebugUIConstants; 17 import org.eclipse.jface.action.Action; 18 import org.eclipse.jface.preference.IPreferenceStore; 19 import org.eclipse.ui.help.WorkbenchHelp; 20 21 22 27 public class SetColumnSizeDefaultAction extends Action 28 { 29 private static final String PREFIX = "SetColumnSizeDefaultAction."; private static final String LABEL = PREFIX + "Set_as_default"; 32 private ITableMemoryViewTab fViewTab; 33 34 public SetColumnSizeDefaultAction(ITableMemoryViewTab viewTab) 35 { 36 super (DebugUIMessages.getString(LABEL)); 37 fViewTab = viewTab; 38 WorkbenchHelp.setHelp(this, IDebugUIConstants.PLUGIN_ID + ".SetColumnSizeDefaultAction_context"); } 40 41 44 public void run() 45 { 46 int colSize = fViewTab.getColumnSize(); 47 48 IPreferenceStore prefStore = DebugUIPlugin.getDefault().getPreferenceStore(); 49 prefStore.setValue(IDebugPreferenceConstants.PREF_COLUMN_SIZE, colSize); 50 } 51 52 } 53 | Popular Tags |