Package org.eclipse.core.filebuffers

Examples of org.eclipse.core.filebuffers.IFileBufferManager


   * which has the given parent provider.
   *
   * @param parentProvider the parent document provider
   */
  public TextFileDocumentProvider(IDocumentProvider parentProvider) {
    IFileBufferManager manager= FileBuffers.getTextFileBufferManager();
    manager.setSynchronizationContext(new UISynchronizationContext());
    if (parentProvider != null)
      setParentDocumentProvider(parentProvider);

    fResourceRuleFactory= ResourcesPlugin.getWorkspace().getRuleFactory();
  }
View Full Code Here


   *
   * @param element the element
   * @param info the element's file info object
   */
  protected void disposeFileInfo(Object element, FileInfo info) {
    IFileBufferManager manager= FileBuffers.getTextFileBufferManager();
    try {
      info.fTextFileBuffer.releaseSynchronizationContext();
      if (info.fTextFileBufferLocationKind != null)
        manager.disconnect(info.fTextFileBuffer.getLocation(), info.fTextFileBufferLocationKind, getProgressMonitor());
      else
        manager.disconnectFileStore(info.fTextFileBuffer.getFileStore(), getProgressMonitor());
    } catch (CoreException x) {
      handleCoreException(x, "FileDocumentProvider.disposeElementInfo"); //$NON-NLS-1$
    }
  }
View Full Code Here

  public void addElementStateListener(IElementStateListener listener) {
    Assert.isNotNull(listener);
    if (!fElementStateListeners.contains(listener)) {
      fElementStateListeners.add(listener);
      if (fElementStateListeners.size() == 1) {
        IFileBufferManager manager= FileBuffers.getTextFileBufferManager();
        manager.addFileBufferListener(fFileBufferListener);
      }
    }
    getParentProvider().addElementStateListener(listener);
  }
View Full Code Here

   */
  public void removeElementStateListener(IElementStateListener listener) {
    Assert.isNotNull(listener);
    fElementStateListeners.remove(listener);
    if (fElementStateListeners.size() == 0) {
      IFileBufferManager manager= FileBuffers.getTextFileBufferManager();
      manager.removeFileBufferListener(fFileBufferListener);
    }
    getParentProvider().removeElementStateListener(listener);
  }
View Full Code Here

   *
   * @param element the element
   * @param info the element's file info object
   */
  protected void disposeFileInfo(Object element, FileInfo info) {
    IFileBufferManager manager= FileBuffers.getTextFileBufferManager();
    try {
      info.fTextFileBuffer.releaseSynchronizationContext();
      if (info.fTextFileBufferLocationKind != null)
        manager.disconnect(info.fTextFileBuffer.getLocation(), info.fTextFileBufferLocationKind, getProgressMonitor());
      else
        manager.disconnectFileStore(info.fTextFileBuffer.getFileStore(), getProgressMonitor());
    } catch (CoreException x) {
      handleCoreException(x, "FileDocumentProvider.disposeElementInfo"); //$NON-NLS-1$
    }
  }
View Full Code Here

  public void addElementStateListener(IElementStateListener listener) {
    Assert.isNotNull(listener);
    if (!fElementStateListeners.contains(listener)) {
      fElementStateListeners.add(listener);
      if (fElementStateListeners.size() == 1) {
        IFileBufferManager manager= FileBuffers.getTextFileBufferManager();
        manager.addFileBufferListener(fFileBufferListener);
      }
    }
    getParentProvider().addElementStateListener(listener);
  }
View Full Code Here

   */
  public void removeElementStateListener(IElementStateListener listener) {
    Assert.isNotNull(listener);
    fElementStateListeners.remove(listener);
    if (fElementStateListeners.size() == 0) {
      IFileBufferManager manager= FileBuffers.getTextFileBufferManager();
      manager.removeFileBufferListener(fFileBufferListener);
    }
    getParentProvider().removeElementStateListener(listener);
  }
View Full Code Here

   * which has the given parent provider.
   *
   * @param parentProvider the parent document provider
   */
  public TextFileDocumentProvider(IDocumentProvider parentProvider) {
    IFileBufferManager manager= FileBuffers.getTextFileBufferManager();
    manager.setSynchronizationContext(new UISynchronizationContext());
    if (parentProvider != null)
      setParentDocumentProvider(parentProvider);

    fResourceRuleFactory= ResourcesPlugin.getWorkspace().getRuleFactory();
  }
View Full Code Here

TOP

Related Classes of org.eclipse.core.filebuffers.IFileBufferManager

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.