org.eclipse.xtext.linking.lazy
Class LazyLinkingResource
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
- All Implemented Interfaces:
- org.eclipse.emf.common.notify.Notifier, org.eclipse.emf.ecore.resource.Resource, org.eclipse.emf.ecore.resource.Resource.Internal
- Direct Known Subclasses:
- DerivedStateAwareResource
public class LazyLinkingResource
- extends XtextResource
- Author:
- Sven Efftinge - Initial contribution and API
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>, org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EObservableAdapterList |
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.resource.Resource |
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 |
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 |
Fields inherited from interface org.eclipse.emf.ecore.resource.Resource |
OPTION_CIPHER, 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 |
Method Summary |
protected void |
createAndAddDiagnostic(Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> triple)
|
protected org.eclipse.emf.ecore.resource.Resource.Diagnostic |
createDiagnostic(Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> triple,
DiagnosticMessage message)
|
protected DiagnosticMessage |
createDiagnosticMessage(Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> triple)
|
protected ILinkingDiagnosticMessageProvider.ILinkingDiagnosticContext |
createDiagnosticMessageContext(Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> triple)
|
protected void |
doLinking()
|
protected void |
doLoad(java.io.InputStream inputStream,
java.util.Map<?,?> options)
|
protected java.util.List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> |
getDiagnosticList(DiagnosticMessage message)
|
ILinkingDiagnosticMessageProvider |
getDiagnosticMessageProvider()
|
LazyURIEncoder |
getEncoder()
|
org.eclipse.emf.ecore.EObject |
getEObject(java.lang.String uriFragment)
|
LinkingHelper |
getLinkingHelper()
|
ILinkingService |
getLinkingService()
|
protected java.lang.String |
getReferences(Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> triple,
java.util.LinkedHashSet<Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode>> resolving2)
|
protected org.eclipse.emf.ecore.EObject |
handleCyclicResolution(Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> triple)
|
boolean |
isEagerLinking()
|
protected boolean |
isUnresolveableProxyCacheable(Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> triple)
|
protected void |
removeDiagnostic(Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> triple)
|
protected void |
resolveLazyCrossReference(org.eclipse.emf.ecore.InternalEObject source,
org.eclipse.emf.ecore.EStructuralFeature crossRef)
|
void |
resolveLazyCrossReferences(CancelIndicator mon)
resolves any lazy cross references in this resource, adding Issues for unresolvable elements to this resource. |
void |
setDiagnosticMessageProvider(ILinkingDiagnosticMessageProvider diagnosticMessageProvider)
|
void |
setEagerLinking(boolean eagerLinking)
|
void |
setEncoder(LazyURIEncoder encoder)
|
void |
setLinkingHelper(LinkingHelper linkingHelper)
|
void |
setLinkingService(ILinkingService linkingService)
|
Methods inherited from class org.eclipse.xtext.resource.XtextResource |
addSyntaxErrors, clearErrorsAndWarnings, clearInternalState, doSave, doUnload, getCache, getConcreteSyntaxValidator, getEncoding, getFragmentProvider, getLanguageName, getLinker, getParser, getParseResult, getResourceServiceProvider, getSerializer, getUnloader, getURIFragment, isValidationDisabled, reattachModificationTracker, reparse, setCache, setEncodingFromOptions, setFragmentProvider, setInjectedParser, setLinker, setParser, setParseResult, setResourceServiceProvider, setSerializer, setUnloader, setValidationDisabled, unload, update, updateInternalState, updateInternalState, validateConcreteSyntax |
Methods inherited from class org.eclipse.emf.ecore.resource.impl.ResourceImpl |
addModificationTrackingAdapters, attached, attachedHelper, basicSetResourceSet, createModificationTrackingAdapter, delete, detached, detachedHelper, getAllContents, getAllProperContents, getAllProperContents, getContents, getDefaultURIConverter, getEObject, getEObjectByID, getEObjectForURIFragmentRootSegment, getErrors, getIntrinsicIDToEObjectMap, getResourceSet, getTimeStamp, getURI, getURIConverter, getURIFragmentRootSegment, getWarnings, handleLoadResponse, handleSaveResponse, 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 |
Methods inherited from interface org.eclipse.emf.common.notify.Notifier |
eAdapters, eDeliver, eNotify, eSetDeliver |
LazyLinkingResource
public LazyLinkingResource()
doLoad
protected void doLoad(java.io.InputStream inputStream,
java.util.Map<?,?> options)
throws java.io.IOException
- Overrides:
doLoad
in class XtextResource
- Throws:
java.io.IOException
doLinking
protected void doLinking()
- Overrides:
doLinking
in class XtextResource
resolveLazyCrossReferences
public void resolveLazyCrossReferences(CancelIndicator mon)
- resolves any lazy cross references in this resource, adding Issues for unresolvable elements to this resource.
This resource might still contain resolvable proxies after this method has been called.
- Parameters:
a
- CancelIndicator
can be used to stop the resolution.
resolveLazyCrossReference
protected void resolveLazyCrossReference(org.eclipse.emf.ecore.InternalEObject source,
org.eclipse.emf.ecore.EStructuralFeature crossRef)
getEObject
public org.eclipse.emf.ecore.EObject getEObject(java.lang.String uriFragment)
- Specified by:
getEObject
in interface org.eclipse.emf.ecore.resource.Resource
- Overrides:
getEObject
in class XtextResource
isUnresolveableProxyCacheable
protected boolean isUnresolveableProxyCacheable(Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> triple)
- Since:
- 2.1
handleCyclicResolution
protected org.eclipse.emf.ecore.EObject handleCyclicResolution(Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> triple)
throws java.lang.AssertionError
- Throws:
java.lang.AssertionError
getReferences
protected java.lang.String getReferences(Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> triple,
java.util.LinkedHashSet<Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode>> resolving2)
createAndAddDiagnostic
protected void createAndAddDiagnostic(Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> triple)
removeDiagnostic
protected void removeDiagnostic(Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> triple)
createDiagnostic
protected org.eclipse.emf.ecore.resource.Resource.Diagnostic createDiagnostic(Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> triple,
DiagnosticMessage message)
getDiagnosticList
protected java.util.List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> getDiagnosticList(DiagnosticMessage message)
throws java.lang.AssertionError
- Throws:
java.lang.AssertionError
createDiagnosticMessage
protected DiagnosticMessage createDiagnosticMessage(Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> triple)
createDiagnosticMessageContext
protected ILinkingDiagnosticMessageProvider.ILinkingDiagnosticContext createDiagnosticMessageContext(Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> triple)
setLinkingService
public void setLinkingService(ILinkingService linkingService)
getLinkingService
public ILinkingService getLinkingService()
setEncoder
public void setEncoder(LazyURIEncoder encoder)
getEncoder
public LazyURIEncoder getEncoder()
setEagerLinking
public void setEagerLinking(boolean eagerLinking)
isEagerLinking
public boolean isEagerLinking()
getDiagnosticMessageProvider
public ILinkingDiagnosticMessageProvider getDiagnosticMessageProvider()
setDiagnosticMessageProvider
public void setDiagnosticMessageProvider(ILinkingDiagnosticMessageProvider diagnosticMessageProvider)
getLinkingHelper
public LinkingHelper getLinkingHelper()
setLinkingHelper
public void setLinkingHelper(LinkingHelper linkingHelper)