Toolsets not sorting

fiji
imagej
tool
#1

When selecting a macro in the toolsets folder by the ‘More Tools’ icon (>>), the macros are sorted randomly. This folder is correctly sorted alphabetically when opened in the script editor.
Is there a limit on number of macros in the toolsets folder?
Its a problem I’ve just lived with for a while but spending too much time searching for macros.
Posted this question on the ImageJ mailing a month ago with no response. Occurs with ImageJ and Fiji.
MacBookPro, OS 10.14.3, Java 1.8.0_162 64-bit, ImageJ1.52 (updated Fiji this morning).

Thanks,
Glen

1 Like
#2

@Wayne The following patch addresses this issue:

diff --git src/main/java/ij/gui/Toolbar.java src/main/java/ij/gui/Toolbar.java
index 8499002a..06e39f1b 100644
--- src/main/java/ij/gui/Toolbar.java
+++ src/main/java/ij/gui/Toolbar.java
@@ -1148,6 +1148,7 @@ public class Toolbar extends Canvas implements MouseListener, MouseMotionListene
                if (!applet && f.exists() && f.isDirectory()) {
                        list = f.list();
                        if (list==null) return;
+                       Arrays.sort(list);
                } else
                        list = new String[0];
                switchPopup.removeAll();

I didn’t see the post. Could you cross-link it please?

2 Likes
#3

@ ctrueden’s patch for this issue, which I am not able to reproduce, is in the latest daily build (1.52p29).

2 Likes
#4

Interesting. I wonder if it has to do with the file system type. My computer’s drive is formatted with APFS; maybe HFS+ does not have the issue? FWIW, I reproduced the issue by copying several .txt files inside the macros/toolsets folder in non-alphabetical order, then launching ImageJ and checking the >> dropdown.

Thank you for the quick response!

#5

I am running macOS 10.12.6 and my drive is formatted with HFS+.

1 Like
#6

thanks for the quick fix. My drive is formatted APFS.
I can check drive formats on 3 or 4 other other Mac systems whenever I get back into the lab (been doing a little bit of consulting).

Regards,
Glen

2 Likes