Examples of IRunnableContext


Examples of org.eclipse.jface.operation.IRunnableContext

                }
            }
        };

        try {
            IRunnableContext runContext = searchContext.getRunContext();
            if (runContext != null) {
                runContext.run(false, false, runnable);
            } else {
                runnable.run(new NullProgressMonitor());
            }
            return result;
        } catch (InvocationTargetException e) {
View Full Code Here

Examples of org.eclipse.jface.operation.IRunnableContext

  public IWizardHandle getWizardHandle() {
    return wizardHandle;
  }

  public IRunnableContext getRunnableContext() {
    return new IRunnableContext() {
      public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable)
          throws InvocationTargetException, InterruptedException {
        wizardHandle.run(fork, cancelable, runnable);
      }
    };
View Full Code Here

Examples of org.eclipse.jface.operation.IRunnableContext

    if (event.getStatus() == null || !event.getStatus().isOK()) {
      return null;
    }
    int eventType = event.getType();

    IRunnableContext context = event.getData() instanceof IRunnableContext ? (IRunnableContext) event.getData()
        : null;
    ValidationStatus validationStatus = validate(context, eventType);
    PartChangeEvent validationEvent = null;
    if (validationStatus instanceof IAdaptable) {
      validationEvent = (PartChangeEvent) ((IAdaptable) validationStatus).getAdapter(PartChangeEvent.class);
View Full Code Here

Examples of org.eclipse.jface.operation.IRunnableContext

   * @param monitor the progress monitor
   * @throws CoreException the operation's core exception
   */
  protected void executeOperation(DocumentProviderOperation operation, IProgressMonitor monitor) throws CoreException {
    try {
      IRunnableContext runner= getOperationRunner(monitor);
      if (runner != null)
        runner.run(false, false, operation);
      else
        operation.run(monitor);
    } catch (InvocationTargetException x) {
      Throwable e= x.getTargetException();
      if (e instanceof CoreException)
View Full Code Here

Examples of org.eclipse.jface.operation.IRunnableContext

   * @exception CoreException the operation's core exception
   * @since 3.0
   */
  protected void executeOperation(DocumentProviderOperation operation, IProgressMonitor monitor) throws CoreException {
    try {
      IRunnableContext runner= getOperationRunner(monitor);
      if (runner != null)
        runner.run(false, false, operation);
      else
        operation.run(monitor);
    } catch (InvocationTargetException x) {
      Throwable e= x.getTargetException();
      if (e instanceof CoreException)
View Full Code Here

Examples of org.eclipse.jface.operation.IRunnableContext

    browsePackage = new Button(classGroup, SWT.PUSH);
    browsePackage.setText(ClickPlugin.getString("action.browse"));
    browsePackage.addSelectionListener(new SelectionAdapter(){
      public void widgetSelected(SelectionEvent evt){
        IRunnableContext context= new BusyIndicatorRunnableContext();
        int style = PackageSelectionDialog.F_REMOVE_DUPLICATES |
                    PackageSelectionDialog.F_SHOW_PARENTS |
                    PackageSelectionDialog.F_HIDE_DEFAULT_PACKAGE;

        JavaSearchScope scope = new JavaSearchScope();
View Full Code Here

Examples of org.eclipse.jface.operation.IRunnableContext

  public static String chooseType(IPackageFragment packageFragment,
      IChooseBeanContributor[] contributors) throws JavaModelException {
    IJavaProject javaProject = packageFragment.getJavaProject();
    IJavaSearchScope searchScope =
        SearchEngine.createJavaSearchScope(new IJavaElement[]{javaProject});
    IRunnableContext context = DesignerPlugin.getActiveWorkbenchWindow();
    // prepare extension
    ChooseBeanTypeSelectionExtension extension =
        new ChooseBeanTypeSelectionExtension(packageFragment, searchScope, contributors);
    // prepare dialog dialog
    SelectionDialog dialog =
View Full Code Here

Examples of org.eclipse.jface.operation.IRunnableContext

              }
            }
          }
        }
        IShellProvider shellProvider;
        IRunnableContext runnableContext;
        IWorkbenchWindow w = getActiveWorkbenchWindow();
        if (w == null && windows.length > 0) {
          w = windows[0];
        }
        if (w != null) {
View Full Code Here

Examples of org.eclipse.jface.operation.IRunnableContext

    /**
     * Create a progress display monitor, and actually
     * execute the code generation.
     */
    try {
      IRunnableContext context = new ProgressMonitorDialog(Display.getDefault().getActiveShell());
      PlatformUI.getWorkbench().getProgressService().runInUI(context,
          getRunnable(result), null /* ISchedulingRule */);
    } catch (InvocationTargetException e) {
      getDefaultPlugin().logError(e.getMessage(), e);
    } catch (InterruptedException e) {
View Full Code Here

Examples of org.eclipse.jface.operation.IRunnableContext

   * @exception CoreException the operation's core exception
   * @since 3.0
   */
  protected void executeOperation(DocumentProviderOperation operation, IProgressMonitor monitor) throws CoreException {
    try {
      IRunnableContext runner= getOperationRunner(monitor);
      if (runner != null)
        runner.run(false, false, operation);
      else
        operation.run(monitor);
    } catch (InvocationTargetException x) {
      Throwable e= x.getTargetException();
      if (e instanceof CoreException)
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.