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
263
263
264
264
static public final Stream <String > findClassNamesForPackage (final String packageName ) {
265
265
ensureCache ();
266
+ if (packageName .length () == 0 )
267
+ return class_urls .keySet ().stream ();
266
268
return class_urls .keySet ().stream ().filter (s -> s .startsWith (packageName ) && -1 == s .indexOf ('.' , packageName .length () + 2 ));
267
269
}
268
270
@@ -273,6 +275,8 @@ static public final Stream<String> findClassNamesForPackage(final String package
273
275
*/
274
276
static public final Stream <String > findClassNamesStartingWith (final String text ) {
275
277
ensureCache ();
278
+ if (text .length () == 0 )
279
+ return class_urls .keySet ().stream ();
276
280
return class_urls .keySet ().stream ().filter (s -> s .startsWith (text ));
277
281
}
278
282
@@ -289,6 +293,8 @@ static public final Stream<String> findClassNamesContaining(final String text) {
289
293
static public final ArrayList <String > findSimpleClassNamesStartingWith (final String text ) {
290
294
ensureCache ();
291
295
final ArrayList <String > matches = new ArrayList <>();
296
+ if (0 == text .length ())
297
+ return matches ;
292
298
for (final String classname : class_urls .keySet ()) {
293
299
final int idot = classname .lastIndexOf ('.' );
294
300
final String simplename = -1 == idot ? classname : classname .substring (idot + 1 );
You can’t perform that action at this time.
0 commit comments