Package org.eclipse.core.filebuffers

Examples of org.eclipse.core.filebuffers.ITextFileBufferManager.disconnect()


    if (fTextFileBuffer != null) {
      ITextFileBufferManager manager = FileBuffers
          .getTextFileBufferManager();
      try {
        manager.disconnect(fTextFileBuffer.getLocation(),
            LocationKind.NORMALIZE, new NullProgressMonitor());
      } catch (CoreException x) {
        // ignore
      }
      fTextFileBuffer = null;
View Full Code Here


      }
      return buffer.getDocument();
    } finally {
      if (connected) {
        try {
          manager.disconnect(
              location, LocationKind.LOCATION, new NullProgressMonitor());
        }catch(Exception e){
        }
      }
    }
View Full Code Here

                        SearchMessages.ReplaceRefactoring_group_label_match_replace, replaceEdit));
                change.addTextEditChangeGroup(textEditChangeGroup);
                matchGroups.add(new MatchGroup(textEditChangeGroup, match));
            }
        } finally {
            manager.disconnect(file.getFullPath(), LocationKind.IFILE, null);
        }
        return change;
    }

    private static String getOriginalText(IDocument doc, int offset, int length) {
View Full Code Here

      ITextFileBufferManager manager= FileBuffers.getTextFileBufferManager();
      manager.connect(file.getFullPath(), LocationKind.IFILE, monitor);
      ITextFileBuffer buffer= ITextFileBufferManager.DEFAULT.getTextFileBuffer(file.getFullPath(), LocationKind.IFILE);
      buffer.getDocument().set(document.get());
      buffer.commit(monitor, true);
      manager.disconnect(file.getFullPath(), LocationKind.IFILE, monitor);
    } finally {
      monitor.done();
    }
  }
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.