Examples of WorkspaceModifyOperation


Examples of org.eclipse.ui.actions.WorkspaceModifyOperation

      }
      diagramFacet.setDiagramLink(d);
      assert diagramFacet.eResource() != null;
      diagramFacet.eResource().getContents().add(d);
      try {
        new WorkspaceModifyOperation() {

          protected void execute(IProgressMonitor monitor)
          throws CoreException, InvocationTargetException,
          InterruptedException {
            try {
View Full Code Here

Examples of org.eclipse.ui.actions.WorkspaceModifyOperation

    /**
     * The worker method, generates the code itself.
     */
    private void doFinishWSDL2Java() {
        WorkspaceModifyOperation op = new WorkspaceModifyOperation()
        {
           protected void execute(IProgressMonitor monitor)
           throws CoreException, InvocationTargetException, InterruptedException{
              if (monitor == null)
                 monitor = new NullProgressMonitor();
View Full Code Here

Examples of org.eclipse.ui.actions.WorkspaceModifyOperation

    }

    private void doFinishJava2WSDL() throws Exception {

        WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
            protected void execute(IProgressMonitor monitor) {
                if (monitor == null)
                    monitor = new NullProgressMonitor();

                /*
 
View Full Code Here

Examples of org.eclipse.ui.actions.WorkspaceModifyOperation

        refreshAction = new RefreshAction(sp) {
            @Override
            public void run() {
                final IStatus[] errorStatus = new IStatus[1];
                errorStatus[0] = Status.OK_STATUS;
                final WorkspaceModifyOperation op = (WorkspaceModifyOperation) createOperation(errorStatus);
                WorkspaceJob job = new WorkspaceJob("refresh") { //$NON-NLS-1$

                    @SuppressWarnings("synthetic-access")
                    @Override
                    public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
                        try {
                            op.run(monitor);
                            if (shell != null && !shell.isDisposed()) {
                                shell.getDisplay().asyncExec(new Runnable() {
                                    @Override
                                    public void run() {
                                        StructuredViewer viewer = getActionSite().getStructuredViewer();
                                        if (viewer != null && viewer.getControl() != null && !viewer.getControl().isDisposed()) {
                                            viewer.refresh();
                                        }
                                    }
                                });
                            }
                        } catch (InvocationTargetException e) {
                            String msg = NLS.bind(Messages.ToolRefreshActionProvider_invocationTargetExceptionMessage, getClass().getName(), e.getTargetException());
                            throw new CoreException(new Status(IStatus.ERROR, ToolPlugin.PLUGIN_ID, IStatus.ERROR, msg, e
                                    .getTargetException()));
                        } catch (InterruptedException e) {
                            return Status.CANCEL_STATUS;
                        }
                        return errorStatus[0];
                    }

                };
                ISchedulingRule rule = op.getRule();
                if (rule != null) {
                    job.setRule(rule);
                }
                job.setUser(true);
                job.schedule();
View Full Code Here

Examples of org.eclipse.ui.actions.WorkspaceModifyOperation

      //
      final IFile modelFile = getModelFile();

      // Do the work within an operation.
      //
      WorkspaceModifyOperation operation =
        new WorkspaceModifyOperation() {
          @Override
          protected void execute(IProgressMonitor progressMonitor) {
            try {
              // Create a resource set
              //
View Full Code Here

Examples of org.eclipse.ui.actions.WorkspaceModifyOperation

    final Map<Object, Object> saveOptions = new HashMap<Object, Object>();
    saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);

    // Do the work within an operation because this is a long running activity that modifies the workbench.
    //
    WorkspaceModifyOperation operation =
      new WorkspaceModifyOperation() {
        // This is the method that gets invoked when the operation runs.
        //
        @Override
        public void execute(IProgressMonitor monitor) {
          // Save the resources to the file system.
View Full Code Here

Examples of org.eclipse.ui.actions.WorkspaceModifyOperation

      final boolean isScenic3Project = cbIsScenic3.getSelection();
      final boolean isAutoGen = cbIsAutoGen.getSelection();
     
     
    try {
      WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
        @Override
        protected void execute(IProgressMonitor monitor)
            throws CoreException, InvocationTargetException,
            InterruptedException {
          if(! isGwtProject) {
View Full Code Here

Examples of org.eclipse.ui.actions.WorkspaceModifyOperation

    }
  }

  public boolean createModule() {
    try {
      WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
        @Override
        protected void execute(IProgressMonitor monitor)
            throws CoreException, InvocationTargetException,
            InterruptedException {
          createModule(monitor);
View Full Code Here

Examples of org.eclipse.ui.actions.WorkspaceModifyOperation

    /**
     * The worker method, generates the code itself.
     */
    private void doFinishWSDL2Java() {
        WorkspaceModifyOperation op = new WorkspaceModifyOperation()
        {
           protected void execute(IProgressMonitor monitor)
           throws CoreException, InvocationTargetException, InterruptedException{
              if (monitor == null)
                 monitor = new NullProgressMonitor();
View Full Code Here

Examples of org.eclipse.ui.actions.WorkspaceModifyOperation

    }

    private void doFinishJava2WSDL() throws Exception {

        WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
            protected void execute(IProgressMonitor monitor) {
                if (monitor == null)
                    monitor = new NullProgressMonitor();

                /*
 
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.