You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hop.apache.org by mc...@apache.org on 2026/04/02 07:15:55 UTC
(hop) branch main updated: Issue #6918 (Only show action when there's a test active) (#6927)
This is an automated email from the ASF dual-hosted git repository.
mcasters pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/hop.git
The following commit(s) were added to refs/heads/main by this push:
new 2fa1db1b54 Issue #6918 (Only show action when there's a test active) (#6927)
2fa1db1b54 is described below
commit 2fa1db1b543fbfa58ad2728708bbbb9f017d0c6d
Author: Matt Casters <ma...@gmail.com>
AuthorDate: Thu Apr 2 09:15:49 2026 +0200
Issue #6918 (Only show action when there's a test active) (#6927)
---
.../org/apache/hop/testing/gui/TestingGuiPlugin.java | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
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 8cf690d8f4..b6c65bd7d0 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
@@ -1727,4 +1727,24 @@ public class TestingGuiPlugin {
new ErrorDialog(shell, "Error", "Error saving the view into a dataset", e);
}
}
+
+ /**
+ * We only want to show the copy
+ *
+ * @param contextActionId
+ * @param context
+ * @return
+ */
+ @GuiContextActionFilter(parentId = HopGuiPipelineContext.CONTEXT_ID)
+ public boolean filterTestingPipeline(String contextActionId, HopGuiPipelineContext context) {
+ if (ACTION_ID_PIPELINE_GRAPH_COPY_TEST_ACTION_CLIPBOARD.equals(contextActionId)) {
+ PipelineMeta pipelineMeta = context.getPipelineMeta();
+ if (pipelineMeta == null) {
+ return false;
+ }
+ PipelineUnitTest unitTest = getCurrentUnitTest(pipelineMeta);
+ return unitTest != null;
+ }
+ return true;
+ }
}