|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.common.notify.impl.BasicNotifierImpl org.eclipse.emf.common.notify.impl.NotifierImpl org.eclipse.emf.ecore.resource.impl.ResourceImpl org.eclipse.xtext.resource.XtextResource org.eclipse.xtext.linking.lazy.LazyLinkingResource org.eclipse.xtext.resource.DerivedStateAwareResource
public class DerivedStateAwareResource
Adds a hook for late initialization to be used to create derived state.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.eclipse.xtext.linking.lazy.LazyLinkingResource |
---|
LazyLinkingResource.DiagnosticMessageContext |
Nested classes/interfaces inherited from class org.eclipse.emf.ecore.resource.impl.ResourceImpl |
---|
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 |
Nested classes/interfaces inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl |
---|
org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList<E extends java.lang.Object & org.eclipse.emf.common.notify.Adapter> |
Field Summary | |
---|---|
protected boolean |
fullyInitialized
|
protected boolean |
isInitializing
|
Fields inherited from class org.eclipse.xtext.resource.XtextResource |
---|
isUpdating, OPTION_ENCODING, OPTION_FORMAT, OPTION_RESOLVE_ALL, OPTION_SERIALIZATION_OPTIONS |
Fields inherited from class org.eclipse.emf.ecore.resource.impl.ResourceImpl |
---|
contents, defaultDeleteOptions, defaultLoadOptions, defaultSaveOptions, errors, intrinsicIDToEObjectMap, isLoaded, isLoading, isModified, modificationTrackingAdapter, resourceSet, timeStamp, unloadingContents, uri, warnings |
Fields inherited from class org.eclipse.emf.common.notify.impl.NotifierImpl |
---|
eAdapters, EDELIVER, eFlags, ELAST_NOTIFIER_FLAG |
Constructor Summary | |
---|---|
DerivedStateAwareResource()
|
Method Summary | |
---|---|
void |
discardDerivedState()
|
org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EObject> |
getContents()
|
protected org.eclipse.emf.ecore.EObject |
getEObjectForURIFragmentRootSegment(java.lang.String uriFragmentRootSegment)
|
protected java.lang.String |
getURIFragmentRootSegment(org.eclipse.emf.ecore.EObject eObject)
|
void |
installDerivedState(boolean preIndexingPhase)
|
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)
|
Methods inherited from class org.eclipse.emf.ecore.resource.impl.ResourceImpl |
---|
addModificationTrackingAdapters, attached, attachedHelper, basicSetResourceSet, createModificationTrackingAdapter, delete, detached, detachedHelper, getAllContents, getAllProperContents, getAllProperContents, getDefaultURIConverter, getEObject, getEObjectByID, getErrors, getIntrinsicIDToEObjectMap, getResourceSet, getTimeStamp, getURI, getURIConverter, getWarnings, isAttachedDetachedHelperRequired, isContentZipEntry, isLoaded, isLoading, isModified, isTrackingModification, load, load, mergeMaps, newContentZipEntry, removeModificationTrackingAdapters, save, save, saveOnlyIfChangedWithFileBuffer, saveOnlyIfChangedWithMemoryBuffer, setIntrinsicIDToEObjectMap, setLoaded, setModified, setTimeStamp, setTrackingModification, setURI, toKeyString, toString, unload, unloaded, useZip |
Methods inherited from class org.eclipse.emf.common.notify.impl.NotifierImpl |
---|
eAdapters, eBasicAdapters, eDeliver, eSetDeliver |
Methods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl |
---|
eBasicAdapterArray, eBasicHasAdapters, eNotificationRequired, eNotify |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected volatile boolean fullyInitialized
protected volatile boolean isInitializing
Constructor Detail |
---|
public DerivedStateAwareResource()
Method Detail |
---|
public void setDerivedStateComputer(IDerivedStateComputer lateInitialization)
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 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)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |