1 11 12 13 package org.eclipse.debug.internal.ui.views.memory; 14 15 import org.eclipse.debug.internal.ui.DebugUIMessages; 16 import org.eclipse.debug.ui.DebugUITools; 17 import org.eclipse.debug.ui.IDebugUIConstants; 18 import org.eclipse.jface.preference.FieldEditorPreferencePage; 19 import org.eclipse.jface.preference.StringFieldEditor; 20 import org.eclipse.swt.SWT; 21 import org.eclipse.swt.widgets.Composite; 22 import org.eclipse.swt.widgets.Control; 23 import org.eclipse.swt.widgets.Label; 24 import org.eclipse.ui.PlatformUI; 25 26 public class SetPaddedStringPreferencePage extends FieldEditorPreferencePage { 27 28 private StringFieldEditor fPaddedString; 29 30 public SetPaddedStringPreferencePage() 31 { 32 super(FieldEditorPreferencePage.GRID); 33 setPreferenceStore(DebugUITools.getPreferenceStore()); 34 setTitle(DebugUIMessages.SetPaddedStringDialog_0); 35 36 } 37 38 protected void createFieldEditors() { 39 fPaddedString = new StringFieldEditor(IDebugUIConstants.PREF_PADDED_STR, DebugUIMessages.SetPaddedStringPreferencePage_0, getFieldEditorParent()); 40 fPaddedString.setEmptyStringAllowed(false); 41 fPaddedString.setTextLimit(5); 42 addField(fPaddedString); 43 } 44 45 protected Label createDescriptionLabel(Composite parent) { 46 Label label = new Label(parent, SWT.NONE); 47 label.setText(DebugUIMessages.SetPaddedStringDialog_1); 48 return label; 49 } 50 51 protected Control createContents(Composite parent) { 52 PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IDebugUIConstants.PLUGIN_ID + ".SetPaddedStrDialog_context"); return super.createContents(parent); 54 } 55 56 } 57 | Popular Tags |