Package org.eclipse.swt.program

Examples of org.eclipse.swt.program.Program.execute()


      public void widgetSelected( SelectionEvent e ) {
        SharedFile shared_file = getSelectedObject().getSharedFile();
        String extension = FileFormatter.getFileExtension(shared_file.getSharingName());
        Program program = Program.findProgram(extension);
        if (program == null) return;
        program.execute(shared_file.getAbsolutePath());
      }
    });
   
    new MenuItem(upload_selected_menu,SWT.SEPARATOR);
   
View Full Code Here


    for(SharedFile file : selected_files) {
      if (!file.isCompleted()) continue;
      String extension = FileFormatter.getFileExtension(file.getSharingName());
      Program program = Program.findProgram(extension);
      if (program == null) continue;
      program.execute(file.getAbsolutePath());
    }
  }
 
  private boolean selectedRunnableFiles() {
    java.util.List<SharedFile> sharedFiles = shared_files_table.getSelectedObjects();
View Full Code Here

   * @return
   */
  public static void openProgram(String pExtension, String pFile) {
    Program p = getOSAssociation(pExtension);
    if (p != null) {
      p.execute(pFile);
    }
  }
}
View Full Code Here

          try {
            String filename = _dom.transform(element);

            Program prog = Program.findProgram("html");
            if (prog != null)
              prog.execute(filename);
            else {
              filename = new File(filename).toURL().toString();
              Runtime.getRuntime().exec(Options.getBrowserExec(filename, null));
            }
          } catch (Exception ex) {
View Full Code Here

            String sData = getData(tFileName.getText());
           
            Program prog = Program.findProgram("html");
           
            if (prog != null)
              prog.execute(new File((sData).concat(tFileName.getText())).toURL().toString());
            else {
              Runtime.getRuntime().exec(Options.getBrowserExec(new File((sData).concat(tFileName.getText())).toURL().toString(), Options.getLanguage()));
            }
          }
        } catch (Exception ex) {
View Full Code Here

          try {
              String filename = _dom.transform(element);

              Program prog = Program.findProgram("html");
              if (prog != null)
                  prog.execute(filename);
              else {
                  Runtime.getRuntime().exec(Options.getBrowserExec(filename, null));
              }
          } catch (Exception ex) {
              ex.printStackTrace();
View Full Code Here

      //TODO: �berpr�fen, ob Datei wirklich existiert
      url = new File(url).toURL().toString();

      Program prog = Program.findProgram("html");
      if (prog != null)
        prog.execute(url);
      else {              
        Runtime.getRuntime().exec(Options.getBrowserExec(url, lang));

        //Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler javascript:location.href='file://c:/scheduler/config/html/doc/en/xml/job.xml'");
View Full Code Here

            if(file.exists()) {
              //Runtime.getRuntime().exec("cmd /C START iExplore ".concat(filename));

              Program prog = Program.findProgram("html");
              if (prog != null) {
                prog.execute(new File(filename).toURL().toString());               
              } else {
                String[] split = Options.getBrowserExec(new File(filename).toURL().toString(), Options.getLanguage());
                Runtime.getRuntime().exec(split);               

              }                  
View Full Code Here

            try  {
              if(txtPath.getText()!= null && txtPath.getText().length() > 0) {

                Program prog = Program.findProgram("html");
                if (prog != null)
                  prog.execute(new File(txtPath.getText()).toURL().toString());
                else {
                  Runtime.getRuntime().exec(Options.getBrowserExec(new File(txtPath.getText()).toURL().toString(), Options.getLanguage()));
                }
              } else {
                MainWindow.message(shell, sos.scheduler.editor.app.Messages.getString("no_jobdescription"), SWT.ICON_WARNING | SWT.OK );                
View Full Code Here

    link1.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        System.out.println("Selection: " + event.text);
        Program pBrowse = Program.findProgram(".html");
        pBrowse.execute(event.text);
      }
    });
    link2.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        System.out.println("Selection: " + event.text);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.