public class DeferredDocumentProvider
extends org.eclipse.xtext.ui.editor.model.XtextDocumentProvider
setDocumentContent is intercepted and the sourceText is queued for assignment by a DeferredSetTextJob
a waiting message is displayed instead.
once Editor.createPartControl() is complete the BaseEditor should invoke scheduleDeferredSetTextJob
to assign the true sourceText triggering what appears to be an edit with reconciliations, validations
and updates.
Modifier and Type | Class and Description |
---|---|
protected class |
DeferredDocumentProvider.DeferredSetTextJob
Job scheduled on a worker thread to compute the editor text.
|
protected class |
DeferredDocumentProvider.DeferredSetTextRunnable
Runnable for execution on the main UI thread to actually assign the text.
|
class |
DeferredDocumentProvider.DeferredSetTextUnitOfWork
IUnitOfWork for execution on the worker thread with exclusive modify access to compute the
editor text.
|
org.eclipse.xtext.ui.editor.model.XtextDocumentProvider.UnchangedElementListener, org.eclipse.xtext.ui.editor.model.XtextDocumentProvider.URIInfo
org.eclipse.ui.editors.text.FileDocumentProvider.FileInfo, org.eclipse.ui.editors.text.FileDocumentProvider.FileSynchronizer, org.eclipse.ui.editors.text.FileDocumentProvider.SafeChange
Constructor and Description |
---|
DeferredDocumentProvider() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getPleaseWaitText() |
void |
scheduleDeferredSetTextJob(BaseEditor baseEditor) |
void |
scheduleDeferredSetTextJob(org.eclipse.ui.IEditorInput input)
Deprecated.
|
protected boolean |
setDocumentContent(org.eclipse.jface.text.IDocument document,
org.eclipse.ui.IEditorInput editorInput,
java.lang.String encoding) |
protected void |
setDocumentContent(org.eclipse.jface.text.IDocument document,
java.io.InputStream contentStream,
java.lang.String encoding) |
protected void |
setDocumentText(org.eclipse.xtext.ui.editor.model.XtextDocument document,
java.lang.String text)
Define the content of document as text.
|
addUnchangedElementListeners, createAnnotationModel, createDocument, createElementInfo, createEmptyDocument, disposeElementInfo, doSaveDocument, doUpdateStateCache, getEncoding, getResourceForEditorInputFactory, getStorage2UriMapper, getWorkspaceExternalEncoding, getWorkspaceOrDefaultEncoding, handleCoreException, isDeleted, isModifiable, isReadOnly, isSynchronized, isWorkspaceExternalEditorInput, loadResource, registerAnnotationInfoProcessor, removeUnchangedElementListeners, setDocumentResource, setResourceForEditorInputFactory, updateCache
cacheEncodingState, checkSynchronizationState, computeModificationStamp, doResetDocument, doSynchronize, doValidateState, getContentType, getElementInfo, getModificationStamp, getOperationRunner, getPersistedEncoding, getResetRule, getSaveRule, getSynchronizationStamp, getSynchronizeRule, getValidateStateRule, handleElementContentChanged, handleElementDeleted, handleElementMoved, persistEncoding, readUTF8BOM, refreshFile, refreshFile, setDocumentContent
getDefaultEncoding, isNotSynchronizedException, setDocumentContent, setEncoding, setupDocument, updateCache
aboutToChange, addElementStateListener, canSaveDocument, changed, connect, connected, disconnect, disconnected, executeOperation, fireElementContentAboutToBeReplaced, fireElementContentReplaced, fireElementDeleted, fireElementDirtyStateChanged, fireElementMoved, fireElementStateChangeFailed, fireElementStateChanging, fireElementStateValidationChanged, getAnnotationModel, getConnectedElements, getDocument, getProgressMonitor, getStatus, invalidatesState, isStateValidated, mustSaveDocument, removeElementStateListener, resetDocument, saveDocument, setCanSaveDocument, setProgressMonitor, synchronize, updateStateCache, validateState
@NonNull protected java.lang.String getPleaseWaitText()
public void scheduleDeferredSetTextJob(@NonNull BaseEditor baseEditor)
@Deprecated public void scheduleDeferredSetTextJob(org.eclipse.ui.IEditorInput input)
protected boolean setDocumentContent(org.eclipse.jface.text.IDocument document, org.eclipse.ui.IEditorInput editorInput, java.lang.String encoding) throws org.eclipse.core.runtime.CoreException
setDocumentContent
in class org.eclipse.xtext.ui.editor.model.XtextDocumentProvider
org.eclipse.core.runtime.CoreException
protected void setDocumentContent(org.eclipse.jface.text.IDocument document, java.io.InputStream contentStream, java.lang.String encoding) throws org.eclipse.core.runtime.CoreException
setDocumentContent
in class org.eclipse.ui.editors.text.StorageDocumentProvider
org.eclipse.core.runtime.CoreException
protected void setDocumentText(@NonNull org.eclipse.xtext.ui.editor.model.XtextDocument document, @NonNull java.lang.String text) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException