Package org.eclipse.jface.dialogs

Examples of org.eclipse.jface.dialogs.ProgressMonitorDialog


      IRunnableWithProgress runnable = new IRunnableWithProgress() {
        public void run(IProgressMonitor monitor) {
          safeSave(monitor);
        }
      };
      ProgressMonitorDialog dialog = new ProgressMonitorDialog(getShell());
      dialog.run(true, true, runnable);
    } catch (Exception e) {
      VisualSwingPlugin.getLogger().error(e);
      return;
    }
  }
View Full Code Here


                        }
                    }
                };

                try {
                    new ProgressMonitorDialog(targetPart.getSite().getShell()).run(false, true, op);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        } catch (Throwable t) {
View Full Code Here

                        }
                    }
                };

                try {
                    new ProgressMonitorDialog(targetPart.getSite().getShell()).run(false, true, op);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        } catch (Throwable t) {
View Full Code Here

    updateProblemIndication = false;
    try {
      // This runs the options, and shows progress.
      //
      new ProgressMonitorDialog(getSite().getShell()).run(true, false, operation);

      // Refresh the necessary state.
      //
      ((BasicCommandStack)editingDomain.getCommandStack()).saveIsDone();
      firePropertyChange(IEditorPart.PROP_DIRTY);
View Full Code Here

   
  }

    public IType selectType(Shell parent, String filter) throws JavaModelException {
        SelectionDialog dialog= JavaUI.createTypeDialog(
            parent, new ProgressMonitorDialog(parent),
            SearchEngine.createWorkspaceScope(),
            IJavaElementSearchConstants.CONSIDER_ALL_TYPES, false,
            filter

       );
View Full Code Here

          if (document.getNumberOfLines() < 40) {
            BusyIndicator.showWhile(shell.getDisplay(), runnable);

          } else {
            ProgressMonitorDialog dialog= new ProgressMonitorDialog(shell);
            dialog.run(false, true, runnable);
          }
        }
      }

    } catch (InterruptedException e) {
View Full Code Here

        // Unmap the repository provider for each project
        RepositoryProvider.unmap((IProject)projects[j]);               
      }
     
      // Crawl the selected projects and unlink their contents
      ProgressMonitorDialog monitorDialog = new ProgressMonitorDialog(Display.getCurrent().getActiveShell());   
     
      XCDEProjectCrawler crawler = new XCDEProjectCrawler(projectList, XCDEProjectCrawler.UNLINK);
     
      try
      {
        monitorDialog.run(true, true, crawler);
      }
      catch(InvocationTargetException e)
      {
        throw new RuntimeException(e);
      }
View Full Code Here

        dialog.setFilterExtensions(new String[] { "*.jar" });
        dialog.setText("Choose a bundle");
        if (dialog.open() != null) {
          ISelection selection = viewer.getSelection();
          TreeObject selectedItem = (TreeObject) ((IStructuredSelection) selection).getFirstElement();
          ProgressMonitorDialog progressDialog = new ProgressMonitorDialog(getShell());
          try {
            String[] files = dialog.getFileNames();
            String path = dialog.getFilterPath();
            for (int i = 0; i < files.length; i++) {
              files[i] = path + File.separatorChar + files[i];
            }
            progressDialog.run(true, false, new BundleDeployJob(getRepositoryLocation(selectedItem), files));
            viewer.refresh();
          } catch (InvocationTargetException e) {
            MessageDialog.openError(getShell(), "Add bundle", "Could not add bundle\n"
                + e.getTargetException().getMessage());
            e.printStackTrace();
          } catch (InterruptedException e) {
            e.printStackTrace();
          }
        }
      }
    };
    actionAddBundle.setText("Add Bundles...");
    actionAddBundle.setToolTipText("Add bundles to a repository");
    actionAddBundle.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(
        ISharedImages.IMG_TOOL_NEW_WIZARD));

    actionRemoveBundle = new Action() {
      public void run() {
        ISelection selection = viewer.getSelection();
        TreeObject selectedItem = (TreeObject) ((IStructuredSelection) selection).getFirstElement();
        BundleDescriptor descriptor = (BundleDescriptor) selectedItem.getValue();
        if (MessageDialog.openConfirm(getShell(), "Removing bundle", "Are you sure to remove bundle\n"
            + descriptor.getBundleSymbolicName() + " (" + descriptor.getBundleVersion() + ")")) {
          ProgressMonitorDialog progressDialog = new ProgressMonitorDialog(getShell());
          try {
            progressDialog.run(true, false, new BundleUndeployJob(getRepositoryLocation(selectedItem.getParent()),
                descriptor.getBundleSymbolicName(), descriptor.getBundleVersion()));
            viewer.refresh();
          } catch (InvocationTargetException e) {
            MessageDialog.openError(getShell(), "Add bundle", "Could not remove bundle\n"
                + e.getTargetException().getMessage());
View Full Code Here

//            return Status.OK_STATUS;
//        }
//    };
//    job.schedule();
   
    ProgressMonitorDialog dialog = new ProgressMonitorDialog(getSite().getShell());
    try {
      dialog.run(true, true, new IRunnableWithProgress() {
        public void run(IProgressMonitor monitor) {
          nextSteps = protocol.executeNexts(monitor, possibleResults);
         
          // show result
          // reload debugger tree
View Full Code Here

//       }
//       catch (InterruptedException e) {
//          // User canceled the operation... just ignore.
//       }
   
    ProgressMonitorDialog dialog = new ProgressMonitorDialog(getSite().getShell());
    try {
      dialog.run(true, true, new IRunnableWithProgress() {
        public void run(IProgressMonitor monitor) {
          renderingResult = protocol.execute(monitor, iteration);

          // show result
          // reload debugger tree
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.