This is an automated email from the ASF dual-hosted git repository.
mcasters pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hop.git
The following commit(s) were added to refs/heads/master by this push:
new ed99efb HOP-2196 : Split the File/New actions into File and Metadata
categories
new 0d0715c Merge pull request #390 from mattcasters/master
ed99efb is described below
commit ed99efb41953d5e615964258aeb9c04c394dfeb7
Author: Matt Casters <[email protected]>
AuthorDate: Wed Nov 18 14:00:29 2020 +0100
HOP-2196 : Split the File/New actions into File and Metadata categories
---
.../hop/ui/hopgui/context/metadata/MetadataContextHandler.java | 6 ++++++
.../org/apache/hop/ui/hopgui/file/pipeline/HopPipelineFileType.java | 3 +++
.../org/apache/hop/ui/hopgui/file/workflow/HopWorkflowFileType.java | 3 +++
3 files changed, 12 insertions(+)
diff --git
a/ui/src/main/java/org/apache/hop/ui/hopgui/context/metadata/MetadataContextHandler.java
b/ui/src/main/java/org/apache/hop/ui/hopgui/context/metadata/MetadataContextHandler.java
index 87d636a..17cea74 100644
---
a/ui/src/main/java/org/apache/hop/ui/hopgui/context/metadata/MetadataContextHandler.java
+++
b/ui/src/main/java/org/apache/hop/ui/hopgui/context/metadata/MetadataContextHandler.java
@@ -72,6 +72,8 @@ public class MetadataContextHandler implements
IGuiContextHandler {
hopMetadata.iconImage(),
( shiftClicked, controlClicked, parameters ) ->
metadataManager.newMetadata() );
newAction.setClassLoader( metadataObjectClass.getClassLoader() );
+ newAction.setCategory( "Metadata" );
+ newAction.setCategoryOrder( "2" );
actions.add( newAction );
GuiAction editAction = new GuiAction(
@@ -82,6 +84,8 @@ public class MetadataContextHandler implements
IGuiContextHandler {
hopMetadata.iconImage(),
( shiftClicked, controlClicked, parameters ) ->
metadataManager.editMetadata() );
editAction.setClassLoader( metadataObjectClass.getClassLoader() );
+ editAction.setCategory( "Metadata" );
+ editAction.setCategoryOrder( "2" );
actions.add( editAction );
GuiAction deleteAction = new GuiAction(
@@ -92,6 +96,8 @@ public class MetadataContextHandler implements
IGuiContextHandler {
hopMetadata.iconImage(),
( shiftClicked, controlClicked, parameters ) ->
metadataManager.deleteMetadata() );
deleteAction.setClassLoader( metadataObjectClass.getClassLoader() );
+ deleteAction.setCategory( "Metadata" );
+ deleteAction.setCategoryOrder( "2" );
actions.add( deleteAction );
return actions;
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 c942609..94fcc15 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
@@ -203,6 +203,9 @@ public class HopPipelineFileType<T extends PipelineMeta>
extends HopFileTypeBase
new ErrorDialog( hopGui.getShell(), "Error", "Error creating new
pipeline", e );
}
} );
+ newAction.setCategory( "File" );
+ newAction.setCategoryOrder( "1" );
+
handlers.add( new GuiContextHandler( ACTION_ID_NEW_PIPELINE,
Arrays.asList(newAction) ) );
return handlers;
}
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 b63231f..9e15136 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
@@ -203,6 +203,9 @@ public class HopWorkflowFileType<T extends WorkflowMeta>
extends HopFileTypeBase
new ErrorDialog( hopGui.getShell(), "Error", "Error creating new
workflow", e );
}
} );
+ newAction.setCategory( "File" );
+ newAction.setCategoryOrder( "1" );
+
handlers.add( new GuiContextHandler( ACTION_ID_NEW_WORKFLOW,
Arrays.asList( newAction ) ) );
return handlers;