1 11 12 package org.eclipse.debug.internal.ui.views.memory; 13 14 import org.eclipse.debug.internal.ui.DebugUIPlugin; 15 import org.eclipse.jface.action.IAction; 16 import org.eclipse.jface.preference.IPreferenceNode; 17 import org.eclipse.jface.preference.PreferenceDialog; 18 import org.eclipse.jface.preference.PreferenceManager; 19 import org.eclipse.jface.preference.PreferenceNode; 20 import org.eclipse.jface.viewers.ISelection; 21 import org.eclipse.swt.custom.BusyIndicator; 22 import org.eclipse.ui.IViewActionDelegate; 23 import org.eclipse.ui.IViewPart; 24 25 public class MemoryViewPrefAction implements IViewActionDelegate { 26 27 public void init(IViewPart view) { 28 29 } 30 31 public void run(IAction action) { 32 33 PreferenceManager prefManager = new PreferenceManager(); 34 35 ResetMemoryBlockPreferencePage page = new ResetMemoryBlockPreferencePage(); 36 IPreferenceNode node = new PreferenceNode("org.eclipse.debug.ui.memory.resetMemoryBlock", page); prefManager.addToRoot(node); 38 39 SetPaddedStringPreferencePage page2 = new SetPaddedStringPreferencePage(); 40 IPreferenceNode node2 = new PreferenceNode("org.eclipse.debug.ui.memory.setPaddedString", page2); prefManager.addToRoot(node2); 42 43 CodePagesPreferencePage page3 = new CodePagesPreferencePage(); 44 IPreferenceNode node3 = new PreferenceNode("org.eclipse.debug.ui.memory.codePages", page3); prefManager.addToRoot(node3); 46 47 final PreferenceDialog dialog = new PreferenceDialog(DebugUIPlugin.getShell(), prefManager); 48 49 BusyIndicator.showWhile(DebugUIPlugin.getStandardDisplay(), new Runnable () { 50 public void run() { 51 dialog.create(); 52 dialog.open(); 53 } 54 }); 55 56 } 57 58 public void selectionChanged(IAction action, ISelection selection) { 59 60 } 61 62 } 63 | Popular Tags |