Package org.eclipse.ui

Examples of org.eclipse.ui.IEditorPart.doSave()


                            getWorkbenchWindow().run(false, false,
                                    new IRunnableWithProgress() {
                                        public void run(IProgressMonitor monitor)
                                                throws InvocationTargetException,
                                                InterruptedException {
                                            editorToSave.doSave(monitor);
                                        }
                                    });
                        } catch (InvocationTargetException e) {
                            throw (RuntimeException) e.getTargetException();
                        } catch (InterruptedException e) {
View Full Code Here


      for (int i = 0; i < editors.length; i++) {
        final IProgressMonitor subMonitor = Policy.subMonitorFor(monitor, 1);
        final IEditorPart editor = editors[i];
        ISafeRunnable runnable = new ISafeRunnable() {
          public void run() throws Exception {
            editor.doSave(subMonitor);
          }
          public void handleException(Throwable exception) {
          }
        };
        SafeRunnable.run(runnable);       
View Full Code Here

                    final FormatAllAction formatAllAction = new FormatAllAction( site );
                    formatAllAction.runOnMultiple( new ICompilationUnit[] { cu } );
                   
                    monitor.worked( 1 );
                   
                    editor.doSave( null );
                   
                    monitor.worked( 1 );                   
                }
                catch( CoreException e )
                {
View Full Code Here

                throws InterruptedException {
              int count = dirtyEditors.length;
              pm.beginTask("", count); //$NON-NLS-1$
              for (int i = 0; i < count; i++) {
                IEditorPart editor = dirtyEditors[i];
                editor.doSave(new SubProgressMonitor(pm, 1));
                if (pm.isCanceled()) {
                  throw new InterruptedException();
                }
              }
              pm.done();
View Full Code Here

  }

  public static void saveMarkedFile(IMarker marker) {
    IEditorPart editor = getMarkedEditor(marker);
    if (editor != null) {
      editor.doSave(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.