1 11 package org.eclipse.jdt.internal.debug.ui; 12 13 14 import com.ibm.icu.text.MessageFormat; 15 16 import org.eclipse.core.runtime.IStatus; 17 import org.eclipse.debug.core.IStatusHandler; 18 import org.eclipse.jface.preference.IPreferenceStore; 19 import org.eclipse.swt.widgets.Display; 20 21 import com.sun.jdi.ReferenceType; 22 23 public class NoLineNumberAttributesStatusHandler implements IStatusHandler { 24 25 28 public Object handleStatus(IStatus status, Object source) { 29 ReferenceType type= (ReferenceType) source; 30 IPreferenceStore preferenceStore= JDIDebugUIPlugin.getDefault().getPreferenceStore(); 31 if (preferenceStore.getBoolean(IJDIPreferencesConstants.PREF_ALERT_UNABLE_TO_INSTALL_BREAKPOINT)) { 32 final ErrorDialogWithToggle dialog= new ErrorDialogWithToggle(JDIDebugUIPlugin.getActiveWorkbenchShell(), 33 DebugUIMessages.NoLineNumberAttributesStatusHandler_Java_Breakpoint_1, 34 MessageFormat.format(DebugUIMessages.NoLineNumberAttributesStatusHandler_2, new String [] {type.name()}), 35 status, IJDIPreferencesConstants.PREF_ALERT_UNABLE_TO_INSTALL_BREAKPOINT, 36 DebugUIMessages.NoLineNumberAttributesStatusHandler_3, 37 preferenceStore); 38 Display display= JDIDebugUIPlugin.getStandardDisplay(); 39 display.syncExec(new Runnable () { 40 public void run() { 41 dialog.open(); 42 } 43 }); 44 } 45 return null; 46 } 47 48 } 49 | Popular Tags |