Example usage for org.eclipse.jdt.core BufferChangedEvent getBuffer

List of usage examples for org.eclipse.jdt.core BufferChangedEvent getBuffer

Introduction

In this page you can find the example usage for org.eclipse.jdt.core BufferChangedEvent getBuffer.

Prototype

public IBuffer getBuffer() 

Source Link

Document

Returns the buffer which has changed.

Usage

From source file:org.eclipse.che.jdt.internal.core.Openable.java

License:Open Source License

/**
 * The buffer associated with this element has changed. Registers
 * this element as being out of synch with its buffer's contents.
 * If the buffer has been closed, this element is set as NOT out of
 * synch with the contents./*from w  ww. j av a 2  s.c om*/
 *
 * @see IBufferChangedListener
 */
public void bufferChanged(BufferChangedEvent event) {
    if (event.getBuffer().isClosed()) {
        manager.getElementsOutOfSynchWithBuffers().remove(this);
        getBufferManager().removeBuffer(event.getBuffer());
    } else {
        manager.getElementsOutOfSynchWithBuffers().add(this);
    }
}