Omaha #5054 Fix ValuesDialog when run without active workbench (GFE Autotests)
Change-Id: I9604f77298ac56b511d0b05859db4c146dbd2e7f Former-commit-id: afb2a11dfe8bdc6ba5aa85affa38052349c717a8
This commit is contained in:
parent
2c3c687750
commit
bfe68d2408
1 changed files with 8 additions and 3 deletions
|
@ -122,7 +122,7 @@ public class ValuesDialog extends CaveJFACEDialog {
|
|||
@Override
|
||||
protected void createButtonsForButtonBar(Composite parent) {
|
||||
|
||||
if (callback != null || closeAfterRun) {
|
||||
if ((callback != null) || closeAfterRun) {
|
||||
createButton(parent, ButtonConstant.RUN.id,
|
||||
ButtonConstant.RUN.label, false);
|
||||
createButton(parent, ButtonConstant.RUN_DISMISS.id,
|
||||
|
@ -301,10 +301,15 @@ public class ValuesDialog extends CaveJFACEDialog {
|
|||
|
||||
@Override
|
||||
public void run() {
|
||||
Shell shell = PlatformUI.getWorkbench()
|
||||
.getActiveWorkbenchWindow().getShell();
|
||||
Shell shell = null;
|
||||
if (PlatformUI.isWorkbenchRunning()) {
|
||||
shell = PlatformUI.getWorkbench()
|
||||
.getActiveWorkbenchWindow().getShell();
|
||||
}
|
||||
|
||||
syncedDialog = new ValuesDialog(shell, title, fieldDefs,
|
||||
dataMgr);
|
||||
|
||||
syncedDialog.setShellStyle(SWT.MODELESS | SWT.TITLE
|
||||
| SWT.RESIZE);
|
||||
syncedDialog.open();
|
||||
|
|
Loading…
Add table
Reference in a new issue