Package org.eclipse.jface.dialogs

Examples of org.eclipse.jface.dialogs.ProgressMonitorDialog


    if (result != null) {
      final File file = new File(result);
      if (this.folders == null)
        this.folders = new ArrayList();
      if (file != null && file.isDirectory()) {
        ProgressMonitorDialog dialog2 = new TimeTriggeredProgressMonitorDialog(null, 500);
        try {
          dialog2.run(true, true, new IRunnableWithProgress() {
            public void run(IProgressMonitor monitor) {
              monitor.beginTask("Searching for man pages", 1);
              performSearch(file);
              monitor.done();
            }
View Full Code Here


    protected abstract void saveCachedData() throws Exception;

    public abstract Object loadCachedData() throws Exception;
   
    public final void synchronize() {
        final ProgressMonitorDialog monitorDialog = new ProgressMonitorDialog(Display.getCurrent().getActiveShell());
        monitorDialog.setCancelable(true);
        final IRunnableWithProgress runnable = new IRunnableWithProgress() {
            public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
                try {
                    monitor.beginTask(Messages.getString("task.SynchronizeData"), 3);
                    monitor.subTask(Messages.getString("task.Connect"));
                    connect();
                    monitor.worked(1);
                    monitor.subTask(Messages.getString("task.LoadData"));
                    clearInMemoryCache();
                    loadRemoteData();
                    monitor.worked(1);
                    monitor.subTask(Messages.getString("task.SaveData"));
                    saveCachedData();
                    monitor.worked(1);
                } catch (Exception e) {
                    throw new InvocationTargetException(e);
                } finally {
                    monitor.done();
                }
            }
        };
        try {
            monitorDialog.run(true, false, runnable);
        } catch (InvocationTargetException ex) {
            throw new RuntimeException(ex.getTargetException());
        } catch (InterruptedException ex) {
            //
        }
View Full Code Here

      IFileEditorInput input = (IFileEditorInput)editorPart.getEditorInput();
      IJavaProject project = JavaCore.create(input.getFile().getProject());
     
      Shell shell = cellEditorWindow.getShell();
      SelectionDialog dialog = JavaUI.createTypeDialog(
          shell,new ProgressMonitorDialog(shell),
          SearchEngine.createJavaSearchScope(new IJavaElement[]{project}),
          IJavaElementSearchConstants.CONSIDER_CLASSES,false);
       
      if(dialog.open()==SelectionDialog.OK){
        Object[] result = dialog.getResult();
View Full Code Here

        }
        ConnectorServletHelper.setBaseDir(sourceEditor.getFile().getParent());

        try {
            final Display display = Display.getCurrent();
            final ProgressMonitorDialog monitorDialog = new ProgressMonitorDialog(getSite().getShell());
            final IRunnableWithProgress runnable = new IRunnableWithProgress() {

                public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
                    try {
                        monitor.beginTask(WYSIWYGPlugin.getResourceString("editor.task.init_wysiwyg"), 10);
                        WYSIWYGPlugin.getDefault().startWebServer(monitor, 9);
                        monitor.subTask(WYSIWYGPlugin.getResourceString("editor.subtask.waiting_init"));
                        display.asyncExec(new Runnable() {
                            public void run() {
                                monitorDialog.setCancelable(true);
                                browser.setUrl(WYSIWYGPlugin.getDefault().getEditorURL());
                            }
                        });
                        monitorDialog.setCancelable(true);
                        while (!isBrowserLoaded() && !monitor.isCanceled()) {
                            Thread.sleep(1000);
                        }
                        monitor.worked(1);
                        display.asyncExec(new Runnable() {
                            public void run() {
                                setActivePage(0);
                            }
                        });
                    } catch (Exception e) {
                        throw new InvocationTargetException(e);
                    } finally {
                        monitor.done();
                    }
                }
            };
            display.asyncExec(new Runnable() {
                public void run() {
                    try {
                        monitorDialog.run(true, false, runnable);
                    } catch (InvocationTargetException e) {
                        DesignerLogger.logError(WYSIWYGPlugin.getResourceString("wysiwyg.design.create_error"), e.getTargetException());
                    } catch (InterruptedException e) {
                        WYSIWYGPlugin.logError("Web editor page", e);
                    }
View Full Code Here

   
    Controller.getInstance().setApplicationStopping(true);
   
    ApplicationCloser applicationCloser = new ApplicationCloser();
   
    ProgressMonitorDialog dialog = new ProgressMonitorDialog(Display.getDefault().getActiveShell());
   
    try {
      dialog.run(false, false, applicationCloser);
    } catch (InvocationTargetException e) {
      Log.getInstance(ApplicationWorkbenchAdvisor.class).error(e.getMessage());
    } catch (InterruptedException e) {
      Log.getInstance(ApplicationWorkbenchAdvisor.class).error(e.getMessage());     
    }
View Full Code Here

          ckModifyArtist.getSelection(), cbArtist.getText(),
          ckModifyAlbum.getSelection(), cbAlbum.getText(),
          ckModifyGenre.getSelection(), cbGenre.getText(),
          ckModifyYear.getSelection(), teYear.getText(),
          ckModifyComment.getSelection(), teComment.getText());
      ProgressMonitorDialog dialog = new ProgressMonitorDialog(Display.getDefault().getActiveShell());
     
      try {
        dialog.run(true, true, tagUpdater);
      } catch (InvocationTargetException e) {
        Log.getInstance(MetaDataDialog.class).error(e.getMessage());
      } catch (InterruptedException e) {
        Log.getInstance(MetaDataDialog.class).error(e.getMessage());     
      }
View Full Code Here

   
    // Update directories structure
    doScanDirectories();
   
    DatabaseAdder dbAdder = new DatabaseAdder(_dirList);
    ProgressMonitorDialog dialog = new ProgressMonitorDialog(Display.getDefault().getActiveShell());
   
    try {
      dialog.run(true, true, dbAdder);
    } catch (InvocationTargetException e) {
      Log.getInstance(Controller.class).error(e.getMessage());
    } catch (InterruptedException e) {
      Log.getInstance(Controller.class).error(e.getMessage());     
    }
View Full Code Here

   
    // First update directories structure
    doScanDirectories();
   
    LibraryUpdater libraryUpdater = new LibraryUpdater(_dirList);
    ProgressMonitorDialog dialog = new ProgressMonitorDialog(Display.getDefault().getActiveShell());             
   
    try {
      dialog.run(true, true, libraryUpdater);
    } catch (InvocationTargetException e) {
      Log.getInstance(Controller.class).error(e.getMessage());
    } catch (InterruptedException e) {
      Log.getInstance(Controller.class).error(e.getMessage());     
    }
View Full Code Here

 
  public void addItemToPlaylist(String playlistName, ILibraryItem libraryItem, boolean playFirst, int insertionIndex) {
    if (_items.containsKey(playlistName)) {
      if (libraryItem != null) {
        LibraryAdder adder = new LibraryAdder(playlistName, libraryItem, insertionIndex);
        ProgressMonitorDialog dialog = new ProgressMonitorDialog(Display.getDefault().getActiveShell());
       
        try {
          dialog.run(true, true, adder);
        } catch (InvocationTargetException e) {
          Log.getInstance(PlaylistController.class).error(e.getMessage());         
        } catch (InterruptedException e) {
          Log.getInstance(PlaylistController.class).error(e.getMessage());         
        }
View Full Code Here

  }
 
  public void addDiskItemsToPlaylist(String playlistName, List<IDiskItem> items, boolean playFirst, int insertionIndex) {
    if (_items.containsKey(playlistName)) {
      DiskItemAdder adder = new DiskItemAdder(playlistName, items, insertionIndex);     
      ProgressMonitorDialog dialog = new ProgressMonitorDialog(Display.getDefault().getActiveShell());
     
      try {
        dialog.run(true, true, adder);
      } catch (InvocationTargetException e) {
        Log.getInstance(PlaylistController.class).error(e.getMessage());
      } catch (InterruptedException e) {
        Log.getInstance(PlaylistController.class).error(e.getMessage());       
      }
View Full Code Here

TOP

Related Classes of org.eclipse.jface.dialogs.ProgressMonitorDialog

Copyright © 2018 www.massapicom. 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.