Package org.eclipse.core.commands

Examples of org.eclipse.core.commands.ExecutionException


        _hasExecuted = false;
        _hasCleanState = false;
      }
      return result;
    }
    throw new ExecutionException("Cannot redo"); //$NON-NLS-1$
  }
View Full Code Here


        _hasExecuted = true;
        _hasCleanState = false;
      }
      return result;
    }
    throw new ExecutionException("Cannot redo"); //$NON-NLS-1$
  }
View Full Code Here

        _hasCommitted = false;
        _hasCleanState = false;
      }
      return result;
    }
    throw new ExecutionException("Cannot execute"); //$NON-NLS-1$
  }
View Full Code Here

        _hasExecuted = false;
        _hasCleanState = false;
      }
      return result;
    }
    throw new ExecutionException("Cannot execute"); //$NON-NLS-1$
  }
View Full Code Here

        _hasExecuted = false;
        _hasCleanState = false;
      }
      return result;
    }
    throw new ExecutionException("Cannot redo"); //$NON-NLS-1$
  }
View Full Code Here

        _hasExecuted = true;
        _hasCleanState = false;
      }
      return result;
    }
    throw new ExecutionException("Cannot redo"); //$NON-NLS-1$
  }
View Full Code Here

        IWorkbenchPage page = PlatformUI.getWorkbench()
            .getActiveWorkbenchWindow().getActivePage();
        page.openEditor(editorInput, getEditorID());
        return CommandResult.newOKCommandResult();
      } catch (Exception ex) {
        throw new ExecutionException("Can't open diagram", ex);
      }
    }
View Full Code Here

//iFO     
      Diagram d = ViewService.createDiagram(getDiagramDomainElement(),
          getDiagramKind(), getPreferencesHint());
      if (d == null) {
        throw new ExecutionException("Can't create diagram of '"
            + getDiagramKind() + "' kind");
      }
      diagramFacet.setDiagramLink(d);
      assert diagramFacet.eResource() != null;
      diagramFacet.eResource().getContents().add(d);
      EObject container = diagramFacet.eContainer();
      while (container instanceof View) {
        ((View) container).persist();
        container = container.eContainer();
      }
      try {
        new WorkspaceModifyOperation() {
          protected void execute(IProgressMonitor monitor)
              throws CoreException, InvocationTargetException,
              InterruptedException {
            try {
              for (Iterator it = diagramFacet.eResource()
                  .getResourceSet().getResources().iterator(); it
                  .hasNext();) {
                Resource nextResource = (Resource) it.next();
                if (nextResource.isLoaded()
                    && !getEditingDomain().isReadOnly(
                        nextResource)) {
                  nextResource
                      .save(eu.admire.visual.pmml._40.diagram.part.PMMLDiagramEditorUtil
                          .getSaveOptions());
                }
              }
            } catch (IOException ex) {
              throw new InvocationTargetException(ex,
                  "Save operation failed");
            }
          }
        }.run(null);
      } catch (InvocationTargetException e) {
        throw new ExecutionException("Can't create diagram of '"
            + getDiagramKind() + "' kind", e);
      } catch (InterruptedException e) {
        throw new ExecutionException("Can't create diagram of '"
            + getDiagramKind() + "' kind", e);
      }
      return d;
    }
View Full Code Here

        IWorkbenchPage page = PlatformUI.getWorkbench()
            .getActiveWorkbenchWindow().getActivePage();
        page.openEditor(editorInput, getEditorID());
        return CommandResult.newOKCommandResult();
      } catch (Exception ex) {
        throw new ExecutionException("Can't open diagram", ex);
      }
    }
View Full Code Here

     */
    protected Diagram intializeNewDiagram() throws ExecutionException {
      Diagram d = ViewService.createDiagram(getDiagramDomainElement(),
          getDiagramKind(), getPreferencesHint());
      if (d == null) {
        throw new ExecutionException("Can't create diagram of '"
            + getDiagramKind() + "' kind");
      }
      diagramFacet.setDiagramLink(d);
      assert diagramFacet.eResource() != null;
      diagramFacet.eResource().getContents().add(d);
      EObject container = diagramFacet.eContainer();
      while (container instanceof View) {
        ((View) container).persist();
        container = container.eContainer();
      }
      try {
        new WorkspaceModifyOperation() {
          protected void execute(IProgressMonitor monitor)
              throws CoreException, InvocationTargetException,
              InterruptedException {
            try {
              for (Iterator it = diagramFacet.eResource()
                  .getResourceSet().getResources().iterator(); it
                  .hasNext();) {
                Resource nextResource = (Resource) it.next();
                if (nextResource.isLoaded()
                    && !getEditingDomain().isReadOnly(
                        nextResource)) {
                  nextResource
                      .save(eu.admire.visual.pmml._40.diagram.part.PMMLDiagramEditorUtil
                          .getSaveOptions());
                }
              }
            } catch (IOException ex) {
              throw new InvocationTargetException(ex,
                  "Save operation failed");
            }
          }
        }.run(null);
      } catch (InvocationTargetException e) {
        throw new ExecutionException("Can't create diagram of '"
            + getDiagramKind() + "' kind", e);
      } catch (InterruptedException e) {
        throw new ExecutionException("Can't create diagram of '"
            + getDiagramKind() + "' kind", e);
      }
      return d;
    }
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.