We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b7c6bb commit f544fc1Copy full SHA for f544fc1
src/main/java/org/scijava/MenuPath.java
@@ -66,8 +66,16 @@ public MenuPath(final Collection<? extends MenuEntry> menuEntries) {
66
* @see #PATH_SEPARATOR
67
*/
68
public MenuPath(final String path) {
69
+ this(path, PATH_SEPARATOR);
70
+ }
71
+
72
+ /**
73
+ * Creates a menu path with entries parsed from the given string, splitting on
74
+ * the specified separator.
75
+ */
76
+ public MenuPath(final String path, final String separator) {
77
if (path != null && !path.isEmpty()) {
- final String[] tokens = path.split(PATH_SEPARATOR);
78
+ final String[] tokens = path.split(separator);
79
for (final String token : tokens) {
80
add(new MenuEntry(token.trim()));
81
}
0 commit comments