Example #1
0
 protected void loadCatalog() {
   CatalogReader reader = new CatalogReader();
   modeList = reader.read("modes/catalog"); // $NON-NLS-1$
   for (int i = 0; i < modeList.length; i++) {
     Mode mode = modeList[i];
     modes.put(mode.getFilename(), mode);
   }
 }
Example #2
0
 private String filenameToModeName(String filename) {
   Mode[] localModes = getModeList();
   if (localModes == null) {
     return null;
   }
   for (int i = 0; i < localModes.length; i++) {
     Mode mode = localModes[i];
     if (mode.matches(filename)) {
       return mode.getFilename();
     }
   }
   return null;
 }