Пример #1
0
 /**
  * Open the dialog.
  *
  * @return the result
  */
 public Object open() {
   createContents();
   WidgetsTool.setSize(shlBusyboxSelector);
   shlBusyboxSelector.open();
   shlBusyboxSelector.layout();
   Display display = getParent().getDisplay();
   while (!shlBusyboxSelector.isDisposed()) {
     if (!display.readAndDispatch()) {
       display.sleep();
     }
   }
   return result;
 }
Пример #2
0
 public Object open(String folder) {
   createContents();
   WidgetsTool.setSize(shlBundler);
   sourceFolder.setText(folder);
   meta.clear();
   files = new Vector();
   File srcdir = new File(sourceFolder.getText());
   File[] chld = srcdir.listFiles();
   for (int i = 0; i < chld.length; i++) {
     if (chld[i].getName().toUpperCase().endsWith("SIN")
         || (chld[i].getName().toUpperCase().endsWith("TA")
             && !chld[i].getName().toUpperCase().contains("SIMLOCK"))
         || (chld[i].getName().toUpperCase().endsWith("XML")
             && !chld[i].getName().toUpperCase().contains("UPDATE"))) {
       files.add(chld[i]);
     }
   }
   srcdir = new File(sourceFolder.getText() + File.separator + "boot");
   if (srcdir.exists()) {
     chld = srcdir.listFiles();
     for (int i = 0; i < chld.length; i++) {
       if (chld[i].getName().toUpperCase().endsWith("XML")) {
         files.add(chld[i]);
       }
     }
   }
   model.refresh(meta);
   treeViewerCategories.setInput(model);
   listViewerFiles.setInput(files);
   shlBundler.open();
   shlBundler.layout();
   Display display = getParent().getDisplay();
   while (!shlBundler.isDisposed()) {
     if (!display.readAndDispatch()) {
       display.sleep();
     }
   }
   return result;
 }