mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 18:26:01 +02:00
Fixed 193198. If an error was encountered by an action delegate, it would be eaten.
This commit is contained in:
parent
94652e017d
commit
c1eac4b95e
2 changed files with 14 additions and 4 deletions
|
@ -39,3 +39,4 @@ CDTDebugModelPresentation.24=-Infinity
|
||||||
CDTDebugModelPresentation.25=(disabled)
|
CDTDebugModelPresentation.25=(disabled)
|
||||||
CBreakpointWorkbenchAdapterFactory.0=C/C++ breakpoint
|
CBreakpointWorkbenchAdapterFactory.0=C/C++ breakpoint
|
||||||
CBreakpointWorkbenchAdapterFactory.1=C/C++ watchpoint
|
CBreakpointWorkbenchAdapterFactory.1=C/C++ watchpoint
|
||||||
|
ErrorStatusHandler.1=Error
|
|
@ -27,13 +27,22 @@ public class ErrorStatusHandler implements IStatusHandler {
|
||||||
* @see org.eclipse.debug.core.IStatusHandler#handleStatus(org.eclipse.core.runtime.IStatus, java.lang.Object)
|
* @see org.eclipse.debug.core.IStatusHandler#handleStatus(org.eclipse.core.runtime.IStatus, java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public Object handleStatus( final IStatus status, Object source ) throws CoreException {
|
public Object handleStatus( final IStatus status, Object source ) throws CoreException {
|
||||||
if ( status != null && source != null && source instanceof IDebugElement ) {
|
if ( status != null && source != null ) {
|
||||||
IDebugTarget target = ((IDebugElement)source).getDebugTarget();
|
String title = "";
|
||||||
final String title = target.getName();
|
if (source instanceof IDebugElement) {
|
||||||
|
IDebugTarget target = ((IDebugElement)source).getDebugTarget();
|
||||||
|
title = target.getName();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Source is sometimes an action delegate instance. Can't gather
|
||||||
|
// anything useful from it. Use a generic title
|
||||||
|
title = CDebugUIMessages.getString("ErrorStatusHandler.1");
|
||||||
|
}
|
||||||
|
final String title_f = title;
|
||||||
CDebugUIPlugin.getStandardDisplay().asyncExec( new Runnable() {
|
CDebugUIPlugin.getStandardDisplay().asyncExec( new Runnable() {
|
||||||
|
|
||||||
public void run() {
|
public void run() {
|
||||||
ErrorDialog.openError( CDebugUIPlugin.getActiveWorkbenchShell(), title, null, status );
|
ErrorDialog.openError( CDebugUIPlugin.getActiveWorkbenchShell(), title_f, null, status );
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue