Examples of ProgressMonitorDialog


Examples of org.eclipse.jface.dialogs.ProgressMonitorDialog

   * @throws InvocationTargetException
   * @throws InterruptedException
   */
  public void put(final String directory) throws SftpException,
      JSchException, InvocationTargetException, InterruptedException {
    ProgressMonitorDialog progress =
        new ProgressMonitorDialog((Display.getCurrent() == null) ? null
            : Display.getCurrent().getActiveShell());
    progress.setCancelable(true);

    PlatformUI.getWorkbench().getProgressService().busyCursorWhile(
        new IRunnableWithProgress() {
          public void run(IProgressMonitor monitor)
              throws InvocationTargetException, InterruptedException {
View Full Code Here

Examples of org.eclipse.jface.dialogs.ProgressMonitorDialog

          baseType = getPackageFragmentRoot().getJavaProject().findType(
              baseClassName);

          // edit this to limit the scope
          SelectionDialog dialog = JavaUI.createTypeDialog(
              composite.getShell(), new ProgressMonitorDialog(composite
                  .getShell()), SearchEngine.createHierarchyScope(baseType),
              IJavaElementSearchConstants.CONSIDER_CLASSES, false);

          dialog.setMessage("&Choose a type:");
          dialog.setBlockOnOpen(true);
View Full Code Here

Examples of org.eclipse.jface.dialogs.ProgressMonitorDialog

  /**
   * Validates whether Hadoop exists at the specified server location
   *
   */
  private void testLocation() {
    ProgressMonitorDialog dialog = new ProgressMonitorDialog(getShell());
    dialog.setOpenOnRun(true);

    try {
      final HadoopServer location = defineServerFromValues();

      try {
        dialog.run(true, false, new IRunnableWithProgress() {
          public void run(IProgressMonitor monitor)
              throws InvocationTargetException, InterruptedException {
            Session session = null;
            try {
              session = location.createSession();
View Full Code Here

Examples of org.eclipse.jface.dialogs.ProgressMonitorDialog

        public void run() {

          switch (progressState) {
          case PROGRESS_STARTED:
            if (!continuous) {
              pmd = new ProgressMonitorDialog(getShell());
              progressMonitor = pmd.getProgressMonitor();
              pmd.open();
              progressMonitor.beginTask("Layout Running...", e.getTotalNumberOfSteps());
            }
            break;
View Full Code Here

Examples of org.eclipse.jface.dialogs.ProgressMonitorDialog

        public void run() {

          switch (progressState) {
          case PROGRESS_STARTED:
            if (!continuous) {
              pmd = new ProgressMonitorDialog(getShell());
              progressMonitor = pmd.getProgressMonitor();
              pmd.open();
              progressMonitor.beginTask("Layout Running...", e.getTotalNumberOfSteps());
            }
            break;
View Full Code Here

Examples of org.eclipse.jface.dialogs.ProgressMonitorDialog

                        }
                    }
                };

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

Examples of org.eclipse.jface.dialogs.ProgressMonitorDialog

                                boolean ok = MessageDialog.openConfirm(getParentShell(),
                                        Messages.EditBlackboardUtil_Update_Selection,
                                        Messages.EditBlackboardUtil_update_selection_confirmation);
                                if (ok) {
                                    try {
                                        ProgressMonitorDialog d = new ProgressMonitorDialog(this
                                                .getParentShell());

                                        blackboardLock.unlock();
                                        d.run(false, false, new IRunnableWithProgress(){
                                            public void run( IProgressMonitor monitor ) {
                                                updateFeatures(layer, monitor, dirtyArea);
                                            }
                                        });
                                        okPressed();
View Full Code Here

Examples of org.eclipse.jface.dialogs.ProgressMonitorDialog

        display.asyncExec(new Runnable() {
            public void run() {
                BusyIndicator.showWhile(display, new Runnable() {
                    public void run() {
                        ProgressMonitorDialog dialog = new ProgressMonitorDialog(display
                                .getActiveShell());

                        try {
                            dialog.run(false, false, progressRunnable);
                        } catch (InvocationTargetException e) {
                            // won't happen
                            ProjectPlugin.log("", e);
                        } catch (InterruptedException e) {
                            // won't happen
View Full Code Here

Examples of org.eclipse.jface.dialogs.ProgressMonitorDialog

    }

    public void executeSyncWithoutUndo(final MapCommand command) {
        command.setMap(this);
        if (Display.getCurrent() != null) {
            ProgressMonitorDialog dialog = new ProgressMonitorDialog(PlatformUI.getWorkbench()
                    .getActiveWorkbenchWindow().getShell());
            dialog.setOpenOnRun(true);
            try {
                dialog.run(false, false, new IRunnableWithProgress() {

                    public void run(IProgressMonitor monitor) throws InvocationTargetException,
                            InterruptedException {
                        try {
                            command.run(monitor);
View Full Code Here

Examples of org.eclipse.jface.dialogs.ProgressMonitorDialog

            boolean runASync ) {

        Runnable object = new Runnable(){
            public void run() {
                Shell shell = Display.getDefault().getActiveShell();
                ProgressMonitorDialog dialog = new ProgressMonitorDialog(shell){
                    @Override
                    protected void configureShell( Shell shell ) {
                        super.configureShell(shell);
                        shell.setText(dialogTitle);
                    }

                    @Override
                    protected void createButtonsForButtonBar( Composite parent ) {
                        if (showRunInBackground)
                            createBackgroundButton(parent);
                        super.createButtonsForButtonBar(parent);
                    }

                    private void createBackgroundButton( Composite parent ) {
                        createButton(parent, IDialogConstants.BACK_ID,
                                Messages.PlatformGIS_background, true);
                    }

                    @Override
                    protected void buttonPressed( int buttonId ) {
                        if (buttonId == IDialogConstants.BACK_ID) {
                            getShell().setVisible(false);
                        } else
                            super.buttonPressed(buttonId);
                    }
                };
                try {

                    dialog.run(true, true, new IRunnableWithProgress(){
                        public void run( IProgressMonitor monitor ) {
                            try {
                                runBlockingOperation(new IRunnableWithProgress(){

                                    public void run( IProgressMonitor monitor )
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.