(String jarPath)
| 968 | } |
| 969 | |
| 970 | String getSubmenuName(String jarPath) { |
| 971 | //IJ.log("getSubmenuName: \n"+jarPath+"\n"+pluginsPath); |
| 972 | if (pluginsPath == null) |
| 973 | return null; |
| 974 | if (jarPath.startsWith(pluginsPath)) |
| 975 | jarPath = jarPath.substring(pluginsPath.length() - 1); |
| 976 | int index = jarPath.lastIndexOf(File.separatorChar); |
| 977 | if (index<0) return null; |
| 978 | String name = jarPath.substring(0, index); |
| 979 | index = name.lastIndexOf(File.separatorChar); |
| 980 | if (index<0) return null; |
| 981 | name = name.substring(index+1); |
| 982 | if (name.equals("plugins")) return null; |
| 983 | return name; |
| 984 | } |
| 985 | |
| 986 | static void addItemSorted(Menu menu, MenuItem item, int startingIndex) { |
| 987 | String itemLabel = item.getLabel(); |
no test coverage detected