org.eclipse.ocl.examples.xtext.oclinecore.ui.model
Class OCLinEcoreDocument

java.lang.Object
  extended by org.eclipse.jface.text.AbstractDocument
      extended by org.eclipse.jface.text.Document
          extended by org.eclipse.xtext.ui.editor.model.XtextDocument
              extended by org.eclipse.ocl.examples.xtext.essentialocl.ui.model.BaseDocument
                  extended by org.eclipse.ocl.examples.xtext.oclinecore.ui.model.OCLinEcoreDocument
All Implemented Interfaces:
org.eclipse.jface.text.IDocument, org.eclipse.jface.text.IDocumentExtension, org.eclipse.jface.text.IDocumentExtension2, org.eclipse.jface.text.IDocumentExtension3, org.eclipse.jface.text.IDocumentExtension4, org.eclipse.jface.text.IRepairableDocument, org.eclipse.jface.text.IRepairableDocumentExtension, ConsoleContext, org.eclipse.xtext.ui.editor.model.IXtextDocument, org.eclipse.xtext.util.concurrent.IReadAccess<org.eclipse.xtext.resource.XtextResource>, org.eclipse.xtext.util.concurrent.IWriteAccess<org.eclipse.xtext.resource.XtextResource>

public class OCLinEcoreDocument
extends BaseDocument

An OCLinEcoreDocument refines a document to support generation of an alternate (XMI) content for use during save in place of its normal textual content.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.ocl.examples.xtext.essentialocl.ui.model.BaseDocument
BaseDocument.BaseDocumentLocker
 
Nested classes/interfaces inherited from class org.eclipse.xtext.ui.editor.model.XtextDocument
org.eclipse.xtext.ui.editor.model.XtextDocument.XtextDocumentLocker
 
Nested classes/interfaces inherited from interface org.eclipse.jface.text.IDocumentExtension
org.eclipse.jface.text.IDocumentExtension.IReplace
 
Field Summary
 
Fields inherited from interface org.eclipse.jface.text.IDocument
DEFAULT_CATEGORY, DEFAULT_CONTENT_TYPE
 
Fields inherited from interface org.eclipse.jface.text.IDocumentExtension3
DEFAULT_PARTITIONING
 
Fields inherited from interface org.eclipse.jface.text.IDocumentExtension4
UNKNOWN_MODIFICATION_STAMP
 
Constructor Summary
OCLinEcoreDocument(org.eclipse.xtext.ui.editor.model.DocumentTokenSource tokenSource, org.eclipse.xtext.ui.editor.model.edit.ITextEditComposer composer)
           
 
Method Summary
protected  void checkForErrors(org.eclipse.emf.ecore.resource.Resource resource)
           
protected  org.eclipse.emf.ecore.xmi.XMLResource getPivotResouce()
           
 void saveAsEcore(java.io.Writer writer, org.eclipse.emf.common.util.URI ecoreURI, java.lang.String exportDelegateURI)
          Write the XMI representation of the Ecore to be saved.
 void saveAsPivot(java.io.StringWriter writer)
          Write the XMI representation of the Pivot to be saved.
 void saveAsUML(java.io.Writer writer, org.eclipse.emf.common.util.URI umlURI)
          Write the XMI representation of the UML to be saved.
 void saveInEcore(java.io.Writer writer, org.eclipse.emf.common.util.URI ecoreURI, java.lang.String exportDelegateURI)
          Write the XMI representation of the Ecore to be saved.
 
Methods inherited from class org.eclipse.ocl.examples.xtext.essentialocl.ui.model.BaseDocument
createDocumentLocker, disposeInput, getDocumentAttribution, getOCLContext, getOCLParameters, getResourceSet, setContext, setContext, setContext
 
Methods inherited from class org.eclipse.xtext.ui.editor.model.XtextDocument
addModelListener, addPosition, addPosition, addXtextDocumentContentObserver, checkAndUpdateAnnotations, ensureThatStateIsNotReturned, fireDocumentChanged, getAdapter, getLastDamage, getPositions, getPositions, getResourceURI, getTokens, getValidationJob, internalModify, modify, notifyModelListeners, readOnly, removeModelListener, removePosition, removePosition, removeXtextDocumentContentObserver, setInput, setValidationJob, updateContentBeforeRead
 
Methods inherited from class org.eclipse.jface.text.Document
isLineInformationRepairNeeded
 
Methods inherited from class org.eclipse.jface.text.AbstractDocument
acceptPostNotificationReplaces, addDocumentListener, addDocumentPartitioningListener, addDocumentRewriteSessionListener, addPositionCategory, addPositionUpdater, addPrenotifiedDocumentListener, checkStateOfPartitioner, completeInitialization, computeIndexInCategory, computeIndexInPositionList, computeIndexInPositionList, computeNumberOfLines, computePartitioning, computePartitioning, containsPosition, containsPositionCategory, doFireDocumentChanged, doFireDocumentChanged, doFireDocumentChanged2, fireDocumentAboutToBeChanged, fireDocumentPartitioningChanged, fireDocumentPartitioningChanged, fireDocumentPartitioningChanged, fireRewriteSessionChanged, get, get, getActiveRewriteSession, getChar, getContentType, getContentType, getDefaultLineDelimiter, getDocumentListeners, getDocumentManagedPositions, getDocumentPartitioner, getDocumentPartitioner, getDocumentPartitioningListeners, getLegalContentTypes, getLegalContentTypes, getLegalLineDelimiters, getLength, getLineDelimiter, getLineInformation, getLineInformationOfOffset, getLineLength, getLineOffset, getLineOfOffset, getModificationStamp, getNumberOfLines, getNumberOfLines, getPartition, getPartition, getPartitionings, getPositionCategories, getPositionUpdaters, getStore, getTracker, ignorePostNotificationReplaces, insertPositionUpdater, registerPostNotificationReplace, removeDocumentListener, removeDocumentPartitioningListener, removeDocumentRewriteSessionListener, removePositionCategory, removePositionUpdater, removePrenotifiedDocumentListener, repairLineInformation, replace, replace, resumeListenerNotification, resumePostNotificationProcessing, search, set, set, setDocumentPartitioner, setDocumentPartitioner, setInitialLineDelimiter, setLineTracker, setTextStore, startRewriteSession, startRewriteSessionOnPartitioners, startSequentialRewrite, stopListenerNotification, stopPostNotificationProcessing, stopRewriteSession, stopRewriteSessionOnPartitioners, stopSequentialRewrite, updateDocumentStructures, updatePositions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.text.IDocument
addDocumentListener, addDocumentPartitioningListener, addPosition, addPosition, addPositionCategory, addPositionUpdater, addPrenotifiedDocumentListener, computeIndexInCategory, computeNumberOfLines, computePartitioning, containsPosition, containsPositionCategory, get, get, getChar, getContentType, getDocumentPartitioner, getLegalContentTypes, getLegalLineDelimiters, getLength, getLineDelimiter, getLineInformation, getLineInformationOfOffset, getLineLength, getLineOffset, getLineOfOffset, getNumberOfLines, getNumberOfLines, getPartition, getPositionCategories, getPositions, getPositionUpdaters, insertPositionUpdater, removeDocumentListener, removeDocumentPartitioningListener, removePosition, removePosition, removePositionCategory, removePositionUpdater, removePrenotifiedDocumentListener, replace, search, set, setDocumentPartitioner
 
Methods inherited from interface org.eclipse.jface.text.IDocumentExtension3
computePartitioning, getContentType, getDocumentPartitioner, getLegalContentTypes, getPartition, getPartitionings, setDocumentPartitioner
 

Constructor Detail

OCLinEcoreDocument

@Inject
public OCLinEcoreDocument(org.eclipse.xtext.ui.editor.model.DocumentTokenSource tokenSource,
                                 org.eclipse.xtext.ui.editor.model.edit.ITextEditComposer composer)
Method Detail

checkForErrors

protected void checkForErrors(org.eclipse.emf.ecore.resource.Resource resource)
                       throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

getPivotResouce

@Nullable
protected org.eclipse.emf.ecore.xmi.XMLResource getPivotResouce()
                                                         throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

saveAsEcore

public void saveAsEcore(@NonNull
                        java.io.Writer writer,
                        @NonNull
                        org.eclipse.emf.common.util.URI ecoreURI,
                        @Nullable
                        java.lang.String exportDelegateURI)
                 throws java.io.IOException,
                        org.eclipse.core.runtime.CoreException
Write the XMI representation of the Ecore to be saved.

Parameters:
exportDelegateURI -
Throws:
java.io.IOException
org.eclipse.core.runtime.CoreException

saveAsPivot

public void saveAsPivot(@NonNull
                        java.io.StringWriter writer)
                 throws org.eclipse.core.runtime.CoreException,
                        java.io.IOException
Write the XMI representation of the Pivot to be saved.

Throws:
org.eclipse.core.runtime.CoreException
java.io.IOException

saveAsUML

public void saveAsUML(@NonNull
                      java.io.Writer writer,
                      @NonNull
                      org.eclipse.emf.common.util.URI umlURI)
               throws java.io.IOException,
                      org.eclipse.core.runtime.CoreException
Write the XMI representation of the UML to be saved.

Throws:
java.io.IOException
org.eclipse.core.runtime.CoreException

saveInEcore

public void saveInEcore(@NonNull
                        java.io.Writer writer,
                        @NonNull
                        org.eclipse.emf.common.util.URI ecoreURI,
                        @Nullable
                        java.lang.String exportDelegateURI)
                 throws java.io.IOException,
                        org.eclipse.core.runtime.CoreException
Write the XMI representation of the Ecore to be saved.

Throws:
java.io.IOException
org.eclipse.core.runtime.CoreException