@@ -448,7 +448,10 @@ public void actionPerformed(ActionEvent e) {
448448 for (Library library : coreLibraries ) {
449449 JMenuItem item = new JMenuItem (library .getName ());
450450 item .addActionListener (listener );
451- item .setActionCommand (library .getJarPath ());
451+
452+ // changed to library-name to facilitate specification if imports from properties file
453+ item .setActionCommand (library .getName ());
454+
452455 importMenu .add (item );
453456 }
454457 }
@@ -464,7 +467,9 @@ public void actionPerformed(ActionEvent e) {
464467 for (Library library : contribLibraries ) {
465468 JMenuItem item = new JMenuItem (library .getName ());
466469 item .addActionListener (listener );
467- item .setActionCommand (library .getJarPath ());
470+
471+ // changed to library-name to facilitate specification if imports from properties file
472+ item .setActionCommand (library .getName ());
468473
469474 String group = library .getGroup ();
470475 if (group != null ) {
@@ -1033,6 +1038,26 @@ public boolean validExtension(String what) {
10331038
10341039 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10351040
1041+ /**
1042+ * Checks coreLibraries and contribLibraries in 'mode' for a library whose name is 'libName'
1043+ * @param mode the mode to check
1044+ * @param libName the name of the library
1045+ * @return the Library or null if not found
1046+ */
1047+ public Library findLibraryByName (String libName ) {
1048+
1049+ for (Library lib : this .coreLibraries ) {
1050+ if (libName .equals (lib .getName ()))
1051+ return lib ;
1052+ }
1053+
1054+ for (Library lib : this .contribLibraries ) {
1055+ if (libName .equals (lib .getName ()))
1056+ return lib ;
1057+ }
1058+
1059+ return null ;
1060+ }
10361061
10371062 /**
10381063 * Create a fresh applet/application folder if the 'delete target folder'
0 commit comments