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/incubator-hop.git
The following commit(s) were added to refs/heads/master by this push:
new ea5cd6a HOP-2288 Sort perspective by id
new 54030e8 Merge pull request #459 from nadment/HOP-2288
ea5cd6a is described below
commit ea5cd6a9c8e79785f42b72d819337303adef9083
Author: nadment <[email protected]>
AuthorDate: Fri Dec 11 16:59:58 2020 +0100
HOP-2288 Sort perspective by id
---
.../misc/git/src/main/java/org/apache/hop/git/HopGitPerspective.java | 5 +++--
ui/src/main/java/org/apache/hop/ui/hopgui/HopGui.java | 4 ++--
.../org/apache/hop/ui/hopgui/perspective/HopPerspectivePlugin.java | 2 ++
.../apache/hop/ui/hopgui/perspective/HopPerspectivePluginType.java | 5 +++++
.../hopgui/perspective/dataorch/HopDataOrchestrationPerspective.java | 2 +-
.../hop/ui/hopgui/perspective/metadata/MetadataPerspective.java | 5 +++--
.../perspective/pluginexplorer/HopPluginExplorePerspective.java | 4 ++--
.../hop/ui/hopgui/perspective/search/HopSearchPerspective.java | 2 +-
ui/src/main/resources/ui/images/{Plugin.svg => plugin.svg} | 0
9 files changed, 19 insertions(+), 10 deletions(-)
diff --git
a/plugins/misc/git/src/main/java/org/apache/hop/git/HopGitPerspective.java
b/plugins/misc/git/src/main/java/org/apache/hop/git/HopGitPerspective.java
index ef402a9..fda68dc 100644
--- a/plugins/misc/git/src/main/java/org/apache/hop/git/HopGitPerspective.java
+++ b/plugins/misc/git/src/main/java/org/apache/hop/git/HopGitPerspective.java
@@ -86,10 +86,11 @@ import java.util.Date;
import java.util.List;
@HopPerspectivePlugin(
- id = "HopGitPerspective",
+ id = "400-HopGitPerspective",
name = "Git",
image = "git_icon.svg",
- description = "The git perspective")
+ description = "The git perspective"
+)
@GuiPlugin
public class HopGitPerspective implements IHopPerspective {
diff --git a/ui/src/main/java/org/apache/hop/ui/hopgui/HopGui.java
b/ui/src/main/java/org/apache/hop/ui/hopgui/HopGui.java
index 2f6626f..9e5ae44 100644
--- a/ui/src/main/java/org/apache/hop/ui/hopgui/HopGui.java
+++ b/ui/src/main/java/org/apache/hop/ui/hopgui/HopGui.java
@@ -389,9 +389,9 @@ public class HopGui
boolean first = true;
List<Plugin> perspectivePlugins =
pluginRegistry.getPlugins(HopPerspectivePluginType.class);
- // Sort by ID
+ // Sort by id
//
- Collections.sort(perspectivePlugins, Comparator.comparing(p ->
p.getIds()[0]));
+ Collections.sort(perspectivePlugins, Comparator.comparing( p ->
p.getIds()[ 0 ] ));
for (Plugin perspectivePlugin : perspectivePlugins) {
Class<IHopPerspective> perspectiveClass =
diff --git
a/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/HopPerspectivePlugin.java
b/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/HopPerspectivePlugin.java
index 32c334a..1e75bb2 100644
---
a/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/HopPerspectivePlugin.java
+++
b/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/HopPerspectivePlugin.java
@@ -44,4 +44,6 @@ public @interface HopPerspectivePlugin {
String description() default "";
String image() default "";
+
+ String category() default "";
}
diff --git
a/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/HopPerspectivePluginType.java
b/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/HopPerspectivePluginType.java
index 0b487d1..baa5647 100644
---
a/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/HopPerspectivePluginType.java
+++
b/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/HopPerspectivePluginType.java
@@ -66,4 +66,9 @@ public class HopPerspectivePluginType extends
BasePluginType<HopPerspectivePlugi
protected String extractImageFile(HopPerspectivePlugin annotation) {
return annotation.image();
}
+
+ @Override
+ protected String extractCategory(HopPerspectivePlugin annotation) {
+ return annotation.category();
+ }
}
diff --git
a/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/dataorch/HopDataOrchestrationPerspective.java
b/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/dataorch/HopDataOrchestrationPerspective.java
index 543c4b5..8f0f1e3 100644
---
a/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/dataorch/HopDataOrchestrationPerspective.java
+++
b/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/dataorch/HopDataOrchestrationPerspective.java
@@ -65,7 +65,7 @@ import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
@HopPerspectivePlugin(
- id = "HopDataOrchestrationPerspective",
+ id = "100-HopDataOrchestrationPerspective",
name = "Data Orchestration",
image = "ui/images/pipeline.svg",
description = "The Hop Data Orchestration Perspective for pipelines and
workflows"
diff --git
a/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/metadata/MetadataPerspective.java
b/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/metadata/MetadataPerspective.java
index 502bd3f..e4daf4d 100644
---
a/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/metadata/MetadataPerspective.java
+++
b/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/metadata/MetadataPerspective.java
@@ -81,10 +81,11 @@ import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;
@HopPerspectivePlugin(
- id = "Hop-Metadata-Perspective",
+ id = "200-HopMetadataPerspective",
name = "Metadata",
description = "The Hop Metatada Perspective",
- image = "ui/images/metadata.svg")
+ image = "ui/images/metadata.svg"
+)
@GuiPlugin(description="This perspective allows you to see and edit all
available metadata")
public class MetadataPerspective implements IHopPerspective {
diff --git
a/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/pluginexplorer/HopPluginExplorePerspective.java
b/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/pluginexplorer/HopPluginExplorePerspective.java
index f90ba85..47d20da 100644
---
a/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/pluginexplorer/HopPluginExplorePerspective.java
+++
b/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/pluginexplorer/HopPluginExplorePerspective.java
@@ -66,10 +66,10 @@ import java.util.List;
import java.util.Map;
@HopPerspectivePlugin(
- id = "Hop-Plugin-Explorer-Perspective",
+ id = "500-HopPluginExplorerPerspective",
name = "Plugin explorer",
description = "The Hop Plugin Explorer Perspective",
- image = "ui/images/Plugin.svg"
+ image = "ui/images/plugin.svg"
)
@GuiPlugin(description="Hop Plugin Explorer Perspective GUI")
public class HopPluginExplorePerspective implements IHopPerspective {
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 b1f37cb..f725d34 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
@@ -66,7 +66,7 @@ import java.util.List;
import java.util.Map;
@HopPerspectivePlugin(
- id = "HopSearchPerspective",
+ id = "300-HopSearchPerspective",
name = "Search",
description = "The Hop Search Perspective",
image = "ui/images/search.svg"
diff --git a/ui/src/main/resources/ui/images/Plugin.svg
b/ui/src/main/resources/ui/images/plugin.svg
similarity index 100%
rename from ui/src/main/resources/ui/images/Plugin.svg
rename to ui/src/main/resources/ui/images/plugin.svg