public final class IdeDocumentListener extends IdeListener implements EditorListener, FileBufferListener, ResourceListener, SelectionListener
IdeDocumentEventRequest
and passes them to the
IdeUacaProxy
to be transferred into the User Activity Central
Application for further processing.
Document operation types that this listener is interested in are
determined by the IdeDocumentEventType
enumeration:
Data available in an IdeDocumentEventRequest
:
document
- see IdeDocumentDto
below.
IdeListener
for documentation of inherited data.
Data available in an IdeDocumentDto
:
branch
- current Git branch name for the document.
changesetIdInRcs
- most recent Git commit
identifier for the document (40 hexadecimal characters),
for example "984dd5f359532d7d806a92b47ef5bfc39d772d64"
.
localPath
- path to the document relative to the workspace root,
for example "com.gratex.perconik.activity/src/com/gratex/perconik/activity/ide/listeners/IdeCommitListener.java"
.
rcsServer
- see documentation of RcsServerDto
in IdeCommitListener
for more details.
serverPath
- always the same as localPath
.
Note that in case of not editable source code, such as classes from JRE
system library, fields branchName
, changesetIdInRcs
,
and rcsServer
are unused and set to null
.
Constructor and Description |
---|
IdeDocumentListener() |
Modifier and Type | Method and Description |
---|---|
void |
bufferContentAboutToBeReplaced(org.eclipse.core.filebuffers.IFileBuffer buffer) |
void |
bufferContentReplaced(org.eclipse.core.filebuffers.IFileBuffer buffer) |
void |
bufferCreated(org.eclipse.core.filebuffers.IFileBuffer buffer) |
void |
bufferDisposed(org.eclipse.core.filebuffers.IFileBuffer buffer) |
void |
dirtyStateChanged(org.eclipse.core.filebuffers.IFileBuffer buffer,
boolean dirty) |
void |
editorActivated(org.eclipse.ui.IEditorReference reference) |
void |
editorBroughtToTop(org.eclipse.ui.IEditorReference reference) |
void |
editorClosed(org.eclipse.ui.IEditorReference reference) |
void |
editorDeactivated(org.eclipse.ui.IEditorReference reference) |
void |
editorHidden(org.eclipse.ui.IEditorReference reference) |
void |
editorInputChanged(org.eclipse.ui.IEditorReference reference) |
void |
editorOpened(org.eclipse.ui.IEditorReference reference) |
void |
editorVisible(org.eclipse.ui.IEditorReference reference) |
java.util.Set<ResourceEventType> |
getEventTypes()
Gets accepted event types.
|
void |
postRegister()
Post-register block.
|
void |
resourceChanged(org.eclipse.core.resources.IResourceChangeEvent event) |
void |
selectionChanged(org.eclipse.ui.IWorkbenchPart part,
org.eclipse.jface.viewers.ISelection selection) |
void |
stateChangeFailed(org.eclipse.core.filebuffers.IFileBuffer buffer) |
void |
stateChanging(org.eclipse.core.filebuffers.IFileBuffer buffer) |
void |
stateValidationChanged(org.eclipse.core.filebuffers.IFileBuffer buffer,
boolean stateValidated) |
void |
underlyingFileDeleted(org.eclipse.core.filebuffers.IFileBuffer buffer) |
void |
underlyingFileMoved(org.eclipse.core.filebuffers.IFileBuffer buffer,
org.eclipse.core.runtime.IPath path) |
postUnregister, preRegister
preUnregister
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
postUnregister, preRegister, preUnregister
public void postRegister()
Registrable
postRegister
in interface Registrable
postRegister
in class AbstractRegistrable
public void resourceChanged(org.eclipse.core.resources.IResourceChangeEvent event)
resourceChanged
in interface org.eclipse.core.resources.IResourceChangeListener
public void selectionChanged(org.eclipse.ui.IWorkbenchPart part, org.eclipse.jface.viewers.ISelection selection)
selectionChanged
in interface org.eclipse.ui.ISelectionListener
public void editorOpened(org.eclipse.ui.IEditorReference reference)
editorOpened
in interface EditorListener
public void editorClosed(org.eclipse.ui.IEditorReference reference)
editorClosed
in interface EditorListener
public void editorActivated(org.eclipse.ui.IEditorReference reference)
editorActivated
in interface EditorListener
public void editorDeactivated(org.eclipse.ui.IEditorReference reference)
editorDeactivated
in interface EditorListener
public void editorVisible(org.eclipse.ui.IEditorReference reference)
editorVisible
in interface EditorListener
public void editorHidden(org.eclipse.ui.IEditorReference reference)
editorHidden
in interface EditorListener
public void editorBroughtToTop(org.eclipse.ui.IEditorReference reference)
editorBroughtToTop
in interface EditorListener
public void editorInputChanged(org.eclipse.ui.IEditorReference reference)
editorInputChanged
in interface EditorListener
public void bufferCreated(org.eclipse.core.filebuffers.IFileBuffer buffer)
bufferCreated
in interface org.eclipse.core.filebuffers.IFileBufferListener
public void bufferDisposed(org.eclipse.core.filebuffers.IFileBuffer buffer)
bufferDisposed
in interface org.eclipse.core.filebuffers.IFileBufferListener
public void bufferContentAboutToBeReplaced(org.eclipse.core.filebuffers.IFileBuffer buffer)
bufferContentAboutToBeReplaced
in interface org.eclipse.core.filebuffers.IFileBufferListener
public void bufferContentReplaced(org.eclipse.core.filebuffers.IFileBuffer buffer)
bufferContentReplaced
in interface org.eclipse.core.filebuffers.IFileBufferListener
public void stateChanging(org.eclipse.core.filebuffers.IFileBuffer buffer)
stateChanging
in interface org.eclipse.core.filebuffers.IFileBufferListener
public void stateChangeFailed(org.eclipse.core.filebuffers.IFileBuffer buffer)
stateChangeFailed
in interface org.eclipse.core.filebuffers.IFileBufferListener
public void stateValidationChanged(org.eclipse.core.filebuffers.IFileBuffer buffer, boolean stateValidated)
stateValidationChanged
in interface org.eclipse.core.filebuffers.IFileBufferListener
public void dirtyStateChanged(org.eclipse.core.filebuffers.IFileBuffer buffer, boolean dirty)
dirtyStateChanged
in interface org.eclipse.core.filebuffers.IFileBufferListener
public void underlyingFileMoved(org.eclipse.core.filebuffers.IFileBuffer buffer, org.eclipse.core.runtime.IPath path)
underlyingFileMoved
in interface org.eclipse.core.filebuffers.IFileBufferListener
public void underlyingFileDeleted(org.eclipse.core.filebuffers.IFileBuffer buffer)
underlyingFileDeleted
in interface org.eclipse.core.filebuffers.IFileBufferListener
public java.util.Set<ResourceEventType> getEventTypes()
FilteringListener
getEventTypes
in interface FilteringListener<ResourceEventType>