mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 01:36:01 +02:00
Accumulate the status information when adding multiple globals to the Expression view.
This commit is contained in:
parent
4fc88a9b59
commit
4169c1bd54
2 changed files with 19 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2003-05-12 Mikhail Khodjaiants
|
||||||
|
Accumulate the status information when adding multiple globals to the Expression view.
|
||||||
|
* AddGlobalsActionDelegate.java
|
||||||
|
|
||||||
2003-05-12 Mikhail Khodjaiants
|
2003-05-12 Mikhail Khodjaiants
|
||||||
Moved the generation of expressions for global variables to the mi plugin.
|
Moved the generation of expressions for global variables to the mi plugin.
|
||||||
* AddGlobalsActionDelegate.java
|
* AddGlobalsActionDelegate.java
|
||||||
|
|
|
@ -5,12 +5,14 @@
|
||||||
*/
|
*/
|
||||||
package org.eclipse.cdt.debug.internal.ui.actions;
|
package org.eclipse.cdt.debug.internal.ui.actions;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.debug.core.CDebugCorePlugin;
|
||||||
import org.eclipse.cdt.debug.core.CDebugModel;
|
import org.eclipse.cdt.debug.core.CDebugModel;
|
||||||
import org.eclipse.cdt.debug.core.model.IExecFileInfo;
|
import org.eclipse.cdt.debug.core.model.IExecFileInfo;
|
||||||
import org.eclipse.cdt.debug.core.model.IGlobalVariable;
|
import org.eclipse.cdt.debug.core.model.IGlobalVariable;
|
||||||
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
|
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
|
||||||
import org.eclipse.core.runtime.IPath;
|
import org.eclipse.core.runtime.IPath;
|
||||||
import org.eclipse.core.runtime.IStatus;
|
import org.eclipse.core.runtime.IStatus;
|
||||||
|
import org.eclipse.core.runtime.MultiStatus;
|
||||||
import org.eclipse.debug.core.DebugException;
|
import org.eclipse.debug.core.DebugException;
|
||||||
import org.eclipse.debug.core.DebugPlugin;
|
import org.eclipse.debug.core.DebugPlugin;
|
||||||
import org.eclipse.debug.core.model.IDebugElement;
|
import org.eclipse.debug.core.model.IDebugElement;
|
||||||
|
@ -325,11 +327,23 @@ public class AddGlobalsActionDelegate extends ActionDelegate
|
||||||
ListSelectionDialog dlg = createDialog();
|
ListSelectionDialog dlg = createDialog();
|
||||||
if ( dlg.open() == Dialog.OK )
|
if ( dlg.open() == Dialog.OK )
|
||||||
{
|
{
|
||||||
|
MultiStatus ms = new MultiStatus( CDebugCorePlugin.getUniqueIdentifier(), DebugException.REQUEST_FAILED, getStatusMessage(), null );
|
||||||
Object[] selections = dlg.getResult();
|
Object[] selections = dlg.getResult();
|
||||||
for ( int i = 0; i < selections.length; ++i )
|
for ( int i = 0; i < selections.length; ++i )
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
createExpression( ((IDebugElement)element).getDebugTarget(), (Global)selections[i] );
|
createExpression( ((IDebugElement)element).getDebugTarget(), (Global)selections[i] );
|
||||||
}
|
}
|
||||||
|
catch( DebugException e )
|
||||||
|
{
|
||||||
|
ms.merge( e.getStatus() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ( !ms.isOK() )
|
||||||
|
{
|
||||||
|
throw new DebugException( ms );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue