public class LazyLinkingResource extends XtextResource
| Modifier and Type | Class and Description |
|---|---|
static class |
LazyLinkingResource.CyclicLinkingException |
protected static class |
LazyLinkingResource.DiagnosticMessageContext |
org.eclipse.emf.ecore.resource.impl.ResourceImpl.ContentsEList<E extends Object & org.eclipse.emf.ecore.EObject>, org.eclipse.emf.ecore.resource.impl.ResourceImpl.ModificationTrackingAdapterorg.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList<E extends Object & org.eclipse.emf.common.notify.Adapter>, org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EObservableAdapterListorg.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 LinkedHashSet<Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode>> |
resolving |
static String |
UNRESOLVEABLE_PROXIES_KEY
The cache key for a Set of uri fragments that cannot be resolved.
|
isUpdating, 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 |
|---|
LazyLinkingResource() |
| Modifier and Type | Method and Description |
|---|---|
int |
addLazyProxyInformation(org.eclipse.emf.ecore.EObject obj,
org.eclipse.emf.ecore.EReference ref,
INode node) |
void |
clearLazyProxyInformation() |
protected void |
createAndAddDiagnostic(Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> triple) |
protected void |
createAndAddDiagnostic(Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> triple,
IllegalNodeException ex) |
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(InputStream inputStream,
Map<?,?> options) |
protected void |
doResolveLazyCrossReference(org.eclipse.emf.ecore.InternalEObject source,
org.eclipse.emf.ecore.EStructuralFeature crossRef)
Ensures that all the lazy proxy values that are referenced by
crossRef are replaced
by non-lazy proxies or resolved instances. |
protected List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> |
getDiagnosticList(DiagnosticMessage message) |
ILinkingDiagnosticMessageProvider |
getDiagnosticMessageProvider() |
LazyURIEncoder |
getEncoder() |
org.eclipse.emf.ecore.EObject |
getEObject(String uriFragment) |
protected org.eclipse.emf.ecore.EObject |
getEObject(String uriFragment,
Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> triple) |
Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> |
getLazyProxyInformation(int idx) |
LinkingHelper |
getLinkingHelper() |
ILinkingService |
getLinkingService() |
protected String |
getReferences(Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> triple,
LinkedHashSet<Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode>> resolving2) |
protected Set<String> |
getUnresolvableURIFragments() |
protected org.eclipse.emf.ecore.EObject |
handleCyclicResolution(Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> triple) |
boolean |
hasLazyProxyInformation(int idx) |
boolean |
isEagerLinking() |
protected boolean |
isPotentialLazyCrossReference(org.eclipse.emf.ecore.EStructuralFeature feature)
Return
true if the given feature may hold a proxy that has to be resolved. |
protected boolean |
isUnresolveableProxyCacheable(Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> triple) |
void |
markUnresolvable(org.eclipse.emf.ecore.EObject referenced)
Marks the given proxy as unresolvable.
|
protected void |
removeDiagnostic(Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> triple) |
Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> |
removeLazyProxyInformation(int idx) |
protected void |
resolveLazyCrossReference(org.eclipse.emf.ecore.InternalEObject source,
org.eclipse.emf.ecore.EStructuralFeature crossRef)
If the given
crossRef may hold lazy linking proxies, they are attempted to be resolved. |
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) |
addSyntaxDiagnostic, addSyntaxErrors, basicGetEObject, clearErrorsAndWarnings, clearInternalState, createReader, doSave, doUnload, getCache, getConcreteSyntaxValidator, getEncoding, getFragmentProvider, getLanguageName, getLinker, getModificationStamp, getParser, getParseResult, getResourceServiceProvider, getSerializer, getUnloader, getURIFragment, isValidationDisabled, reattachModificationTracker, relink, reparse, setCache, setEncodingFromOptions, setFragmentProvider, setInjectedParser, setLanguageName, setLinker, setModificationStamp, setParser, setParseResult, setResourceServiceProvider, setSerializer, setUnloader, setValidationDisabled, unload, update, updateInternalState, updateInternalState, validateConcreteSyntaxaddModificationTrackingAdapters, 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, useZipeAdapters, eBasicAdapters, eDeliver, eSetDelivereBasicAdapterArray, eBasicHasAdapters, eNotificationRequired, eNotifypublic static final String UNRESOLVEABLE_PROXIES_KEY
protected LinkedHashSet<Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode>> resolving
protected void doLoad(InputStream inputStream, Map<?,?> options) throws IOException
doLoad in class XtextResourceIOExceptionprotected void doLinking()
doLinking in class XtextResourcepublic void resolveLazyCrossReferences(CancelIndicator mon)
mon - a CancelIndicator can be used to stop the resolution.protected void resolveLazyCrossReference(org.eclipse.emf.ecore.InternalEObject source,
org.eclipse.emf.ecore.EStructuralFeature crossRef)
crossRef may hold lazy linking proxies, they are attempted to be resolved.protected void doResolveLazyCrossReference(org.eclipse.emf.ecore.InternalEObject source,
org.eclipse.emf.ecore.EStructuralFeature crossRef)
crossRef are replaced
by non-lazy proxies or resolved instances.protected boolean isPotentialLazyCrossReference(org.eclipse.emf.ecore.EStructuralFeature feature)
true if the given feature may hold a proxy that has to be resolved.
This is supposed to be an internal hook which allows to resolve proxies even in cases
where EMF prohibits proxies, e.g. in case of opposite references.public org.eclipse.emf.ecore.EObject getEObject(String uriFragment)
getEObject in interface org.eclipse.emf.ecore.resource.ResourcegetEObject in class XtextResourceprotected org.eclipse.emf.ecore.EObject getEObject(String uriFragment, Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> triple) throws AssertionError
AssertionErrorprotected boolean isUnresolveableProxyCacheable(Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> triple)
protected org.eclipse.emf.ecore.EObject handleCyclicResolution(Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> triple) throws AssertionError
AssertionErrorprotected String getReferences(Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> triple, LinkedHashSet<Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode>> resolving2)
protected void createAndAddDiagnostic(Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> triple)
protected void createAndAddDiagnostic(Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> triple, IllegalNodeException ex)
protected void removeDiagnostic(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 List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> getDiagnosticList(DiagnosticMessage message) throws AssertionError
AssertionErrorprotected 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)
public void setLinkingService(ILinkingService linkingService)
public ILinkingService getLinkingService()
public void setEncoder(LazyURIEncoder encoder)
public LazyURIEncoder getEncoder()
public void setEagerLinking(boolean eagerLinking)
public boolean isEagerLinking()
public ILinkingDiagnosticMessageProvider getDiagnosticMessageProvider()
public void setDiagnosticMessageProvider(ILinkingDiagnosticMessageProvider diagnosticMessageProvider)
public LinkingHelper getLinkingHelper()
public void setLinkingHelper(LinkingHelper linkingHelper)
public void markUnresolvable(org.eclipse.emf.ecore.EObject referenced)
getEObject(String)
will yield null.public int addLazyProxyInformation(org.eclipse.emf.ecore.EObject obj,
org.eclipse.emf.ecore.EReference ref,
INode node)
public boolean hasLazyProxyInformation(int idx)
public Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> getLazyProxyInformation(int idx)
public Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> removeLazyProxyInformation(int idx)
public void clearLazyProxyInformation()
Copyright © 2015. All Rights Reserved.