This is an automated email from the ASF dual-hosted git repository.
hansva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hop.git
The following commit(s) were added to refs/heads/master by this push:
new 7aa638ef2d select shell on active display for popup dialogs. #2944
new 06f8b0584e Merge pull request #2945 from bamaer/2944
7aa638ef2d is described below
commit 7aa638ef2d342b057f491a841f6977a9c026cbc0
Author: Bart Maertens <[email protected]>
AuthorDate: Thu May 18 16:37:17 2023 +0200
select shell on active display for popup dialogs. #2944
---
.../hop/debug/action/ActionDebugGuiPlugin.java | 4 +-
.../debug/transform/TransformDebugGuiPlugin.java | 4 +-
.../apache/hop/imports/gui/HopImportGuiPlugin.java | 4 +-
.../apache/hop/projects/gui/ProjectsGuiPlugin.java | 24 +++++------
.../hop/projects/xp/HopGuiStartProjectLoad.java | 2 +-
.../apache/hop/testing/gui/TestingGuiPlugin.java | 46 +++++++++++-----------
.../xp/LocationMouseDoubleClickExtensionPoint.java | 6 +--
.../hop/ui/core/metadata/MetadataManager.java | 12 +++---
.../ui/hopgui/delegates/HopGuiAuditDelegate.java | 2 +-
.../ui/hopgui/delegates/HopGuiFileDelegate.java | 14 +++----
.../hopgui/file/pipeline/HopGuiPipelineGraph.java | 12 +++---
.../delegates/HopGuiPipelineClipboardDelegate.java | 8 ++--
.../delegates/HopGuiPipelineHopDelegate.java | 12 +++---
.../delegates/HopGuiPipelineTransformDelegate.java | 22 +++++------
.../hopgui/file/workflow/HopGuiWorkflowGraph.java | 10 ++---
.../delegates/HopGuiWorkflowActionDelegate.java | 14 +++----
.../delegates/HopGuiWorkflowClipboardDelegate.java | 8 ++--
.../execution/PipelineExecutionViewer.java | 4 +-
.../execution/WorkflowExecutionViewer.java | 4 +-
.../perspective/search/HopSearchPerspective.java | 4 +-
.../hop/ui/www/service/WebServiceEditor.java | 6 +--
21 files changed, 111 insertions(+), 111 deletions(-)
diff --git
a/plugins/misc/debug/src/main/java/org/apache/hop/debug/action/ActionDebugGuiPlugin.java
b/plugins/misc/debug/src/main/java/org/apache/hop/debug/action/ActionDebugGuiPlugin.java
index 080fb203c6..d7342f258e 100644
---
a/plugins/misc/debug/src/main/java/org/apache/hop/debug/action/ActionDebugGuiPlugin.java
+++
b/plugins/misc/debug/src/main/java/org/apache/hop/debug/action/ActionDebugGuiPlugin.java
@@ -83,7 +83,7 @@ public class ActionDebugGuiPlugin {
debugLevel = new ActionDebugLevel();
}
- ActionDebugLevelDialog dialog = new
ActionDebugLevelDialog(hopGui.getShell(), debugLevel);
+ ActionDebugLevelDialog dialog = new
ActionDebugLevelDialog(hopGui.getDisplay().getActiveShell(), debugLevel);
if (dialog.open()) {
DebugLevelUtil.storeActionDebugLevel(
debugGroupAttributesMap, action.toString(), debugLevel);
@@ -91,7 +91,7 @@ public class ActionDebugGuiPlugin {
workflowMeta.setChanged();
} catch (Exception e) {
- new ErrorDialog(hopGui.getShell(), "Error", "Error changing action log
settings", e);
+ new ErrorDialog(hopGui.getDisplay().getActiveShell(), "Error", "Error
changing action log settings", e);
}
}
}
diff --git
a/plugins/misc/debug/src/main/java/org/apache/hop/debug/transform/TransformDebugGuiPlugin.java
b/plugins/misc/debug/src/main/java/org/apache/hop/debug/transform/TransformDebugGuiPlugin.java
index 25800b5219..293591739a 100644
---
a/plugins/misc/debug/src/main/java/org/apache/hop/debug/transform/TransformDebugGuiPlugin.java
+++
b/plugins/misc/debug/src/main/java/org/apache/hop/debug/transform/TransformDebugGuiPlugin.java
@@ -88,7 +88,7 @@ public class TransformDebugGuiPlugin {
IRowMeta inputRowMeta = pipelineMeta.getPrevTransformFields(variables,
transformMeta);
TransformDebugLevelDialog dialog =
- new TransformDebugLevelDialog(hopGui.getShell(), debugLevel,
inputRowMeta);
+ new TransformDebugLevelDialog(hopGui.getDisplay().getActiveShell(),
debugLevel, inputRowMeta);
if (dialog.open()) {
DebugLevelUtil.storeTransformDebugLevel(
debugGroupAttributesMap, transformMeta.getName(), debugLevel);
@@ -96,7 +96,7 @@ public class TransformDebugGuiPlugin {
pipelineMeta.setChanged();
} catch (Exception e) {
- new ErrorDialog(hopGui.getShell(), "Error", "Error changing transform
log settings", e);
+ new ErrorDialog(hopGui.getDisplay().getActiveShell(), "Error", "Error
changing transform log settings", e);
}
}
}
diff --git
a/plugins/misc/import/src/main/java/org/apache/hop/imports/gui/HopImportGuiPlugin.java
b/plugins/misc/import/src/main/java/org/apache/hop/imports/gui/HopImportGuiPlugin.java
index 12784ab21c..006d60e73b 100644
---
a/plugins/misc/import/src/main/java/org/apache/hop/imports/gui/HopImportGuiPlugin.java
+++
b/plugins/misc/import/src/main/java/org/apache/hop/imports/gui/HopImportGuiPlugin.java
@@ -57,10 +57,10 @@ public class HopImportGuiPlugin {
KettleImport kettleImport = new KettleImport();
kettleImport.init(hopGui.getVariables(), hopGui.getLog());
KettleImportDialog dialog =
- new KettleImportDialog(hopGui.getShell(), hopGui.getVariables(),
kettleImport);
+ new KettleImportDialog(hopGui.getDisplay().getActiveShell(),
hopGui.getVariables(), kettleImport);
dialog.open();
} catch (Exception e) {
- new ErrorDialog(hopGui.getShell(), "Error", "Error importing from
Kettle", e);
+ new ErrorDialog(hopGui.getDisplay().getActiveShell(), "Error", "Error
importing from Kettle", e);
}
}
}
diff --git
a/plugins/misc/projects/src/main/java/org/apache/hop/projects/gui/ProjectsGuiPlugin.java
b/plugins/misc/projects/src/main/java/org/apache/hop/projects/gui/ProjectsGuiPlugin.java
index 4d3528ad3e..eb1f2493f4 100644
---
a/plugins/misc/projects/src/main/java/org/apache/hop/projects/gui/ProjectsGuiPlugin.java
+++
b/plugins/misc/projects/src/main/java/org/apache/hop/projects/gui/ProjectsGuiPlugin.java
@@ -135,7 +135,7 @@ public class ProjectsGuiPlugin {
try {
Project project = projectConfig.loadProject(hopGui.getVariables());
ProjectDialog projectDialog =
- new ProjectDialog(hopGui.getShell(), project, projectConfig,
hopGui.getVariables(), true);
+ new ProjectDialog(hopGui.getDisplay().getActiveShell(), project,
projectConfig, hopGui.getVariables(), true);
if (projectDialog.open() != null) {
config.addProjectConfig(projectConfig);
@@ -169,7 +169,7 @@ public class ProjectsGuiPlugin {
}
} catch (Exception e) {
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
BaseMessages.getString(PKG,
"ProjectGuiPlugin.EditProject.Error.Dialog.Header"),
BaseMessages.getString(
PKG, "ProjectGuiPlugin.EditProject.Error.Dialog.Message",
projectName),
@@ -178,7 +178,7 @@ public class ProjectsGuiPlugin {
}
private boolean askAboutProjectRefresh(HopGui hopGui) {
- MessageBox box = new MessageBox(hopGui.getShell(), SWT.ICON_QUESTION |
SWT.YES | SWT.NO);
+ MessageBox box = new MessageBox(hopGui.getDisplay().getActiveShell(),
SWT.ICON_QUESTION | SWT.YES | SWT.NO);
box.setText(BaseMessages.getString(PKG,
"ProjectGuiPlugin.ReloadProject.Dialog.Header"));
box.setMessage(BaseMessages.getString(PKG,
"ProjectGuiPlugin.ReloadProject.Dialog.Message"));
int answer = box.open();
@@ -282,7 +282,7 @@ public class ProjectsGuiPlugin {
}
} catch (Exception e) {
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
BaseMessages.getString(PKG,
"ProjectGuiPlugin.ChangeProject.Error.Dialog.Header"),
BaseMessages.getString(
PKG, "ProjectGuiPlugin.ChangeProject.Error.Dialog.Message",
projectName),
@@ -319,7 +319,7 @@ public class ProjectsGuiPlugin {
project.setParentProjectName(config.getStandardParentProject());
ProjectDialog projectDialog =
- new ProjectDialog(hopGui.getShell(), project, projectConfig,
variables, false);
+ new ProjectDialog(hopGui.getDisplay().getActiveShell(), project,
projectConfig, variables, false);
String projectName = projectDialog.open();
if (projectName != null) {
config.addProjectConfig(projectConfig);
@@ -334,7 +334,7 @@ public class ProjectsGuiPlugin {
project.saveToFile();
} else {
// If projects exists load configuration
- MessageBox box = new MessageBox(hopGui.getShell(), SWT.ICON_QUESTION
| SWT.OK);
+ MessageBox box = new
MessageBox(hopGui.getDisplay().getActiveShell(), SWT.ICON_QUESTION | SWT.OK);
box.setText(BaseMessages.getString(PKG,
"ProjectGuiPlugin.ProjectExists.Dialog.Header"));
box.setMessage(
BaseMessages.getString(PKG,
"ProjectGuiPlugin.ProjectExists.Dialog.Message"));
@@ -421,7 +421,7 @@ public class ProjectsGuiPlugin {
} catch (Exception e) {
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
BaseMessages.getString(PKG,
"ProjectGuiPlugin.AddProject.Error.Dialog.Header"),
BaseMessages.getString(PKG,
"ProjectGuiPlugin.AddProject.Error.Dialog.Message"),
e);
@@ -553,7 +553,7 @@ public class ProjectsGuiPlugin {
try {
LifecycleEnvironmentDialog dialog =
- new LifecycleEnvironmentDialog(hopGui.getShell(), environment,
hopGui.getVariables());
+ new LifecycleEnvironmentDialog(hopGui.getDisplay().getActiveShell(),
environment, hopGui.getVariables());
if (dialog.open() != null) {
config.addEnvironment(environment);
ProjectsConfigSingleton.saveConfig();
@@ -573,7 +573,7 @@ public class ProjectsGuiPlugin {
}
} catch (Exception e) {
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
BaseMessages.getString(PKG,
"ProjectGuiPlugin.EditEnvironment.Error.Dialog.Header"),
BaseMessages.getString(
PKG, "ProjectGuiPlugin.EditEnvironment.Error.Dialog.Message",
environmentName),
@@ -619,7 +619,7 @@ public class ProjectsGuiPlugin {
}
} catch (Exception e) {
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
BaseMessages.getString(PKG,
"ProjectGuiPlugin.ChangeEnvironment.Error.Dialog.Header"),
BaseMessages.getString(
PKG, "ProjectGuiPlugin.ChangeEnvironment.Error.Dialog.Message",
environmentName),
@@ -650,7 +650,7 @@ public class ProjectsGuiPlugin {
LifecycleEnvironment environment =
new LifecycleEnvironment(null, "", projectName, new ArrayList<>());
LifecycleEnvironmentDialog dialog =
- new LifecycleEnvironmentDialog(hopGui.getShell(), environment,
hopGui.getVariables());
+ new LifecycleEnvironmentDialog(hopGui.getDisplay().getActiveShell(),
environment, hopGui.getVariables());
String environmentName = dialog.open();
if (environmentName != null) {
config.addEnvironment(environment);
@@ -667,7 +667,7 @@ public class ProjectsGuiPlugin {
}
} catch (Exception e) {
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
BaseMessages.getString(PKG,
"ProjectGuiPlugin.AddEnvironment.Error.Dialog.Header"),
BaseMessages.getString(PKG,
"ProjectGuiPlugin.AddEnvironment.Error.Dialog.Message"),
e);
diff --git
a/plugins/misc/projects/src/main/java/org/apache/hop/projects/xp/HopGuiStartProjectLoad.java
b/plugins/misc/projects/src/main/java/org/apache/hop/projects/xp/HopGuiStartProjectLoad.java
index 0325f9c114..26681348a7 100644
---
a/plugins/misc/projects/src/main/java/org/apache/hop/projects/xp/HopGuiStartProjectLoad.java
+++
b/plugins/misc/projects/src/main/java/org/apache/hop/projects/xp/HopGuiStartProjectLoad.java
@@ -129,7 +129,7 @@ public class HopGuiStartProjectLoad implements
IExtensionPoint {
logChannelInterface.logBasic("No last projects history found");
}
} catch (Exception e) {
- new ErrorDialog(hopGui.getShell(), "Error", "Error initializing the
Projects system", e);
+ new ErrorDialog(hopGui.getDisplay().getActiveShell(), "Error", "Error
initializing the Projects system", e);
}
}
}
diff --git
a/plugins/misc/testing/src/main/java/org/apache/hop/testing/gui/TestingGuiPlugin.java
b/plugins/misc/testing/src/main/java/org/apache/hop/testing/gui/TestingGuiPlugin.java
index b2c4bbd5f3..7c243df2e5 100644
---
a/plugins/misc/testing/src/main/java/org/apache/hop/testing/gui/TestingGuiPlugin.java
+++
b/plugins/misc/testing/src/main/java/org/apache/hop/testing/gui/TestingGuiPlugin.java
@@ -175,7 +175,7 @@ public class TestingGuiPlugin {
Collections.sort(setNames);
EnterSelectionDialog esd =
new EnterSelectionDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
setNames.toArray(new String[setNames.size()]),
BaseMessages.getString(PKG,
"TestingGuiPlugin.ContextAction.SetInputDataset.Header"),
BaseMessages.getString(
@@ -192,7 +192,7 @@ public class TestingGuiPlugin {
}
} catch (Exception e) {
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
BaseMessages.getString(
PKG,
"TestingGuiPlugin.ContextAction.SetInputDataset.Error.Header"),
BaseMessages.getString(
@@ -230,7 +230,7 @@ public class TestingGuiPlugin {
String[] setFieldNames = setFields.getFieldNames();
EnterMappingDialog mappingDialog =
- new EnterMappingDialog(hopGui.getShell(), setFieldNames,
transformFieldNames);
+ new EnterMappingDialog(hopGui.getDisplay().getActiveShell(),
setFieldNames, transformFieldNames);
List<SourceToTargetMapping> mappings = mappingDialog.open();
if (mappings == null) {
return false;
@@ -249,7 +249,7 @@ public class TestingGuiPlugin {
}
EditRowsDialog orderDialog =
new EditRowsDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
SWT.NONE,
BaseMessages.getString(PKG, "TestingGuiPlugin.SortOrder.Title"),
BaseMessages.getString(PKG, "TestingGuiPlugin.SortOrder.Message"),
@@ -330,7 +330,7 @@ public class TestingGuiPlugin {
context.getPipelineGraph().updateGui();
} catch (Exception e) {
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
BaseMessages.getString(
PKG,
"TestingGuiPlugin.ContextAction.ClearInputDataset.Error.Header"),
BaseMessages.getString(
@@ -349,7 +349,7 @@ public class TestingGuiPlugin {
// there is no test defined of selected in the pipeline.
// Show a warning
//
- MessageBox box = new MessageBox(hopGui.getShell(), SWT.OK |
SWT.ICON_INFORMATION);
+ MessageBox box = new MessageBox(hopGui.getDisplay().getActiveShell(),
SWT.OK | SWT.ICON_INFORMATION);
box.setMessage(
BaseMessages.getString(PKG,
"TestingGuiPlugin.ContextAction.CheckTestPresent.Message"));
box.setText(
@@ -395,7 +395,7 @@ public class TestingGuiPlugin {
Collections.sort(setNames);
EnterSelectionDialog esd =
new EnterSelectionDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
setNames.toArray(new String[setNames.size()]),
BaseMessages.getString(PKG,
"TestingGuiPlugin.ContextAction.SetGoldenDataset.Header"),
BaseMessages.getString(
@@ -412,7 +412,7 @@ public class TestingGuiPlugin {
}
} catch (Exception e) {
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
BaseMessages.getString(
PKG,
"TestingGuiPlugin.ContextAction.SetGoldenDataset.Error.Header"),
BaseMessages.getString(
@@ -545,7 +545,7 @@ public class TestingGuiPlugin {
saveUnitTest(variables, hopGui.getMetadataProvider(), currentUnitTest,
pipelineMeta);
} catch (Exception e) {
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
BaseMessages.getString(
PKG,
"TestingGuiPlugin.ContextAction.ClearGoldenDataset.Error.Header"),
BaseMessages.getString(
@@ -655,7 +655,7 @@ public class TestingGuiPlugin {
// to use it on the transform?
//
MessageBox box =
- new MessageBox(hopGui.getShell(), SWT.YES | SWT.NO | SWT.CANCEL |
SWT.ICON_QUESTION);
+ new MessageBox(hopGui.getDisplay().getActiveShell(), SWT.YES |
SWT.NO | SWT.CANCEL | SWT.ICON_QUESTION);
box.setText(
BaseMessages.getString(
PKG,
"TestingGuiPlugin.ContextAction.CreateDataset.DatasetType.Header"));
@@ -689,7 +689,7 @@ public class TestingGuiPlugin {
}
} catch (Exception e) {
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
BaseMessages.getString(PKG,
"TestingGuiPlugin.ContextAction.CreateDataset.Error.Header"),
BaseMessages.getString(PKG,
"TestingGuiPlugin.ContextAction.CreateDataset.Error.Message"),
e);
@@ -719,7 +719,7 @@ public class TestingGuiPlugin {
PipelineMeta pipelineMeta = context.getPipelineMeta();
if (pipelineMeta.hasChanged()) {
- MessageBox box = new MessageBox(hopGui.getShell(), SWT.OK |
SWT.ICON_INFORMATION);
+ MessageBox box = new MessageBox(hopGui.getDisplay().getActiveShell(),
SWT.OK | SWT.ICON_INFORMATION);
box.setText(
BaseMessages.getString(
PKG,
"TestingGuiPlugin.ContextAction.Run.SavePipelineDialog.Header"));
@@ -739,7 +739,7 @@ public class TestingGuiPlugin {
Collections.sort(setNames);
EnterSelectionDialog esd =
new EnterSelectionDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
setNames.toArray(new String[setNames.size()]),
BaseMessages.getString(PKG,
"TestingGuiPlugin.ContextAction.Run.ActionList.Item1"),
BaseMessages.getString(PKG,
"TestingGuiPlugin.ContextAction.Run.ActionList.Item2"));
@@ -765,7 +765,7 @@ public class TestingGuiPlugin {
// Ask for the mapping between the output row and the data set field
//
EnterMappingDialog mappingDialog =
- new EnterMappingDialog(hopGui.getShell(), transformFields,
setFields);
+ new EnterMappingDialog(hopGui.getDisplay().getActiveShell(),
transformFields, setFields);
List<SourceToTargetMapping> mapping = mappingDialog.open();
if (mapping == null) {
return;
@@ -790,7 +790,7 @@ public class TestingGuiPlugin {
} catch (Exception e) {
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
BaseMessages.getString(PKG,
"TestingGuiPlugin.ContextAction.Run.Error.Header"),
BaseMessages.getString(PKG,
"TestingGuiPlugin.ContextAction.Run.Error.Message"),
e);
@@ -850,7 +850,7 @@ public class TestingGuiPlugin {
pipelineGraph.updateGui();
} catch (Exception e) {
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
BaseMessages.getString(PKG,
"TestingGuiPlugin.ToolbarElement.Detach.Error.Header"),
BaseMessages.getString(PKG,
"TestingGuiPlugin.ToolbarElement.Detach.Error.Message"),
e);
@@ -935,7 +935,7 @@ public class TestingGuiPlugin {
return; // doesn't exist
}
- MessageBox box = new MessageBox(hopGui.getShell(), SWT.YES | SWT.NO |
SWT.ICON_QUESTION);
+ MessageBox box = new MessageBox(hopGui.getDisplay().getActiveShell(),
SWT.YES | SWT.NO | SWT.ICON_QUESTION);
box.setMessage(
BaseMessages.getString(
PKG,
@@ -960,7 +960,7 @@ public class TestingGuiPlugin {
refreshUnitTestsList();
} catch (Exception e) {
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
BaseMessages.getString(PKG,
"TestingGuiPlugin.ToolbarElement.Delete.Error.Header"),
BaseMessages.getString(PKG,
"TestingGuiPlugin.ToolbarElement.Delete.Error.Message"),
e);
@@ -1021,7 +1021,7 @@ public class TestingGuiPlugin {
}
} catch (Exception e) {
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
BaseMessages.getString(PKG,
"TestingGuiPlugin.ToolbarElement.UnitTest.Error.Header"),
BaseMessages.getString(
PKG, "TestingGuiPlugin.ToolbarElement.UnitTest.Error.Message",
unitTestName),
@@ -1144,7 +1144,7 @@ public class TestingGuiPlugin {
}
} catch (Exception e) {
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
BaseMessages.getString(
PKG,
"TestingGuiPlugin.ToolbarElement.GetUnitTestList.Error.Header"),
BaseMessages.getString(
@@ -1304,7 +1304,7 @@ public class TestingGuiPlugin {
hopGui.getActiveFileTypeHandler().updateGui();
} catch (Exception exception) {
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
BaseMessages.getString(PKG,
"TestingGuiPlugin.TweakUnitTestTransform.Error.Header"),
BaseMessages.getString(
PKG,
@@ -1347,7 +1347,7 @@ public class TestingGuiPlugin {
//
SelectRowDialog dialog =
new SelectRowDialog(
- hopGui.getShell(), new Variables(), SWT.DIALOG_TRIM | SWT.MAX |
SWT.RESIZE, rows);
+ hopGui.getDisplay().getActiveShell(), new Variables(),
SWT.DIALOG_TRIM | SWT.MAX | SWT.RESIZE, rows);
RowMetaAndData selection = dialog.open();
if (selection != null) {
return selection;
@@ -1355,7 +1355,7 @@ public class TestingGuiPlugin {
return null;
} catch (Exception e) {
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
BaseMessages.getString(PKG,
"TestingGuiPlugin.SelectUnitTestFromAllTests.Error.Header"),
BaseMessages.getString(PKG,
"TestingGuiPlugin.SelectUnitTestFromAllTests.Error.Message"),
e);
diff --git
a/plugins/misc/testing/src/main/java/org/apache/hop/testing/xp/LocationMouseDoubleClickExtensionPoint.java
b/plugins/misc/testing/src/main/java/org/apache/hop/testing/xp/LocationMouseDoubleClickExtensionPoint.java
index f042c5d206..0d43d8cbd4 100644
---
a/plugins/misc/testing/src/main/java/org/apache/hop/testing/xp/LocationMouseDoubleClickExtensionPoint.java
+++
b/plugins/misc/testing/src/main/java/org/apache/hop/testing/xp/LocationMouseDoubleClickExtensionPoint.java
@@ -100,7 +100,7 @@ public class LocationMouseDoubleClickExtensionPoint
if (inputLocation != null) {
PipelineUnitTestSetLocationDialog dialog =
new PipelineUnitTestSetLocationDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
variables,
hopGui.getMetadataProvider(),
inputLocation,
@@ -121,7 +121,7 @@ public class LocationMouseDoubleClickExtensionPoint
if (goldenLocation != null) {
PipelineUnitTestSetLocationDialog dialog =
new PipelineUnitTestSetLocationDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
variables,
hopGui.getMetadataProvider(),
goldenLocation,
@@ -162,7 +162,7 @@ public class LocationMouseDoubleClickExtensionPoint
}
}
} catch (Exception e) {
- new ErrorDialog(hopGui.getShell(), "Error", "Error editing location", e);
+ new ErrorDialog(hopGui.getDisplay().getActiveShell(), "Error", "Error
editing location", e);
}
}
diff --git
a/ui/src/main/java/org/apache/hop/ui/core/metadata/MetadataManager.java
b/ui/src/main/java/org/apache/hop/ui/core/metadata/MetadataManager.java
index 145045e7bf..d480c2cdc8 100644
--- a/ui/src/main/java/org/apache/hop/ui/core/metadata/MetadataManager.java
+++ b/ui/src/main/java/org/apache/hop/ui/core/metadata/MetadataManager.java
@@ -96,12 +96,12 @@ public class MetadataManager<T extends IHopMetadata> {
}
return GuiContextUtil.getInstance()
.handleActionSelection(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
"Select the " + hopMetadata.name() + " to edit",
new GuiContextHandler("HopGuiMetadataContext", actions));
} catch (Exception e) {
- new ErrorDialog(hopGui.getShell(), "Error", "Error editing metadata", e);
+ new ErrorDialog(hopGui.getDisplay().getActiveShell(), "Error", "Error
editing metadata", e);
return false;
}
}
@@ -140,7 +140,7 @@ public class MetadataManager<T extends IHopMetadata> {
new GuiContextHandler("HopGuiMetadaContext", actions));
} catch (Exception e) {
- new ErrorDialog(hopGui.getShell(), "Error", "Error deleting metadata",
e);
+ new ErrorDialog(hopGui.getDisplay().getActiveShell(), "Error", "Error
deleting metadata", e);
return false;
}
}
@@ -203,7 +203,7 @@ public class MetadataManager<T extends IHopMetadata> {
}
} catch (Exception e) {
- new ErrorDialog(hopGui.getShell(), "Error", "Error editing metadata", e);
+ new ErrorDialog(hopGui.getDisplay().getActiveShell(), "Error", "Error
editing metadata", e);
return false;
}
}
@@ -240,7 +240,7 @@ public class MetadataManager<T extends IHopMetadata> {
perspective.setActiveEditor(editor);
}
} catch (Exception e) {
- new ErrorDialog(hopGui.getShell(), "Error", "Error editing metadata", e);
+ new ErrorDialog(hopGui.getDisplay().getActiveShell(), "Error", "Error
editing metadata", e);
}
}
@@ -462,7 +462,7 @@ public class MetadataManager<T extends IHopMetadata> {
return element;
} catch (Exception e) {
- new ErrorDialog(hopGui.getShell(), "Error", "Error creating new metadata
element", e);
+ new ErrorDialog(hopGui.getDisplay().getActiveShell(), "Error", "Error
creating new metadata element", e);
return null;
}
}
diff --git
a/ui/src/main/java/org/apache/hop/ui/hopgui/delegates/HopGuiAuditDelegate.java
b/ui/src/main/java/org/apache/hop/ui/hopgui/delegates/HopGuiAuditDelegate.java
index 8fbb8927c5..aef1816015 100644
---
a/ui/src/main/java/org/apache/hop/ui/hopgui/delegates/HopGuiAuditDelegate.java
+++
b/ui/src/main/java/org/apache/hop/ui/hopgui/delegates/HopGuiAuditDelegate.java
@@ -120,7 +120,7 @@ public class HopGuiAuditDelegate {
}
}
} catch (Exception e) {
- new ErrorDialog(hopGui.getShell(), "Error", "Error opening file '"
+ filename + "'", e);
+ new ErrorDialog(hopGui.getDisplay().getActiveShell(), "Error",
"Error opening file '" + filename + "'", e);
}
}
diff --git
a/ui/src/main/java/org/apache/hop/ui/hopgui/delegates/HopGuiFileDelegate.java
b/ui/src/main/java/org/apache/hop/ui/hopgui/delegates/HopGuiFileDelegate.java
index e9750eae54..95fbbefdc2 100644
---
a/ui/src/main/java/org/apache/hop/ui/hopgui/delegates/HopGuiFileDelegate.java
+++
b/ui/src/main/java/org/apache/hop/ui/hopgui/delegates/HopGuiFileDelegate.java
@@ -87,7 +87,7 @@ public class HopGuiFileDelegate {
}
fileOpen(hopGui.getVariables().resolve(filename));
} catch (Exception e) {
- new ErrorDialog(hopGui.getShell(), "Error", "Error opening file", e);
+ new ErrorDialog(hopGui.getDisplay().getActiveShell(), "Error", "Error
opening file", e);
}
}
@@ -158,7 +158,7 @@ public class HopGuiFileDelegate {
return filename;
} catch (Exception e) {
- new ErrorDialog(hopGui.getShell(), "Error", "Error saving file", e);
+ new ErrorDialog(hopGui.getDisplay().getActiveShell(), "Error", "Error
saving file", e);
return null;
}
}
@@ -180,7 +180,7 @@ public class HopGuiFileDelegate {
}
}
} catch (Exception e) {
- new ErrorDialog(hopGui.getShell(), "Error", "Error saving file", e);
+ new ErrorDialog(hopGui.getDisplay().getActiveShell(), "Error", "Error
saving file", e);
}
}
@@ -193,7 +193,7 @@ public class HopGuiFileDelegate {
perspective.remove(typeHandler);
}
} catch (Exception e) {
- new ErrorDialog(hopGui.getShell(), "Error", "Error saving/closing file",
e);
+ new ErrorDialog(hopGui.getDisplay().getActiveShell(), "Error", "Error
saving/closing file", e);
}
return false;
}
@@ -282,7 +282,7 @@ public class HopGuiFileDelegate {
hopGui.fileDelegate.fileOpen(filename);
}
} catch (Exception e) {
- new ErrorDialog(hopGui.getShell(), "Error", "Error getting list of
recently opened files", e);
+ new ErrorDialog(hopGui.getDisplay().getActiveShell(), "Error", "Error
getting list of recently opened files", e);
}
}
@@ -339,7 +339,7 @@ public class HopGuiFileDelegate {
FileObject file = HopVfs.getFileObject(realFilename);
if (file.exists()) {
MessageBox box =
- new MessageBox(hopGui.getShell(), SWT.YES | SWT.NO |
SWT.ICON_QUESTION);
+ new MessageBox(hopGui.getDisplay().getActiveShell(), SWT.YES |
SWT.NO | SWT.ICON_QUESTION);
box.setText("File exists");
box.setMessage("This file already exists. Do you want to overwrite
it?");
int answer = box.open();
@@ -360,7 +360,7 @@ public class HopGuiFileDelegate {
}
} catch (Exception e) {
- new ErrorDialog(hopGui.getShell(), "Error", "Error exporting to SVG", e);
+ new ErrorDialog(hopGui.getDisplay().getActiveShell(), "Error", "Error
exporting to SVG", e);
}
}
}
diff --git
a/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/HopGuiPipelineGraph.java
b/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/HopGuiPipelineGraph.java
index ff94ded268..f68cca9640 100644
---
a/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/HopGuiPipelineGraph.java
+++
b/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/HopGuiPipelineGraph.java
@@ -1207,7 +1207,7 @@ public class HopGuiPipelineGraph extends
HopGuiAbstractGraph
PreviewRowsDialog previewRowsDialog =
new PreviewRowsDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
variables,
SWT.NONE,
dataTransformMeta.getName(),
@@ -1216,7 +1216,7 @@ public class HopGuiPipelineGraph extends
HopGuiAbstractGraph
previewRowsDialog.setTitleMessage(title, prefix + message);
previewRowsDialog.open();
} catch (Exception ex) {
- new ErrorDialog(hopGui.getShell(), "Error", "Error showing preview
dialog", ex);
+ new ErrorDialog(hopGui.getDisplay().getActiveShell(), "Error",
"Error showing preview dialog", ex);
}
}
}
@@ -3333,7 +3333,7 @@ public class HopGuiPipelineGraph extends
HopGuiAbstractGraph
}
} catch (Exception e) {
- new ErrorDialog(hopGui.getShell(), "Error", "Error drawing pipeline
image", e);
+ new ErrorDialog(hopGui.getDisplay().getActiveShell(), "Error", "Error
drawing pipeline image", e);
}
} finally {
gc.dispose();
@@ -3647,7 +3647,7 @@ public class HopGuiPipelineGraph extends
HopGuiAbstractGraph
}
PipelineDialog tid =
- new PipelineDialog(hopGui.getShell(), SWT.NONE, variables,
pipelineMeta, currentTab);
+ new PipelineDialog(hopGui.getDisplay().getActiveShell(), SWT.NONE,
variables, pipelineMeta, currentTab);
if (tid.open() != null) {
hopGui.setParametersAsVariablesInUI(pipelineMeta, variables);
updateGui();
@@ -3710,7 +3710,7 @@ public class HopGuiPipelineGraph extends
HopGuiAbstractGraph
FileObject fileObject = HopVfs.getFileObject(filename);
if (fileObject.exists()) {
- MessageBox box = new MessageBox(hopGui.getShell(), SWT.YES | SWT.NO |
SWT.ICON_QUESTION);
+ MessageBox box = new MessageBox(hopGui.getDisplay().getActiveShell(),
SWT.YES | SWT.NO | SWT.ICON_QUESTION);
box.setText("Overwrite?");
box.setMessage("Are you sure you want to overwrite file '" + filename
+ "'?");
int answer = box.open();
@@ -3772,7 +3772,7 @@ public class HopGuiPipelineGraph extends
HopGuiAbstractGraph
String filename =
BaseDialog.presentFileDialog(
true,
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
fileType.getFilterExtensions(),
fileType.getFilterNames(),
true);
diff --git
a/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/delegates/HopGuiPipelineClipboardDelegate.java
b/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/delegates/HopGuiPipelineClipboardDelegate.java
index 1ea5db0b60..e6cbf3f6d0 100644
---
a/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/delegates/HopGuiPipelineClipboardDelegate.java
+++
b/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/delegates/HopGuiPipelineClipboardDelegate.java
@@ -62,7 +62,7 @@ public class HopGuiPipelineClipboardDelegate {
GuiResource.getInstance().toClipboard(clipText);
} catch (Throwable e) {
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
BaseMessages.getString(PKG,
"HopGui.Dialog.ExceptionCopyToClipboard.Title"),
BaseMessages.getString(PKG,
"HopGui.Dialog.ExceptionCopyToClipboard.Message"),
e);
@@ -74,7 +74,7 @@ public class HopGuiPipelineClipboardDelegate {
return GuiResource.getInstance().fromClipboard();
} catch (Throwable e) {
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
BaseMessages.getString(PKG,
"HopGui.Dialog.ExceptionPasteFromClipboard.Title"),
BaseMessages.getString(PKG,
"HopGui.Dialog.ExceptionPasteFromClipboard.Message"),
e);
@@ -234,7 +234,7 @@ public class HopGuiPipelineClipboardDelegate {
// "Error pasting transforms...",
// "I was unable to paste transforms to this pipeline"
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
BaseMessages.getString(PKG,
"HopGui.Dialog.UnablePasteTransforms.Title"),
BaseMessages.getString(PKG,
"HopGui.Dialog.UnablePasteTransforms.Message"),
e);
@@ -295,7 +295,7 @@ public class HopGuiPipelineClipboardDelegate {
toClipboard(xml.toString());
} catch (Exception ex) {
- new ErrorDialog(hopGui.getShell(), "Error", "Error encoding to XML", ex);
+ new ErrorDialog(hopGui.getDisplay().getActiveShell(), "Error", "Error
encoding to XML", ex);
}
}
diff --git
a/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/delegates/HopGuiPipelineHopDelegate.java
b/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/delegates/HopGuiPipelineHopDelegate.java
index da20b43d2d..21505dd419 100644
---
a/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/delegates/HopGuiPipelineHopDelegate.java
+++
b/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/delegates/HopGuiPipelineHopDelegate.java
@@ -55,7 +55,7 @@ public class HopGuiPipelineHopDelegate {
public void newHop(PipelineMeta pipelineMeta, TransformMeta fr,
TransformMeta to) {
PipelineHopMeta hi = new PipelineHopMeta(fr, to);
- PipelineHopDialog hd = new PipelineHopDialog(hopGui.getShell(), SWT.NONE,
hi, pipelineMeta);
+ PipelineHopDialog hd = new
PipelineHopDialog(hopGui.getDisplay().getActiveShell(), SWT.NONE, hi,
pipelineMeta);
if (hd.open() != null) {
newHop(pipelineMeta, hi);
}
@@ -90,7 +90,7 @@ public class HopGuiPipelineHopDelegate {
public boolean checkIfHopAlreadyExists(PipelineMeta pipelineMeta,
PipelineHopMeta newHop) {
boolean ok = true;
if (pipelineMeta.findPipelineHop(newHop.getFromTransform(),
newHop.getToTransform()) != null) {
- MessageBox mb = new MessageBox(hopGui.getShell(), SWT.OK |
SWT.ICON_ERROR);
+ MessageBox mb = new MessageBox(hopGui.getDisplay().getActiveShell(),
SWT.OK | SWT.ICON_ERROR);
mb.setMessage(
BaseMessages.getString(
PKG, "HopGui.Dialog.HopExists.Message")); // "This hop already
exists!"
@@ -111,7 +111,7 @@ public class HopGuiPipelineHopDelegate {
boolean ok = true;
if (pipelineMeta.hasLoop(newHop.getToTransform())) {
- MessageBox mb = new MessageBox(hopGui.getShell(), SWT.OK |
SWT.ICON_ERROR);
+ MessageBox mb = new MessageBox(hopGui.getDisplay().getActiveShell(),
SWT.OK | SWT.ICON_ERROR);
mb.setMessage(BaseMessages.getString(PKG,
"PipelineGraph.Dialog.HopCausesLoop.Message"));
mb.setText(BaseMessages.getString(PKG,
"PipelineGraph.Dialog.HopCausesLoop.Title"));
mb.open();
@@ -129,7 +129,7 @@ public class HopGuiPipelineHopDelegate {
} catch (HopRowException re) {
// Show warning about mixing rows with conflicting layouts...
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
BaseMessages.getString(PKG,
"PipelineGraph.Dialog.HopCausesRowMixing.Title"),
BaseMessages.getString(PKG,
"PipelineGraph.Dialog.HopCausesRowMixing.Message"),
re);
@@ -167,7 +167,7 @@ public class HopGuiPipelineHopDelegate {
&&
!transformMeta.getTransform().excludeFromCopyDistributeVerification()) {
MessageDialogWithToggle md =
new MessageDialogWithToggle(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
BaseMessages.getString(PKG, "System.Warning"),
BaseMessages.getString(
PKG,
@@ -275,7 +275,7 @@ public class HopGuiPipelineHopDelegate {
PipelineHopMeta before = (PipelineHopMeta) pipelineHopMeta.clone();
PipelineHopDialog hd =
- new PipelineHopDialog(hopGui.getShell(), SWT.NONE, pipelineHopMeta,
pipelineMeta);
+ new PipelineHopDialog(hopGui.getDisplay().getActiveShell(), SWT.NONE,
pipelineHopMeta, pipelineMeta);
if (hd.open() != null) {
// Backup situation for redo/undo:
PipelineHopMeta after = (PipelineHopMeta) pipelineHopMeta.clone();
diff --git
a/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/delegates/HopGuiPipelineTransformDelegate.java
b/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/delegates/HopGuiPipelineTransformDelegate.java
index 87287b1309..997ccae2b9 100644
---
a/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/delegates/HopGuiPipelineTransformDelegate.java
+++
b/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/delegates/HopGuiPipelineTransformDelegate.java
@@ -144,7 +144,7 @@ public class HopGuiPipelineTransformDelegate {
String errorMsg =
BaseMessages.getString(
PKG, "HopGui.Dialog.ErrorCreatingTransformDialog.Message",
dialogClassName);
- new ErrorDialog(hopGui.getShell(), errorTitle, errorMsg, e);
+ new ErrorDialog(hopGui.getDisplay().getActiveShell(), errorTitle,
errorMsg, e);
throw new HopException(e);
}
}
@@ -212,7 +212,7 @@ public class HopGuiPipelineTransformDelegate {
}
if (nr > 2) {
transformName = newname;
- MessageBox mb = new MessageBox(hopGui.getShell(), SWT.OK |
SWT.ICON_INFORMATION);
+ MessageBox mb = new MessageBox(hopGui.getDisplay().getActiveShell(),
SWT.OK | SWT.ICON_INFORMATION);
mb.setMessage(
BaseMessages.getString(
PKG, "HopGui.Dialog.TransformnameExists.Message",
transformName));
@@ -249,7 +249,7 @@ public class HopGuiPipelineTransformDelegate {
return null;
}
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
BaseMessages.getString(PKG, "HopGui.Dialog.UnableOpenDialog.Title"),
BaseMessages.getString(PKG,
"HopGui.Dialog.UnableOpenDialog.Message"),
e);
@@ -316,7 +316,7 @@ public class HopGuiPipelineTransformDelegate {
}
if (nr > 2) {
transformMeta.setName(newName);
- MessageBox mb = new MessageBox(hopGui.getShell(), SWT.OK |
SWT.ICON_INFORMATION);
+ MessageBox mb = new
MessageBox(hopGui.getDisplay().getActiveShell(), SWT.OK | SWT.ICON_INFORMATION);
// "This transformName already exists. HopGui changed the
transformName to
// ["+newName+"]"
mb.setMessage(
@@ -370,7 +370,7 @@ public class HopGuiPipelineTransformDelegate {
sbd.open();
} catch (Exception ex) {
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
BaseMessages.getString(PKG,
"HopGui.Dialog.ErrorShowingHelpText.Title"),
BaseMessages.getString(PKG,
"HopGui.Dialog.ErrorShowingHelpText.Message"),
ex);
@@ -385,7 +385,7 @@ public class HopGuiPipelineTransformDelegate {
}
} else {
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
// "Error creating transform"
// "I was unable to create a new transform"
BaseMessages.getString(PKG,
"HopGui.Dialog.UnableCreateNewTransform.Title"),
@@ -396,7 +396,7 @@ public class HopGuiPipelineTransformDelegate {
} catch (Throwable e) {
if (!hopGui.getShell().isDisposed()) {
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
// "Error creating transform"
BaseMessages.getString(PKG,
"HopGui.Dialog.ErrorCreatingTransform.Title"),
BaseMessages.getString(PKG,
"HopGui.Dialog.UnableCreateNewTransform.Message"),
@@ -503,7 +503,7 @@ public class HopGuiPipelineTransformDelegate {
schemaNames = hopGui.partitionManager.getNamesArray();
} catch (HopException e) {
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
BaseMessages.getString(PKG, "HopGui.ErrorDialog.Title"),
BaseMessages.getString(
PKG,
"HopGui.ErrorDialog.ErrorFetchingFromRepo.PartitioningSchemas"),
@@ -566,7 +566,7 @@ public class HopGuiPipelineTransformDelegate {
}
} catch (Exception e) {
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
"Error",
"There was an unexpected error while editing the partitioning method
specifics:",
e);
@@ -576,7 +576,7 @@ public class HopGuiPipelineTransformDelegate {
public boolean isDefinedSchemaExist(String[] schemaNames) {
// Before we start, check if there are any partition schemas defined...
if ((schemaNames == null) || (schemaNames.length == 0)) {
- MessageBox box = new MessageBox(hopGui.getShell(), SWT.ICON_ERROR |
SWT.OK);
+ MessageBox box = new MessageBox(hopGui.getDisplay().getActiveShell(),
SWT.ICON_ERROR | SWT.OK);
box.setText("Create a partition schema");
box.setMessage(
"You first need to create one or more partition schemas before you
can select one!");
@@ -628,7 +628,7 @@ public class HopGuiPipelineTransformDelegate {
// now edit this transformErrorMeta object:
TransformErrorMetaDialog dialog =
new TransformErrorMetaDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
pipelineGraph.getVariables(),
transformErrorMeta,
pipelineMeta,
diff --git
a/ui/src/main/java/org/apache/hop/ui/hopgui/file/workflow/HopGuiWorkflowGraph.java
b/ui/src/main/java/org/apache/hop/ui/hopgui/file/workflow/HopGuiWorkflowGraph.java
index aa646666bc..98bdb05c2a 100644
---
a/ui/src/main/java/org/apache/hop/ui/hopgui/file/workflow/HopGuiWorkflowGraph.java
+++
b/ui/src/main/java/org/apache/hop/ui/hopgui/file/workflow/HopGuiWorkflowGraph.java
@@ -1321,7 +1321,7 @@ public class HopGuiWorkflowGraph extends
HopGuiAbstractGraph
boolean cancel = false;
workflowMeta.addWorkflowHop(hopCandidate);
if (workflowMeta.hasLoop(hopCandidate.getToAction())) {
- MessageBox mb = new MessageBox(hopGui.getShell(), SWT.OK |
SWT.CANCEL | SWT.ICON_WARNING);
+ MessageBox mb = new MessageBox(hopGui.getDisplay().getActiveShell(),
SWT.OK | SWT.CANCEL | SWT.ICON_WARNING);
mb.setMessage(BaseMessages.getString(PKG,
"WorkflowGraph.Dialog.HopCausesLoop.Message"));
mb.setText(BaseMessages.getString(PKG,
"WorkflowGraph.Dialog.HopCausesLoop.Title"));
int choice = mb.open();
@@ -1765,7 +1765,7 @@ public class HopGuiWorkflowGraph extends
HopGuiAbstractGraph
ServerPushSessionFacade.stop();
} catch (Exception e) {
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
"Execute workflow",
"There was an error during workflow execution",
e);
@@ -2769,7 +2769,7 @@ public class HopGuiWorkflowGraph extends
HopGuiAbstractGraph
} catch (Exception ex) {
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
BaseMessages.getString(PKG,
"HopGuiWorkflowGraph.ErrorDialog.WorkflowDrawing.Header"),
BaseMessages.getString(PKG,
"HopGuiWorkflowGraph.ErrorDialog.WorkflowDrawing.Message"),
ex);
@@ -3180,7 +3180,7 @@ public class HopGuiWorkflowGraph extends
HopGuiAbstractGraph
return false;
}
- WorkflowDialog jd = new WorkflowDialog(hopGui.getShell(), SWT.NONE,
variables, workflowMeta);
+ WorkflowDialog jd = new
WorkflowDialog(hopGui.getDisplay().getActiveShell(), SWT.NONE, variables,
workflowMeta);
if (jd.open() != null) {
// If we added properties, add them to the variables too, so that they
appear in the
// CTRL-SPACE variable completion.
@@ -3241,7 +3241,7 @@ public class HopGuiWorkflowGraph extends
HopGuiAbstractGraph
FileObject fileObject = HopVfs.getFileObject(filename);
if (fileObject.exists()) {
- MessageBox box = new MessageBox(hopGui.getShell(), SWT.YES | SWT.NO |
SWT.ICON_QUESTION);
+ MessageBox box = new MessageBox(hopGui.getDisplay().getActiveShell(),
SWT.YES | SWT.NO | SWT.ICON_QUESTION);
box.setText("Overwrite?");
box.setMessage("Are you sure you want to overwrite file '" + filename
+ "'?");
int answer = box.open();
diff --git
a/ui/src/main/java/org/apache/hop/ui/hopgui/file/workflow/delegates/HopGuiWorkflowActionDelegate.java
b/ui/src/main/java/org/apache/hop/ui/hopgui/file/workflow/delegates/HopGuiWorkflowActionDelegate.java
index b753417563..69c7bfe6c4 100644
---
a/ui/src/main/java/org/apache/hop/ui/hopgui/file/workflow/delegates/HopGuiWorkflowActionDelegate.java
+++
b/ui/src/main/java/org/apache/hop/ui/hopgui/file/workflow/delegates/HopGuiWorkflowActionDelegate.java
@@ -95,7 +95,7 @@ public class HopGuiWorkflowActionDelegate {
if (action.isStart()) {
// Check if start is already on the canvas...
if (workflowMeta.findStart() != null) {
- HopGuiWorkflowGraph.showOnlyStartOnceMessage(hopGui.getShell());
+
HopGuiWorkflowGraph.showOnlyStartOnceMessage(hopGui.getDisplay().getActiveShell());
return null;
}
}
@@ -144,7 +144,7 @@ public class HopGuiWorkflowActionDelegate {
}
} catch (Throwable e) {
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
BaseMessages.getString(
PKG,
"HopGui.ErrorDialog.UnexpectedErrorCreatingNewJobGraphEntry.Title"),
BaseMessages.getString(
@@ -205,7 +205,7 @@ public class HopGuiWorkflowActionDelegate {
if (MissingAction.ID.equals(action.getPluginId())) {
return new MissingActionDialog(
- hopGui.getShell(), action, workflowMeta,
workflowGraph.getVariables());
+ hopGui.getDisplay().getActiveShell(), action, workflowMeta,
workflowGraph.getVariables());
}
PluginRegistry registry = PluginRegistry.getInstance();
@@ -257,7 +257,7 @@ public class HopGuiWorkflowActionDelegate {
BaseMessages.getString(
PKG, "HopGui.Dialog.ErrorCreatingActionDialog.Message",
dialogClassName);
hopGui.getLog().logError(errorMsg);
- new ErrorDialog(hopGui.getShell(), errorTitle, errorMsg, t);
+ new ErrorDialog(hopGui.getDisplay().getActiveShell(), errorTitle,
errorMsg, t);
return null;
}
}
@@ -297,7 +297,7 @@ public class HopGuiWorkflowActionDelegate {
}
workflowGraph.updateGui();
} else {
- MessageBox mb = new MessageBox(hopGui.getShell(), SWT.OK |
SWT.ICON_INFORMATION);
+ MessageBox mb = new MessageBox(hopGui.getDisplay().getActiveShell(),
SWT.OK | SWT.ICON_INFORMATION);
mb.setMessage(BaseMessages.getString(PKG,
"HopGui.Dialog.ActionCanNotBeChanged.Message"));
mb.setText(BaseMessages.getString(PKG,
"HopGui.Dialog.ActionCanNotBeChanged.Title"));
mb.open();
@@ -306,7 +306,7 @@ public class HopGuiWorkflowActionDelegate {
} catch (Exception e) {
if (!hopGui.getShell().isDisposed()) {
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
BaseMessages.getString(PKG,
"HopGui.ErrorDialog.ErrorEditingAction.Title"),
BaseMessages.getString(PKG,
"HopGui.ErrorDialog.ErrorEditingAction.Message"),
e);
@@ -374,7 +374,7 @@ public class HopGuiWorkflowActionDelegate {
}
if (action.isStart()) {
- MessageBox mb = new MessageBox(hopGui.getShell(), SWT.OK |
SWT.ICON_INFORMATION);
+ MessageBox mb = new MessageBox(hopGui.getDisplay().getActiveShell(),
SWT.OK | SWT.ICON_INFORMATION);
mb.setMessage(BaseMessages.getString(PKG,
"HopGui.Dialog.OnlyUseStartOnce.Message"));
mb.setText(BaseMessages.getString(PKG,
"HopGui.Dialog.OnlyUseStartOnce.Title"));
mb.open();
diff --git
a/ui/src/main/java/org/apache/hop/ui/hopgui/file/workflow/delegates/HopGuiWorkflowClipboardDelegate.java
b/ui/src/main/java/org/apache/hop/ui/hopgui/file/workflow/delegates/HopGuiWorkflowClipboardDelegate.java
index b940052b19..d15f976540 100644
---
a/ui/src/main/java/org/apache/hop/ui/hopgui/file/workflow/delegates/HopGuiWorkflowClipboardDelegate.java
+++
b/ui/src/main/java/org/apache/hop/ui/hopgui/file/workflow/delegates/HopGuiWorkflowClipboardDelegate.java
@@ -68,7 +68,7 @@ public class HopGuiWorkflowClipboardDelegate {
GuiResource.getInstance().toClipboard(clipText);
} catch (Throwable e) {
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
BaseMessages.getString(PKG,
"HopGui.Dialog.ExceptionCopyToClipboard.Title"),
BaseMessages.getString(PKG,
"HopGui.Dialog.ExceptionCopyToClipboard.Message"),
e);
@@ -80,7 +80,7 @@ public class HopGuiWorkflowClipboardDelegate {
return GuiResource.getInstance().fromClipboard();
} catch (Throwable e) {
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
BaseMessages.getString(PKG,
"HopGui.Dialog.ExceptionPasteFromClipboard.Title"),
BaseMessages.getString(PKG,
"HopGui.Dialog.ExceptionPasteFromClipboard.Message"),
e);
@@ -263,7 +263,7 @@ public class HopGuiWorkflowClipboardDelegate {
// "Error pasting transforms...",
// "I was unable to paste transforms to this pipeline"
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
BaseMessages.getString(PKG,
"HopGui.Dialog.UnablePasteEntries.Title"),
BaseMessages.getString(PKG,
"HopGui.Dialog.UnablePasteEntries.Message"),
e);
@@ -338,7 +338,7 @@ public class HopGuiWorkflowClipboardDelegate {
toClipboard(xml.toString());
} catch (Exception ex) {
- new ErrorDialog(hopGui.getShell(), "Error", "Error encoding to XML", ex);
+ new ErrorDialog(hopGui.getDisplay().getActiveShell(), "Error", "Error
encoding to XML", ex);
}
}
diff --git
a/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/execution/PipelineExecutionViewer.java
b/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/execution/PipelineExecutionViewer.java
index 7f8dd35b78..8f92d104d4 100644
---
a/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/execution/PipelineExecutionViewer.java
+++
b/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/execution/PipelineExecutionViewer.java
@@ -360,7 +360,7 @@ public class PipelineExecutionViewer extends
BaseExecutionViewer
}
} catch (Exception e) {
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
"Error",
"Hop was unable to invoke @GuiTab method "
+ tabItem.getMethod().getName()
@@ -731,7 +731,7 @@ public class PipelineExecutionViewer extends
BaseExecutionViewer
viewPort = pipelinePainter.getViewPort();
graphPort = pipelinePainter.getGraphPort();
} catch (Exception e) {
- new ErrorDialog(hopGui.getShell(), "Error", "Error drawing pipeline
image", e);
+ new ErrorDialog(hopGui.getDisplay().getActiveShell(), "Error", "Error
drawing pipeline image", e);
}
} finally {
gc.dispose();
diff --git
a/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/execution/WorkflowExecutionViewer.java
b/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/execution/WorkflowExecutionViewer.java
index 886f9f4726..bd0a5eb69d 100644
---
a/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/execution/WorkflowExecutionViewer.java
+++
b/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/execution/WorkflowExecutionViewer.java
@@ -503,7 +503,7 @@ public class WorkflowExecutionViewer extends
BaseExecutionViewer
}
} catch (Exception e) {
new ErrorDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
"Error",
"Hop was unable to invoke @GuiTab method "
+ tabItem.getMethod().getName()
@@ -680,7 +680,7 @@ public class WorkflowExecutionViewer extends
BaseExecutionViewer
viewPort = workflowPainter.getViewPort();
graphPort = workflowPainter.getGraphPort();
} catch (Exception e) {
- new ErrorDialog(hopGui.getShell(), "Error", "Error drawing workflow
image", e);
+ new ErrorDialog(hopGui.getDisplay().getActiveShell(), "Error", "Error
drawing workflow image", e);
}
} finally {
gc.dispose();
diff --git
a/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/search/HopSearchPerspective.java
b/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/search/HopSearchPerspective.java
index 409cc76b87..97cb9bee9c 100644
---
a/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/search/HopSearchPerspective.java
+++
b/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/search/HopSearchPerspective.java
@@ -369,7 +369,7 @@ public class HopSearchPerspective implements
IHopPerspective {
try {
searchable.getSearchCallback().callback(searchable, searchResult);
} catch (Exception e) {
- new ErrorDialog(hopGui.getShell(), "Error", "Error opening " +
searchable.getName(), e);
+ new ErrorDialog(hopGui.getDisplay().getActiveShell(), "Error", "Error
opening " + searchable.getName(), e);
}
}
@@ -431,7 +431,7 @@ public class HopSearchPerspective implements
IHopPerspective {
wResults.setRowNums();
wResults.optWidth(true);
} catch (Exception e) {
- new ErrorDialog(hopGui.getShell(), "Error", "Error searching", e);
+ new ErrorDialog(hopGui.getDisplay().getActiveShell(), "Error", "Error
searching", e);
} finally {
refreshLastUsedLocation();
refreshLastUsedSearchStrings();
diff --git
a/ui/src/main/java/org/apache/hop/ui/www/service/WebServiceEditor.java
b/ui/src/main/java/org/apache/hop/ui/www/service/WebServiceEditor.java
index c136a19f39..d543bc243a 100644
--- a/ui/src/main/java/org/apache/hop/ui/www/service/WebServiceEditor.java
+++ b/ui/src/main/java/org/apache/hop/ui/www/service/WebServiceEditor.java
@@ -465,7 +465,7 @@ public class WebServiceEditor extends
MetadataEditor<WebService> {
EnterSelectionDialog selectTransformDialog =
new EnterSelectionDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
pipelineMeta.getTransformNames(),
"Select output transform",
"Select the transform output for the web service");
@@ -476,7 +476,7 @@ public class WebServiceEditor extends
MetadataEditor<WebService> {
IRowMeta rowMeta = pipelineMeta.getTransformFields(variables,
transformName);
EnterSelectionDialog selectFieldDialog =
new EnterSelectionDialog(
- hopGui.getShell(),
+ hopGui.getDisplay().getActiveShell(),
rowMeta.getFieldNames(),
"Select the output field",
"Select the field to use as output for this web service");
@@ -487,7 +487,7 @@ public class WebServiceEditor extends
MetadataEditor<WebService> {
wTransform.setText(transformName);
wField.setText(fieldName);
} catch (Exception e) {
- new ErrorDialog(hopGui.getShell(), "Error", "Error selecting output
field", e);
+ new ErrorDialog(hopGui.getDisplay().getActiveShell(), "Error", "Error
selecting output field", e);
}
}
}