public class DerivedStateAwareResource extends StorageAwareResource
LazyLinkingResource.CyclicLinkingException, LazyLinkingResource.DiagnosticMessageContext
org.eclipse.emf.ecore.resource.impl.ResourceImpl.ContentsEList<E extends java.lang.Object & org.eclipse.emf.ecore.EObject>, org.eclipse.emf.ecore.resource.impl.ResourceImpl.ModificationTrackingAdapter
org.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.ecore.resource.Resource.Diagnostic, org.eclipse.emf.ecore.resource.Resource.Factory, org.eclipse.emf.ecore.resource.Resource.Internal, org.eclipse.emf.ecore.resource.Resource.IOWrappedException
Modifier and Type | Field and Description |
---|---|
protected boolean |
fullyInitialized |
protected boolean |
isInitializing |
UNRESOLVABLE_FRAGMENT
resolving, UNRESOLVEABLE_PROXIES_KEY
isUpdating, operationCanceledManager, OPTION_ENCODING, OPTION_FORMAT, OPTION_RESOLVE_ALL, OPTION_SERIALIZATION_OPTIONS
contents, defaultDeleteOptions, defaultLoadOptions, defaultSaveOptions, errors, intrinsicIDToEObjectMap, isLoaded, isLoading, isModified, modificationTrackingAdapter, resourceSet, timeStamp, unloadingContents, uri, warnings
eAdapters, EDELIVER, eFlags, ELAST_NOTIFIER_FLAG
OPTION_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 |
---|
DerivedStateAwareResource() |
Modifier and Type | Method and Description |
---|---|
protected void |
clearInternalState() |
void |
discardDerivedState() |
protected org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EObject> |
doGetContents() |
protected void |
doUnload()
Copied from
ResourceImpl.doUnload() but doesn't call getContents() to avoid derived state
computation. |
org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EObject> |
getContents()
As soon as an external client tries to access the content of the resource,
the
derived state will be added to the content of this resource. |
protected org.eclipse.emf.ecore.EObject |
getEObjectForURIFragmentRootSegment(java.lang.String uriFragmentRootSegment)
Not specialized because we want to obtain a fully working root instance
when the resource is queried with the root fragment.
|
protected java.util.List<org.eclipse.emf.ecore.EObject> |
getUnloadingContents() |
protected java.lang.String |
getURIFragmentRootSegment(org.eclipse.emf.ecore.EObject eObject)
Overridden to make sure that we do not initialize a resource
just to compute the root URI fragment for the parse result.
|
void |
installDerivedState(boolean preIndexingPhase) |
boolean |
isFullyInitialized() |
boolean |
isInitializing() |
void |
setDerivedStateComputer(IDerivedStateComputer lateInitialization) |
protected void |
updateInternalState(IParseResult newParseResult)
Overridden to make sure that the cache is initialized during
loading . |
protected void |
updateInternalState(IParseResult oldParseResult,
IParseResult newParseResult) |
getEObject, getPortableURIs, getResourceDescription, getResourceStorageFacade, getUnresolvableURIFragments, isLoadedFromStorage, load, load, setIsLoadedFromStorage, setResourceDescription
addLazyProxyInformation, clearLazyProxyInformation, createAndAddDiagnostic, createAndAddDiagnostic, createDiagnostic, createDiagnosticMessage, createDiagnosticMessageContext, doLinking, doLoad, doResolveLazyCrossReference, getDiagnosticList, getDiagnosticMessageProvider, getEncoder, getEObject, getLazyProxyInformation, getLinkingHelper, getLinkingService, getReferences, handleCyclicResolution, hasLazyProxyInformation, isEagerLinking, isPotentialLazyCrossReference, isUnresolveableProxyCacheable, markUnresolvable, removeDiagnostic, removeLazyProxyInformation, resolveLazyCrossReference, resolveLazyCrossReferences, setDiagnosticMessageProvider, setEagerLinking, setEncoder, setLinkingHelper, setLinkingService
addSyntaxDiagnostic, addSyntaxErrors, basicGetEObject, clearErrorsAndWarnings, createReader, doSave, getCache, getConcreteSyntaxValidator, getEncoding, getFragmentProvider, getLanguageName, getLinker, getModificationStamp, getParser, getParseResult, getResourceServiceProvider, getSerializer, getUnloader, getURIFragment, isValidationDisabled, reattachModificationTracker, reparse, setCache, setEncodingFromOptions, setFragmentProvider, setInjectedParser, setLanguageName, setLinker, setModificationStamp, setParser, setParseResult, setResourceServiceProvider, setSerializer, setUnloader, setValidationDisabled, unload, update, validateConcreteSyntax
addModificationTrackingAdapters, attached, attachedHelper, basicSetResourceSet, createModificationTrackingAdapter, delete, detached, detachedHelper, getAllContents, getAllProperContents, getAllProperContents, getDefaultURIConverter, getEObject, getEObjectByID, getErrors, 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, toKeyString, toString, unload, unloaded, useZip
eAdapters, eBasicAdapters, eDeliver, eSetDeliver
eBasicAdapterArray, eBasicHasAdapters, eNotificationRequired, eNotify
protected volatile boolean fullyInitialized
protected volatile boolean isInitializing
public void setDerivedStateComputer(IDerivedStateComputer lateInitialization)
public boolean isFullyInitialized()
public boolean isInitializing()
public org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EObject> getContents()
As soon as an external client tries to access the content of the resource,
the derived state
will be added to the content of this resource.
getContents
in interface org.eclipse.emf.ecore.resource.Resource
getContents
in class org.eclipse.emf.ecore.resource.impl.ResourceImpl
protected org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EObject> doGetContents()
protected java.util.List<org.eclipse.emf.ecore.EObject> getUnloadingContents()
getUnloadingContents
in class org.eclipse.emf.ecore.resource.impl.ResourceImpl
protected void doUnload()
ResourceImpl.doUnload()
but doesn't call getContents()
to avoid derived state
computation.doUnload
in class StorageAwareResource
protected void clearInternalState()
clearInternalState
in class StorageAwareResource
protected void updateInternalState(IParseResult oldParseResult, IParseResult newParseResult)
updateInternalState
in class XtextResource
oldParseResult
- the previous parse result that should be detached if necessary.newParseResult
- the current parse result that should be attached to the content of this resourceprotected void updateInternalState(IParseResult newParseResult)
loading
.updateInternalState
in class XtextResource
protected java.lang.String getURIFragmentRootSegment(org.eclipse.emf.ecore.EObject eObject)
Overridden to make sure that we do not initialize a resource just to compute the root URI fragment for the parse result.
getURIFragmentRootSegment
in class org.eclipse.emf.ecore.resource.impl.ResourceImpl
protected org.eclipse.emf.ecore.EObject getEObjectForURIFragmentRootSegment(java.lang.String uriFragmentRootSegment)
Not specialized because we want to obtain a fully working root instance when the resource is queried with the root fragment.
getEObjectForURIFragmentRootSegment
in class org.eclipse.emf.ecore.resource.impl.ResourceImpl
public void discardDerivedState()
public void installDerivedState(boolean preIndexingPhase)