mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Implementation of the status handler for core errors.
This commit is contained in:
parent
8de45ed667
commit
188b679f0a
2 changed files with 20 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2002-12-08 Mikhail Khodjaiants
|
||||||
|
Implementation of the status handler for core errors.
|
||||||
|
* ErrorStatusHandler.java
|
||||||
|
|
||||||
2002-12-04 Mikhail Khodjaiants
|
2002-12-04 Mikhail Khodjaiants
|
||||||
Small fix for the Registers view.
|
Small fix for the Registers view.
|
||||||
* RegistersView.java
|
* RegistersView.java
|
||||||
|
|
|
@ -5,9 +5,12 @@
|
||||||
*/
|
*/
|
||||||
package org.eclipse.cdt.debug.internal.ui;
|
package org.eclipse.cdt.debug.internal.ui;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IStatus;
|
import org.eclipse.core.runtime.IStatus;
|
||||||
import org.eclipse.debug.core.IStatusHandler;
|
import org.eclipse.debug.core.IStatusHandler;
|
||||||
|
import org.eclipse.debug.core.model.IDebugTarget;
|
||||||
|
import org.eclipse.jface.dialogs.ErrorDialog;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -21,8 +24,20 @@ public class ErrorStatusHandler implements IStatusHandler
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.core.IStatusHandler#handleStatus(IStatus, Object)
|
* @see org.eclipse.debug.core.IStatusHandler#handleStatus(IStatus, Object)
|
||||||
*/
|
*/
|
||||||
public Object handleStatus( IStatus status, Object source ) throws CoreException
|
public Object handleStatus( final IStatus status, Object source ) throws CoreException
|
||||||
{
|
{
|
||||||
|
if ( status != null && source != null && source instanceof IDebugTarget )
|
||||||
|
{
|
||||||
|
final String title = ((IDebugTarget)source).getName();
|
||||||
|
CDebugUIPlugin.getStandardDisplay().asyncExec(
|
||||||
|
new Runnable()
|
||||||
|
{
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
ErrorDialog.openError( CDebugUIPlugin.getActiveWorkbenchShell(), title, null, status );
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue