de.cau.cs.kieler.synccharts.text.kits
Class KitsResource

java.lang.Object
  extended by org.eclipse.emf.common.notify.impl.BasicNotifierImpl
      extended by org.eclipse.emf.common.notify.impl.NotifierImpl
          extended by org.eclipse.emf.ecore.resource.impl.ResourceImpl
              extended by org.eclipse.xtext.resource.XtextResource
                  extended by org.eclipse.xtext.linking.lazy.LazyLinkingResource
                      extended by de.cau.cs.kieler.synccharts.text.kits.KitsResource
All Implemented Interfaces:
Notifier, Resource, Resource.Internal

public class KitsResource
extends org.eclipse.xtext.linking.lazy.LazyLinkingResource

A customized LazyLinkingResource. Modifies the parsed model and fixes some runtime bugs.

Rating red

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.xtext.linking.lazy.LazyLinkingResource
org.eclipse.xtext.linking.lazy.LazyLinkingResource.DiagnosticMessageContext
 
Nested classes/interfaces inherited from class org.eclipse.emf.ecore.resource.impl.ResourceImpl
ResourceImpl.ContentsEList<E extends Object & EObject>, ResourceImpl.ModificationTrackingAdapter
 
Nested classes/interfaces inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
BasicNotifierImpl.EAdapterList<E extends Object & Adapter>, BasicNotifierImpl.EObservableAdapterList
 
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.resource.Resource
Resource.Diagnostic, Resource.Factory, Resource.Internal, Resource.IOWrappedException
 
Field Summary
 
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
 
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
 
Constructor Summary
KitsResource()
           
 
Method Summary
protected  void doLinking()
          Starts model consolidation after LazyLinkingResource.doLinking().
protected  void doLoad(InputStream inputStream, Map<?,?> options)
          Delegates to LazyLinkingResource#doLoad(InputStream inputStream, Map options) for debugging purposes.
 void doSave(OutputStream outputStream, Map<?,?> options)
          Registers SaveOptions and delegates to XtextResource.doSave(OutputStream, Map)
 void update(int offset, int replacedTextLength, String newText)
          Delegates do XtextResource.update(int, int, String) for debugging purposes.
protected  void updateInternalState(org.eclipse.xtext.parser.IParseResult parseResult)
          Eliminates an ugly bug within the calling method XtextResource.update(int, int, String):
If a parsing round fails entirely, the last previously successfully deducted EObject will remain in contents though the parseResult is empty! After the next successful parser run the new EObject will be added to contents regardless the non-emptiness of contents.
 
Methods inherited from class org.eclipse.xtext.linking.lazy.LazyLinkingResource
createAndAddDiagnostic, createDiagnostic, createDiagnosticMessage, createDiagnosticMessageContext, getDiagnosticList, getDiagnosticMessageProvider, getEncoder, getEObject, getLinkingHelper, getLinkingService, getReferences, handleCyclicResolution, isEagerLinking, isUnresolveableProxyCacheable, removeDiagnostic, resolveLazyCrossReference, resolveLazyCrossReferences, setDiagnosticMessageProvider, setEagerLinking, setEncoder, setLinkingHelper, setLinkingService
 
Methods inherited from class org.eclipse.xtext.resource.XtextResource
addSyntaxErrors, clearErrorsAndWarnings, clearInternalState, 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, 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
 

Constructor Detail

KitsResource

public KitsResource()
Method Detail

doLoad

protected void doLoad(InputStream inputStream,
                      Map<?,?> options)
               throws IOException
Delegates to LazyLinkingResource#doLoad(InputStream inputStream, Map options) for debugging purposes.

Overrides:
doLoad in class org.eclipse.xtext.linking.lazy.LazyLinkingResource
Throws:
IOException

update

public void update(int offset,
                   int replacedTextLength,
                   String newText)
Delegates do XtextResource.update(int, int, String) for debugging purposes.

Overrides:
update in class org.eclipse.xtext.resource.XtextResource

doLinking

protected void doLinking()
Starts model consolidation after LazyLinkingResource.doLinking().

Overrides:
doLinking in class org.eclipse.xtext.linking.lazy.LazyLinkingResource

doSave

public void doSave(OutputStream outputStream,
                   Map<?,?> options)
            throws IOException
Registers SaveOptions and delegates to XtextResource.doSave(OutputStream, Map)

Overrides:
doSave in class org.eclipse.xtext.resource.XtextResource
Throws:
IOException

updateInternalState

protected void updateInternalState(org.eclipse.xtext.parser.IParseResult parseResult)
Eliminates an ugly bug within the calling method XtextResource.update(int, int, String):
If a parsing round fails entirely, the last previously successfully deducted EObject will remain in contents though the parseResult is empty! After the next successful parser run the new EObject will be added to contents regardless the non-emptiness of contents.

Overrides:
updateInternalState in class org.eclipse.xtext.resource.XtextResource