1 11 package org.eclipse.jdt.internal.debug.ui.monitors; 12 13 import org.eclipse.debug.ui.DeferredDebugElementWorkbenchAdapter; 14 import org.eclipse.jdt.internal.debug.ui.IJDIPreferencesConstants; 15 import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin; 16 import org.eclipse.jface.preference.IPreferenceStore; 17 import org.eclipse.jface.util.IPropertyChangeListener; 18 import org.eclipse.jface.util.PropertyChangeEvent; 19 import org.eclipse.ui.progress.IDeferredWorkbenchAdapter; 20 21 24 public abstract class DeferredMonitorElement extends DeferredDebugElementWorkbenchAdapter implements IDeferredWorkbenchAdapter, IPropertyChangeListener { 25 26 private boolean fDisplayMonitors= false; 27 public DeferredMonitorElement() { 28 IPreferenceStore preferenceStore = JDIDebugUIPlugin.getDefault().getPreferenceStore(); 29 preferenceStore.addPropertyChangeListener(this); 30 fDisplayMonitors= preferenceStore.getBoolean(IJDIPreferencesConstants.PREF_SHOW_MONITOR_THREAD_INFO); 31 } 32 33 36 public void propertyChange(PropertyChangeEvent event) { 37 if (event.getProperty().equals(IJDIPreferencesConstants.PREF_SHOW_MONITOR_THREAD_INFO)) { 38 fDisplayMonitors= ((Boolean )event.getNewValue()).booleanValue(); 39 } 40 } 41 42 protected boolean isDisplayMonitors() { 43 return fDisplayMonitors; 44 } 45 } 46 | Popular Tags |