1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

bug #154854 - Guard against NPE when cancelling save dialog. Regrouping icons.

This commit is contained in:
Norbert Pltt 2006-09-01 14:32:46 +00:00
parent 4924166f87
commit 3ddf1a258f
2 changed files with 7 additions and 4 deletions

View file

@ -64,12 +64,12 @@ public class MiConsolePageParticipant implements IConsolePageParticipant, IDebug
// add two new actions: save console content and verbose console mode switcher
IActionBars bars = page.getSite().getActionBars();
bars.getToolBarManager().appendToGroup(IConsoleConstants.LAUNCH_GROUP, new Separator());
bars.getToolBarManager().appendToGroup(IConsoleConstants.OUTPUT_GROUP, new Separator());
fSaveConsole = new MiConsoleSaveAction(fConsole);
bars.getToolBarManager().appendToGroup(IConsoleConstants.LAUNCH_GROUP, fSaveConsole);
bars.getToolBarManager().appendToGroup(IConsoleConstants.OUTPUT_GROUP, fSaveConsole);
fVerboseMode = new MiConsoleVerboseModeAction(fConsole);
bars.getToolBarManager().appendToGroup(IConsoleConstants.LAUNCH_GROUP, fVerboseMode);
bars.getToolBarManager().appendToGroup(IConsoleConstants.LAUNCH_GROUP, new Separator());
bars.getToolBarManager().appendToGroup(IConsoleConstants.OUTPUT_GROUP, fVerboseMode);
bars.getToolBarManager().appendToGroup(IConsoleConstants.OUTPUT_GROUP, new Separator());
// add a debug event listener
DebugPlugin.getDefault().addDebugEventListener(this);

View file

@ -45,6 +45,9 @@ public class MiConsoleSaveAction extends Action{
FileDialog fileDialog = new FileDialog(Display.getCurrent().getActiveShell(), SWT.SAVE);
fileName = fileDialog.open();
if(fileName==null) {
return;
}
Runnable saveJob = new Runnable() {
public void run() {