Omaha #4888: Fix NullPointerException in ISCSendStatusChangedMsg.
Change-Id: Icf040f615a4b2a3d196506c6d1f4193f346bf0c3 Former-commit-id: 24c089b4a4efe8fc5f4072320f97ba278a15e780
This commit is contained in:
parent
11e0fee3b7
commit
eaa7e1dc52
1 changed files with 13 additions and 4 deletions
|
@ -22,6 +22,8 @@ package com.raytheon.viz.gfe.core.msgs;
|
|||
import org.eclipse.ui.PlatformUI;
|
||||
import org.eclipse.ui.commands.ICommandService;
|
||||
|
||||
import com.raytheon.uf.viz.core.VizApp;
|
||||
|
||||
/**
|
||||
* Message indicate ISC Send Status has changed
|
||||
*
|
||||
|
@ -31,6 +33,7 @@ import org.eclipse.ui.commands.ICommandService;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 25, 2010 randerso Initial creation
|
||||
* Nov 17, 2015 #4888 dgilling Ensure UI updates happen on UI thread.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -60,11 +63,17 @@ public class ISCSendStatusChangedMsg extends Message {
|
|||
super.send();
|
||||
|
||||
if (PlatformUI.isWorkbenchRunning()) {
|
||||
ICommandService service = (ICommandService) PlatformUI
|
||||
.getWorkbench().getActiveWorkbenchWindow().getService(
|
||||
ICommandService.class);
|
||||
VizApp.runAsync(new Runnable() {
|
||||
|
||||
service.refreshElements(COMMAND_ID, null);
|
||||
@Override
|
||||
public void run() {
|
||||
ICommandService service = (ICommandService) PlatformUI
|
||||
.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getService(ICommandService.class);
|
||||
|
||||
service.refreshElements(COMMAND_ID, null);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue