mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 22:22:11 +02:00
bug #154854 - Guard against NPE when cancelling save dialog. Regrouping icons.
This commit is contained in:
parent
4924166f87
commit
3ddf1a258f
2 changed files with 7 additions and 4 deletions
|
@ -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);
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Add table
Reference in a new issue