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 f4736fc382 HOP-4158 Add help in the context dialog for transforms and 
actions
     new d0cad1a93f Merge pull request #1653 from nadment/HOP-4158
f4736fc382 is described below

commit f4736fc38228b25356760c7050d2468047b05f04
Author: Nicolas Adment <[email protected]>
AuthorDate: Mon Aug 22 22:44:03 2022 +0200

    HOP-4158 Add help in the context dialog for transforms and actions
---
 .../ui/hopgui/file/pipeline/HopGuiPipelineGraph.java   | 18 ++++++++++++++++++
 .../ui/hopgui/file/workflow/HopGuiWorkflowGraph.java   | 18 ++++++++++++++++++
 2 files changed, 36 insertions(+)

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 5c85b03dde..461ea4ea54 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
@@ -99,6 +99,7 @@ import org.apache.hop.ui.hopgui.shared.SwtGc;
 import org.apache.hop.ui.hopgui.shared.SwtScrollBar;
 import org.apache.hop.ui.pipeline.dialog.PipelineDialog;
 import org.apache.hop.ui.util.EnvironmentUtils;
+import org.apache.hop.ui.util.HelpUtils;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.CTabFolder;
 import org.eclipse.swt.custom.CTabItem;
@@ -2042,6 +2043,23 @@ public class HopGuiPipelineGraph extends 
HopGuiAbstractGraph
     return new int[] {x1, y1, x2, y2};
   }
 
+  @GuiContextAction(
+      id = "pipeline-graph-transform-90000-transform-help",
+      parentId = HopGuiPipelineTransformContext.CONTEXT_ID,
+      type = GuiActionType.Info,
+      name = "i18n::System.Button.Help",
+      tooltip = "i18n::System.Tooltip.Help",
+      image = "ui/images/help.svg",
+      category = "Basic",
+      categoryOrder = "1")
+  public void openTransformHelp(HopGuiPipelineTransformContext context) {
+    IPlugin plugin =
+        PluginRegistry.getInstance()
+            .getPlugin(TransformPluginType.class, 
context.getTransformMeta().getPluginId());
+        
+    HelpUtils.openHelp(getShell(), plugin);
+  }
+  
   @GuiContextAction(
       id = "pipeline-graph-transform-10100-transform-detach",
       parentId = HopGuiPipelineTransformContext.CONTEXT_ID,
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 7ffee05021..077d3de548 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
@@ -82,6 +82,7 @@ import 
org.apache.hop.ui.hopgui.perspective.dataorch.HopGuiAbstractGraph;
 import org.apache.hop.ui.hopgui.shared.SwtGc;
 import org.apache.hop.ui.hopgui.shared.SwtScrollBar;
 import org.apache.hop.ui.util.EnvironmentUtils;
+import org.apache.hop.ui.util.HelpUtils;
 import org.apache.hop.ui.workflow.dialog.WorkflowDialog;
 import org.apache.hop.workflow.*;
 import org.apache.hop.workflow.action.ActionMeta;
@@ -1807,6 +1808,23 @@ public class HopGuiWorkflowGraph extends 
HopGuiAbstractGraph
     redraw();
   }
 
+  @GuiContextAction(
+      id = "workflow-graph-action-90000-help",
+      parentId = HopGuiWorkflowActionContext.CONTEXT_ID,
+      type = GuiActionType.Info,
+      name = "i18n::System.Button.Help",
+      tooltip = "i18n::System.Tooltip.Help",
+      image = "ui/images/help.svg",
+      category = "Basic",
+      categoryOrder = "1")
+  public void openActionHelp(HopGuiWorkflowActionContext context) {
+    IPlugin plugin =
+        PluginRegistry.getInstance()
+            .getPlugin(ActionPluginType.class, 
context.getActionMeta().getAction());
+        
+    HelpUtils.openHelp(getShell(), plugin);
+  }
+  
   protected synchronized void setMenu(int x, int y) {
 
     currentMouseX = x;

Reply via email to