Package org.eclipse.core.commands

Examples of org.eclipse.core.commands.ExecutionException


      IWizardRegistry wizardRegistry = getWizardRegistry();
      IWizardDescriptor wizardDescriptor = wizardRegistry
          .findWizard(wizardId);
      if (wizardDescriptor == null) {
        throw new ExecutionException("unknown wizard: " + wizardId); //$NON-NLS-1$
      }

      try {
        IWorkbenchWizard wizard = wizardDescriptor.createWizard();
        wizard.init(PlatformUI.getWorkbench(),
            StructuredSelection.EMPTY);
       
        if (wizardDescriptor.canFinishEarly() && !wizardDescriptor.hasPages()) {
          wizard.performFinish();
          return null;
        }
       
        Shell parent = activeWindow.getShell();
        WizardDialog dialog = new WizardDialog(parent, wizard);
        dialog.create();
        dialog.open();

      } catch (CoreException ex) {
        throw new ExecutionException("error creating wizard", ex); //$NON-NLS-1$
      }

    }

    return null;
View Full Code Here


                                                new Runnable() {
                                                    public void run() {
                                                        ExceptionHandler
                                                                .getInstance()
                                                                .handleException(
                                                                        new ExecutionException(
                                                                                "An exception occurred while executing " //$NON-NLS-1$
                                                                                        + methodToExecute
                                                                                                .getName(),
                                                                                e
                                                                                        .getTargetException()));
                                                    }
                                                });
                                    }
                                }
                            };

                            swingInvokeLater(methodRunnable);
                        }
                    } catch (final ClassNotFoundException e) {
                        // There is no Swing support, so do nothing.

                    } catch (final NoSuchMethodException e) {
                        // The API has changed, which seems amazingly unlikely.
                        throw new Error("Something is seriously wrong here"); //$NON-NLS-1$
                    }

        } else {

          methodToExecute.invoke(focusControl, null);
        }

      } catch (IllegalAccessException e) {
        // The method is protected, so do nothing.

      } catch (InvocationTargetException e) {
        throw new ExecutionException(
            "An exception occurred while executing " //$NON-NLS-1$
                + methodToExecute.getName(), e
                .getTargetException());

      }
View Full Code Here

    public Object execute(final ExecutionEvent event) throws ExecutionException {
        try {
            return execute(event.getParameters());
        } catch (final org.eclipse.ui.commands.ExecutionException e) {
            throw new ExecutionException(e.getMessage(), e.getCause());
        }
    }
View Full Code Here

      WorkspaceAnalyserJob job = new WorkspaceAnalyserJob(null);
      job.setRule(ResourcesPlugin.getWorkspace().getRoot());
      job.schedule();

    } catch (Exception e) {
      throw new ExecutionException(e.getMessage(), e);
    }

    return null;
  }
View Full Code Here

        System.out.println( file );
        try {
            example( file );
        }
        catch( Throwable t ){
            throw new ExecutionException("Example Failed", t );
        }
        return null;
    }
View Full Code Here

        if (shell != null) {
          MessageDialog.openError(shell, Messages.SetValueOperation_Error, Messages.SetValueOperation_Error_Ocurrs_While_Setting_Property+property.getDisplayName()+"!"+e.getMessage()); //$NON-NLS-3$
        }
      }
      VisualSwingPlugin.getLogger().error(e);
      throw new ExecutionException(e.getMessage());
    }
    return Status.OK_STATUS;
  }
View Full Code Here

          }
         
          if (diagramEditPart != null)
            diagramEditPart.refresh();
        } catch (InferenceException e) {
          throw new ExecutionException(e.getMessage(), e);
        }
       
        return CommandResult.newOKCommandResult();
      }
View Full Code Here

    // just pass it along
    EcoreInferenceHandler eih = new EcoreInferenceHandler(container.eResource());
    try {
      created = eih.createElement(container, elementType, containerFeature);
    } catch (InferenceException e) {
      throw new ExecutionException(e.getMessage(), e);
    }
    return CommandResult.newOKCommandResult(created);
   
  }
View Full Code Here

    // just pass it along
    EcoreInferenceHandler eih = new EcoreInferenceHandler(this.emfInferenceHandler.resource);
    try {
      eih.addReference(element, reference, value);
    } catch (InferenceException e) {
      throw new ExecutionException(e.getMessage(), e);
    }
    return CommandResult.newOKCommandResult();
   
  }
View Full Code Here

    // just pass it along
    EcoreInferenceHandler eih = new EcoreInferenceHandler(this.emfInferenceHandler.resource);
    try {
      eih.deleteElement(object, container, containerFeature);
    } catch (InferenceException e) {
      throw new ExecutionException(e.getMessage(), e);
    }
    return CommandResult.newOKCommandResult();
   
  }
View Full Code Here

TOP

Related Classes of org.eclipse.core.commands.ExecutionException

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.