public class BatchLinkableResource extends org.eclipse.xtext.resource.DerivedStateAwareResource implements org.eclipse.xtext.resource.ISynchronizable<BatchLinkableResource>, org.eclipse.xtext.resource.IBatchLinkableResource, org.eclipse.xtext.common.types.xtext.JvmMemberInitializableResource
getEObject(String), the BatchLinkingService is used
to resolve a chunk of proxies.org.eclipse.xtext.linking.lazy.LazyLinkingResource.CyclicLinkingException, org.eclipse.xtext.linking.lazy.LazyLinkingResource.DiagnosticMessageContextorg.eclipse.emf.ecore.resource.impl.ResourceImpl.ContentsEList<E extends java.lang.Object & org.eclipse.emf.ecore.EObject>, org.eclipse.emf.ecore.resource.impl.ResourceImpl.ModificationTrackingAdapterorg.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList<E extends java.lang.Object & org.eclipse.emf.common.notify.Adapter>, org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EObservableAdapterList, org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EScannableAdapterListorg.eclipse.emf.ecore.resource.Resource.Diagnostic, org.eclipse.emf.ecore.resource.Resource.Factory, org.eclipse.emf.ecore.resource.Resource.Internal, org.eclipse.emf.ecore.resource.Resource.IOWrappedExceptionfullyInitialized, isInitializingUNRESOLVABLE_FRAGMENTCYCLIC_LINKING_DECTECTION_COUNTER_LIMIT, cyclicLinkingDectectionCounterLimit, resolving, UNRESOLVEABLE_PROXIES_KEYisUpdating, operationCanceledManager, OPTION_ENCODING, OPTION_FORMAT, OPTION_RESOLVE_ALL, OPTION_SERIALIZATION_OPTIONScontents, defaultDeleteOptions, defaultLoadOptions, defaultSaveOptions, errors, intrinsicIDToEObjectMap, isLoaded, isLoading, isModified, modificationTrackingAdapter, resourceSet, timeStamp, unloadingContents, uri, warningseAdapters, EDELIVER, eFlags, ELAST_NOTIFIER_FLAGOPTION_CIPHER, OPTION_LINE_DELIMITER, OPTION_LINE_DELIMITER_UNSPECIFIED, OPTION_SAVE_ONLY_IF_CHANGED, OPTION_SAVE_ONLY_IF_CHANGED_FILE_BUFFER, OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER, OPTION_ZIP, RESOURCE__CONTENTS, RESOURCE__ERRORS, RESOURCE__IS_LOADED, RESOURCE__IS_MODIFIED, RESOURCE__IS_TRACKING_MODIFICATION, RESOURCE__RESOURCE_SET, RESOURCE__TIME_STAMP, RESOURCE__URI, RESOURCE__WARNINGS| Constructor and Description |
|---|
BatchLinkableResource() |
| Modifier and Type | Method and Description |
|---|---|
void |
addJvmMemberInitializer(java.lang.Runnable runnable)
Register runnables to be executed when the
members of types
in this resource are initialized. |
protected void |
doDiscardDerivedState() |
void |
ensureJvmMembersInitialized()
Executes any
Runnables added through addJvmMemberInitializer(Runnable) |
<Result> Result |
execute(org.eclipse.xtext.util.concurrent.IUnitOfWork<Result,? super BatchLinkableResource> unit) |
org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EObject> |
getContents() |
org.eclipse.emf.ecore.EObject |
getEObject(java.lang.String uriFragment)
Delegates to the
BatchLinkingService if the requested reference is
linkeable in batch mode. |
java.lang.Object |
getLock()
Returns the lock of the owning
ResourceSet, if it exposes such a lock. |
protected org.eclipse.emf.ecore.EObject |
handleCyclicResolution(org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,org.eclipse.xtext.nodemodel.INode> triple) |
boolean |
hasJvmMemberInitializers() |
boolean |
isInitializingJvmMembers() |
void |
linkBatched(org.eclipse.xtext.util.CancelIndicator monitor) |
void |
resolveLazyCrossReferences(org.eclipse.xtext.util.CancelIndicator monitor)
Delegates to the BatchLinkingService to resolve all references.
|
clearInternalState, discardDerivedState, doGetContents, doUnload, getEObjectForURIFragmentRootSegment, getUnloadingContents, getURIFragmentRootSegment, installDerivedState, isFullyInitialized, isInitializing, setDerivedStateComputer, setFullyInitialized, updateInternalState, updateInternalStategetPortableURIs, getResourceDescription, getResourceStorageFacade, getUnresolvableURIFragments, isLoadedFromStorage, load, loadFromStorage, setIsLoadedFromStorage, setResourceDescriptionaddLazyProxyInformation, clearLazyProxyInformation, createAndAddDiagnostic, createAndAddDiagnostic, createDiagnostic, createDiagnosticMessage, createDiagnosticMessageContext, doLinking, doLoad, doResolveLazyCrossReference, getDiagnosticList, getDiagnosticMessageProvider, getEncoder, getEObject, getLazyProxyInformation, getLazyProxyInformation, getLinkingHelper, getLinkingService, getReferences, hasLazyProxyInformation, isEagerLinking, isPotentialLazyCrossReference, isUnresolveableProxyCacheable, markUnresolvable, removeDiagnostic, removeLazyProxyInformation, resolveLazyCrossReference, setDiagnosticMessageProvider, setEagerLinking, setEncoder, setLinkingHelper, setLinkingServiceaddSyntaxDiagnostic, addSyntaxErrors, basicGetEObject, clearErrorsAndWarnings, createReader, doSave, getCache, getConcreteSyntaxValidator, getEncoding, getEntryPoint, getFragmentProvider, getLanguageName, getLinker, getModificationStamp, getParser, getParseResult, getResourceServiceProvider, getSerializer, getUnloader, getURIFragment, isValidationDisabled, reattachModificationTracker, relink, reparse, setCache, setEncodingFromOptions, setEntryPoint, setFragmentProvider, setInjectedParser, setLanguageName, setLinker, setModificationStamp, setParser, setParseResult, setResourceServiceProvider, setSerializer, setUnloader, setValidationDisabled, unload, update, validateConcreteSyntaxaddModificationTrackingAdapters, attached, attachedHelper, basicSetResourceSet, createModificationTrackingAdapter, delete, detached, detachedHelper, getAllContents, getAllProperContents, getAllProperContents, getDefaultURIConverter, getEObject, getEObjectByID, getErrors, getIDForEObject, getIntrinsicIDToEObjectMap, getResourceSet, getTimeStamp, getURI, getURIConverter, getWarnings, handleLoadResponse, handleSaveResponse, isAttachedDetachedHelperRequired, isContentZipEntry, isLoaded, isLoading, isModified, isTrackingModification, load, mergeMaps, newContentZipEntry, removeModificationTrackingAdapters, save, save, saveOnlyIfChangedWithFileBuffer, saveOnlyIfChangedWithMemoryBuffer, setIntrinsicIDToEObjectMap, setLoaded, setModified, setTimeStamp, setTrackingModification, setURI, supportIDRelativeURIFragmentPaths, toKeyString, toString, unload, unloaded, useZipeAdapters, eBasicAdapters, eDeliver, eSetDelivereBasicAdapterArray, eBasicHasAdapters, eNotificationRequired, eNotifypublic java.lang.Object getLock()
ResourceSet, if it exposes such a lock.
Otherwise this resource itself is used as the lock context.getLock in interface org.eclipse.xtext.resource.ISynchronizable<BatchLinkableResource>public <Result> Result execute(org.eclipse.xtext.util.concurrent.IUnitOfWork<Result,? super BatchLinkableResource> unit) throws java.lang.Exception
execute in interface org.eclipse.xtext.resource.ISynchronizable<BatchLinkableResource>java.lang.Exceptionpublic org.eclipse.emf.ecore.EObject getEObject(java.lang.String uriFragment)
BatchLinkingService if the requested reference is
linkeable in batch mode.
Implementation detail: This specialization of getEObject
synchronizes on the lock which is exposed by the synchronizable
resource rather than on the resource directly. This guards against reentrant resolution
from different threads that could block each other.
Usually one would want to lock only in the BatchLinkingService but we could
have intermixed lazy cross reference and vanilla EMF cross references which again could lead to a
dead lock.getEObject in interface org.eclipse.emf.ecore.resource.ResourcegetEObject in class org.eclipse.xtext.resource.persistence.StorageAwareResourcepublic org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EObject> getContents()
Implementation detail: Overridden to use the shared lock.
getContents in interface org.eclipse.emf.ecore.resource.ResourcegetContents in class org.eclipse.xtext.resource.DerivedStateAwareResourcepublic void resolveLazyCrossReferences(org.eclipse.xtext.util.CancelIndicator monitor)
resolveLazyCrossReferences in class org.eclipse.xtext.linking.lazy.LazyLinkingResourceprotected org.eclipse.emf.ecore.EObject handleCyclicResolution(org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,org.eclipse.xtext.nodemodel.INode> triple)
throws java.lang.AssertionError
handleCyclicResolution in class org.eclipse.xtext.linking.lazy.LazyLinkingResourcejava.lang.AssertionErrorpublic void linkBatched(org.eclipse.xtext.util.CancelIndicator monitor)
linkBatched in interface org.eclipse.xtext.resource.IBatchLinkableResourcepublic void ensureJvmMembersInitialized()
Runnables added through addJvmMemberInitializer(Runnable)ensureJvmMembersInitialized in interface org.eclipse.xtext.common.types.xtext.JvmMemberInitializableResourcepublic boolean isInitializingJvmMembers()
isInitializingJvmMembers in interface org.eclipse.xtext.common.types.xtext.JvmMemberInitializableResourceprotected void doDiscardDerivedState()
doDiscardDerivedState in class org.eclipse.xtext.resource.DerivedStateAwareResourcepublic void addJvmMemberInitializer(java.lang.Runnable runnable)
members of types
in this resource are initialized.addJvmMemberInitializer in interface org.eclipse.xtext.common.types.xtext.JvmMemberInitializableResourcepublic boolean hasJvmMemberInitializers()
hasJvmMemberInitializers in interface org.eclipse.xtext.common.types.xtext.JvmMemberInitializableResource