diff --git a/assemblies/static/src/main/resources/README.txt b/assemblies/static/src/main/resources/README.txt index 221bcf905b3..9dd0e9ebe9e 100644 --- a/assemblies/static/src/main/resources/README.txt +++ b/assemblies/static/src/main/resources/README.txt @@ -20,7 +20,7 @@ When you have a question you can use our mailing list (http://hop.apache.org/com Installation Instruction: - - Have a recent Java 8 Runtime + - Have a recent Java 17 Runtime Windows: - To start the GUI run hop-gui.bat diff --git a/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/HopPipelineFileType.java b/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/HopPipelineFileType.java index c794791cee0..5d5fd473ba0 100644 --- a/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/HopPipelineFileType.java +++ b/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/HopPipelineFileType.java @@ -27,6 +27,7 @@ import org.apache.hop.core.file.IHasFilename; import org.apache.hop.core.gui.plugin.action.GuiAction; import org.apache.hop.core.gui.plugin.action.GuiActionType; +import org.apache.hop.core.logging.LogChannel; import org.apache.hop.core.variables.IVariables; import org.apache.hop.core.xml.XmlHandler; import org.apache.hop.history.AuditManager; @@ -35,8 +36,10 @@ import org.apache.hop.ui.core.dialog.ErrorDialog; import org.apache.hop.ui.core.gui.HopNamespace; import org.apache.hop.ui.hopgui.HopGui; +import org.apache.hop.ui.hopgui.HopGuiExtensionPoint; import org.apache.hop.ui.hopgui.context.GuiContextHandler; import org.apache.hop.ui.hopgui.context.IGuiContextHandler; +import org.apache.hop.ui.hopgui.delegates.HopGuiFileOpenedExtension; import org.apache.hop.ui.hopgui.file.HopFileTypeBase; import org.apache.hop.ui.hopgui.file.HopFileTypePlugin; import org.apache.hop.ui.hopgui.file.IHopFileType; @@ -112,14 +115,21 @@ public Properties getCapabilities() { } @Override - public IHopFileTypeHandler openFile( - HopGui hopGui, String filename, IVariables parentVariableSpace) throws HopException { + public IHopFileTypeHandler openFile(HopGui hopGui, String filename, IVariables variables) + throws HopException { try { // This file is opened in the data orchestration perspective // HopDataOrchestrationPerspective perspective = HopGui.getDataOrchestrationPerspective(); perspective.activate(); + // Normalize the filename into a relative path... + // + HopGuiFileOpenedExtension ext = new HopGuiFileOpenedExtension(null, variables, filename); + ExtensionPointHandler.callExtensionPoint( + LogChannel.UI, variables, HopGuiExtensionPoint.HopGuiFileOpenedDialog.id, ext); + filename = variables.resolve(ext.filename); + // See if the same pipeline isn't already open. // Other file types we might allow to open more than once but not pipelines for now. // @@ -136,7 +146,7 @@ public IHopFileTypeHandler openFile( // Load the pipeline // PipelineMeta pipelineMeta = - new PipelineMeta(filename, hopGui.getMetadataProvider(), parentVariableSpace); + new PipelineMeta(filename, hopGui.getMetadataProvider(), variables); // Pass the MetaStore for reference lookups // @@ -153,10 +163,7 @@ public IHopFileTypeHandler openFile( // Inform those that want to know about it that we loaded a pipeline // ExtensionPointHandler.callExtensionPoint( - hopGui.getLog(), - parentVariableSpace, - HopExtensionPoint.PipelineAfterOpen.id, - pipelineMeta); + hopGui.getLog(), variables, HopExtensionPoint.PipelineAfterOpen.id, pipelineMeta); return typeHandler; } catch (Exception e) { diff --git a/ui/src/main/java/org/apache/hop/ui/hopgui/file/workflow/HopWorkflowFileType.java b/ui/src/main/java/org/apache/hop/ui/hopgui/file/workflow/HopWorkflowFileType.java index 0f3cef9f1ab..42bf75037a3 100644 --- a/ui/src/main/java/org/apache/hop/ui/hopgui/file/workflow/HopWorkflowFileType.java +++ b/ui/src/main/java/org/apache/hop/ui/hopgui/file/workflow/HopWorkflowFileType.java @@ -26,6 +26,7 @@ import org.apache.hop.core.file.IHasFilename; import org.apache.hop.core.gui.plugin.action.GuiAction; import org.apache.hop.core.gui.plugin.action.GuiActionType; +import org.apache.hop.core.logging.LogChannel; import org.apache.hop.core.variables.IVariables; import org.apache.hop.core.xml.XmlHandler; import org.apache.hop.history.AuditManager; @@ -33,8 +34,10 @@ import org.apache.hop.ui.core.dialog.ErrorDialog; import org.apache.hop.ui.core.gui.HopNamespace; import org.apache.hop.ui.hopgui.HopGui; +import org.apache.hop.ui.hopgui.HopGuiExtensionPoint; import org.apache.hop.ui.hopgui.context.GuiContextHandler; import org.apache.hop.ui.hopgui.context.IGuiContextHandler; +import org.apache.hop.ui.hopgui.delegates.HopGuiFileOpenedExtension; import org.apache.hop.ui.hopgui.file.HopFileTypeBase; import org.apache.hop.ui.hopgui.file.HopFileTypePlugin; import org.apache.hop.ui.hopgui.file.IHopFileType; @@ -114,14 +117,21 @@ public Properties getCapabilities() { } @Override - public IHopFileTypeHandler openFile( - HopGui hopGui, String filename, IVariables parentVariableSpace) throws HopException { + public IHopFileTypeHandler openFile(HopGui hopGui, String filename, IVariables variables) + throws HopException { try { // This file is opened in the data orchestration perspective // HopDataOrchestrationPerspective perspective = HopGui.getDataOrchestrationPerspective(); perspective.activate(); + // Normalize the filename into a relative path... + // + HopGuiFileOpenedExtension ext = new HopGuiFileOpenedExtension(null, variables, filename); + ExtensionPointHandler.callExtensionPoint( + LogChannel.UI, variables, HopGuiExtensionPoint.HopGuiFileOpenedDialog.id, ext); + filename = variables.resolve(ext.filename); + // See if the same workflow isn't already open. // Other file types we might allow to open more than once but not workflows for now. // @@ -138,7 +148,7 @@ public IHopFileTypeHandler openFile( // Load the workflow from file // WorkflowMeta workflowMeta = - new WorkflowMeta(parentVariableSpace, filename, hopGui.getMetadataProvider()); + new WorkflowMeta(variables, filename, hopGui.getMetadataProvider()); // Pass the MetaStore for reference lookups // @@ -151,7 +161,7 @@ public IHopFileTypeHandler openFile( // Inform those that want to know about it that we loaded a pipeline // ExtensionPointHandler.callExtensionPoint( - hopGui.getLog(), parentVariableSpace, "WorkflowAfterOpen", workflowMeta); + hopGui.getLog(), variables, "WorkflowAfterOpen", workflowMeta); // Show it in the perspective //