1 11 package org.eclipse.jdt.internal.debug.ui.actions; 12 13 14 import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin; 15 import org.eclipse.jdt.internal.debug.ui.launcher.IClasspathViewer; 16 import org.eclipse.jface.dialogs.IDialogSettings; 17 18 22 public abstract class OpenDialogAction extends RuntimeClasspathAction { 23 24 28 protected static final String LAST_PATH_SETTING = "LAST_PATH_SETTING"; 30 33 private String fPrefix = null; 34 35 38 public OpenDialogAction(String label, IClasspathViewer viewer, String dialogSettingsPrefix) { 39 super(label, viewer); 40 fPrefix = dialogSettingsPrefix; 41 } 42 43 47 protected String getDialogSettingsPrefix() { 48 return fPrefix; 49 } 50 51 59 protected String getDialogSetting(String settingName) { 60 return getDialogSettings().get(getDialogSettingsPrefix() + "." + settingName); } 62 63 71 protected void setDialogSetting(String settingName, String value) { 72 getDialogSettings().put(getDialogSettingsPrefix() + "." + settingName, value); } 74 75 80 protected IDialogSettings getDialogSettings() { 81 IDialogSettings settings = JDIDebugUIPlugin.getDefault().getDialogSettings(); 82 return settings; 83 } 84 85 protected int getActionType() { 86 return ADD; 87 } 88 } 89 | Popular Tags |