File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
src/main/java/org/scijava/ui/swing/script Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -263,6 +263,8 @@ static public final Stream<String> findPackageNamesStartingWith(final String tex
263263
264264 static public final Stream <String > findClassNamesForPackage (final String packageName ) {
265265 ensureCache ();
266+ if (packageName .length () == 0 )
267+ return class_urls .keySet ().stream ();
266268 return class_urls .keySet ().stream ().filter (s -> s .startsWith (packageName ) && -1 == s .indexOf ('.' , packageName .length () + 2 ));
267269 }
268270
@@ -273,6 +275,8 @@ static public final Stream<String> findClassNamesForPackage(final String package
273275 */
274276 static public final Stream <String > findClassNamesStartingWith (final String text ) {
275277 ensureCache ();
278+ if (text .length () == 0 )
279+ return class_urls .keySet ().stream ();
276280 return class_urls .keySet ().stream ().filter (s -> s .startsWith (text ));
277281 }
278282
@@ -289,6 +293,8 @@ static public final Stream<String> findClassNamesContaining(final String text) {
289293 static public final ArrayList <String > findSimpleClassNamesStartingWith (final String text ) {
290294 ensureCache ();
291295 final ArrayList <String > matches = new ArrayList <>();
296+ if (0 == text .length ())
297+ return matches ;
292298 for (final String classname : class_urls .keySet ()) {
293299 final int idot = classname .lastIndexOf ('.' );
294300 final String simplename = -1 == idot ? classname : classname .substring (idot + 1 );
You can’t perform that action at this time.
0 commit comments