public class XtextWebDocumentAccess
extends java.lang.Object
readOnly(CancelableUnitOfWork) to
read the content and properties of the document, and
modify(CancelableUnitOfWork, CancelableUnitOfWork) to modify them.
If this accessor has been created with a required state identifier, it will
check the actual state identifier of the document before granting access, and
throw an exception if it does not match.| Modifier and Type | Class and Description |
|---|---|
static class |
XtextWebDocumentAccess.Factory |
protected static class |
XtextWebDocumentAccess.ReadAccess |
| Constructor and Description |
|---|
XtextWebDocumentAccess() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkStateId() |
protected IXtextWebDocument |
createReadAccess(XtextWebDocument document) |
protected <T> T |
doAccess(org.eclipse.xtext.util.concurrent.CancelableUnitOfWork<T,IXtextWebDocument> synchronousWork,
boolean priority,
boolean modify,
org.eclipse.xtext.util.concurrent.CancelableUnitOfWork<?,IXtextWebDocument> asynchronousWork) |
protected <T extends IServiceResult> |
getCachedServiceResult(AbstractCachedService<T> service,
boolean logCacheMiss) |
protected void |
init(XtextWebDocument document,
java.lang.String requiredStateId,
boolean skipAsyncWork) |
<T> T |
modify(org.eclipse.xtext.util.concurrent.CancelableUnitOfWork<T,IXtextWebDocument> work)
Execute the given work unit with read and write access and return its
result.
|
<T> T |
modify(org.eclipse.xtext.util.concurrent.CancelableUnitOfWork<T,IXtextWebDocument> work,
org.eclipse.xtext.util.concurrent.CancelableUnitOfWork<?,IXtextWebDocument> asynchronousWork)
Execute the given work unit with read and write access and return its
result.
|
protected void |
performPrecomputation(org.eclipse.xtext.util.CancelIndicator cancelIndicator) |
<T> T |
priorityReadOnly(org.eclipse.xtext.util.concurrent.CancelableUnitOfWork<T,IXtextWebDocument> work)
Execute the given work unit with read-only access and return its result.
|
<T> T |
readOnly(org.eclipse.xtext.util.concurrent.CancelableUnitOfWork<T,IXtextWebDocument> work)
Execute the given work unit with read-only access and return its result.
|
protected void |
setExecutorServiceProvider(org.eclipse.xtext.ide.ExecutorServiceProvider executorServiceProvider) |
@Inject protected void setExecutorServiceProvider(org.eclipse.xtext.ide.ExecutorServiceProvider executorServiceProvider)
protected void init(XtextWebDocument document, java.lang.String requiredStateId, boolean skipAsyncWork)
protected void checkStateId()
throws InvalidRequestException.InvalidDocumentStateException
public <T> T readOnly(org.eclipse.xtext.util.concurrent.CancelableUnitOfWork<T,IXtextWebDocument> work)
public <T> T priorityReadOnly(org.eclipse.xtext.util.concurrent.CancelableUnitOfWork<T,IXtextWebDocument> work)
public <T> T modify(org.eclipse.xtext.util.concurrent.CancelableUnitOfWork<T,IXtextWebDocument> work, org.eclipse.xtext.util.concurrent.CancelableUnitOfWork<?,IXtextWebDocument> asynchronousWork)
asynchronousWork is executed in a separate
thread after the first one has finished. It can be used for background
work that should be applied to the document, but is not relevant for the
current service request.public <T> T modify(org.eclipse.xtext.util.concurrent.CancelableUnitOfWork<T,IXtextWebDocument> work)
protected <T> T doAccess(org.eclipse.xtext.util.concurrent.CancelableUnitOfWork<T,IXtextWebDocument> synchronousWork, boolean priority, boolean modify, org.eclipse.xtext.util.concurrent.CancelableUnitOfWork<?,IXtextWebDocument> asynchronousWork)
protected void performPrecomputation(org.eclipse.xtext.util.CancelIndicator cancelIndicator)
protected <T extends IServiceResult> T getCachedServiceResult(AbstractCachedService<T> service, boolean logCacheMiss)
protected IXtextWebDocument createReadAccess(XtextWebDocument document)