Package org.eclipse.ui.texteditor

Examples of org.eclipse.ui.texteditor.IDocumentProvider.saveDocument()


      try {
        runnable.run(progressMonitor);
      }
      finally {
        if (wodProvider != null) {
          wodProvider.saveDocument(progressMonitor, wodInput, wodDocument, true);
          wodProvider.disconnect(wodInput);
          cache.getWodEntry().setDocument(null);
        }
      }
    }
View Full Code Here


            boolean success = false;
            try
            {
                provider.aboutToChange( newInput );
                provider.saveDocument( progressMonitor, newInput, provider.getDocument( input ), true );
                success = true;
            }
            catch ( CoreException x )
            {
                final IStatus status = x.getStatus();
View Full Code Here

    }

    boolean success = false;
    try {
      provider.aboutToChange(newInput);
      provider.saveDocument(progressMonitor, newInput, provider
          .getDocument(input), true);
      success = true;

    } catch (CoreException x) {
      Logger.logException(x);
View Full Code Here

      IDocumentProvider documentProvider = textEditor
          .getDocumentProvider();
      IDocument document = textEditor.getDocumentProvider().getDocument(
          textEditor.getEditorInput());
      document.set(compiledTemplate.string);
      documentProvider.saveDocument(null, textEditor.getEditorInput(),
          document, true);
      textEditor.selectAndReveal(compiledTemplate.offset, 0);

      // set document dirty
      document.replace(0, 0, ""); //$NON-NLS-1$
View Full Code Here

      provider = DocumentProviderRegistry.getDefault()
          .getDocumentProvider((IEditorInput) element);
    }
    if (provider == null)
      provider = new FileDocumentProvider();
    provider.saveDocument(monitor, element, document, overwrite);
  }

  public IStructuredModel getModel(IEditorInput element) {
    IStructuredModel result = null;
    ModelInfo info = getModelInfoFor(element);
View Full Code Here

    // fix for RSE linked files
    if (provider.isDeleted(input) && original != null && original.exists()) {
      provider.aboutToChange(input);
      try {
        provider.saveDocument(progressMonitor, input, provider.getDocument(input), true);
      } catch (CoreException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }     
      return;
View Full Code Here

       
    boolean success= false;
    try {
     
      provider.aboutToChange(newInput);
      provider.saveDocument(progressMonitor, newInput, provider.getDocument(input), true);     
      success= true;
     
    } catch (CoreException x) {
      IStatus status= x.getStatus();
      if (status == null || status.getSeverity() != IStatus.CANCEL) {
View Full Code Here

      boolean success = false;
      try {

        provider.aboutToChange(newInput);
        provider.saveDocument(progressMonitor, newInput, provider.getDocument(input), true);
        success = true;

      }
      catch(CoreException x) {
        final IStatus status = x.getStatus();
View Full Code Here

            boolean success = false;
            try
            {
                provider.aboutToChange( newInput );
                provider.saveDocument( progressMonitor, newInput, provider.getDocument( input ), true );
                success = true;
            }
            catch ( CoreException x )
            {
                final IStatus status = x.getStatus();
View Full Code Here

      boolean success = false;
      try {

        provider.aboutToChange(newInput);
        provider.saveDocument(progressMonitor, newInput, provider.getDocument(input), true);
        success = true;

      }
      catch(CoreException x) {
        final IStatus status = x.getStatus();
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.