org.eclipse.gmt.umlx.editor.pages
Class TextPageManager

java.lang.Object
  extended by org.eclipse.gmt.umlx.editor.pages.AbstractPageManager
      extended by org.eclipse.gmt.umlx.editor.pages.EditorPageManager
          extended by org.eclipse.gmt.umlx.editor.pages.TextPageManager
All Implemented Interfaces:
IEditorPageManager, IPageManager

public class TextPageManager
extends EditorPageManager

A TextPageManager manages editing of the primary edit Resource as a concrete syntax text file.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.gmt.umlx.editor.pages.EditorPageManager
EditorPageManager.ByteArrayOutputStream2InputStream
 
Constructor Summary
TextPageManager(QVTEditor multiPageEditor, boolean isMaster)
           
 
Method Summary
 java.lang.String cannotDeactivate(org.eclipse.core.runtime.IProgressMonitor monitor)
          Return a non-null reason if deactivate should not occur.
 void createContents(java.io.OutputStream outputStream)
          Create the editor-specific content in outputStream from getEcoreResource().
 void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
          Save the page contents to editor input file.
 java.lang.String getFileExtension()
          Return the file extension appropriate for temporary files created to support this page.
 void refresh()
          Respond to an external change such as a model registry update.
 void saveTo(org.eclipse.core.resources.IFile file, org.eclipse.core.runtime.IProgressMonitor monitor)
          Save the page contents to the specified file.
 
Methods inherited from class org.eclipse.gmt.umlx.editor.pages.EditorPageManager
activate, deactivate, getCurrentContents, getEditor, getEditorInput, hasContent, hasCopy, isDirtyPage, isEditingAsSecondary, isPrimary, postDeactivate, setActive, setEditingAsSecondary
 
Methods inherited from class org.eclipse.gmt.umlx.editor.pages.AbstractPageManager
getCreationFactory, getResourceSet, getTitle, isActivePageManager, isContentPageManager, isDirty
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.gmt.umlx.editor.IEditorPageManager
isActivePageManager, isContentPageManager
 
Methods inherited from interface org.eclipse.gmt.umlx.editor.IPageManager
getTitle, isDirty
 

Constructor Detail

TextPageManager

public TextPageManager(QVTEditor multiPageEditor,
                       boolean isMaster)
Method Detail

cannotDeactivate

public java.lang.String cannotDeactivate(org.eclipse.core.runtime.IProgressMonitor monitor)
Description copied from interface: IPageManager
Return a non-null reason if deactivate should not occur. postDeactivate is alwayd invoked to release any resources cached by cannotDeactivate for passing to deactivate.

Returns:

createContents

public void createContents(java.io.OutputStream outputStream)
                    throws org.eclipse.gmt.umlx.alien.mapping.MappingConfigurationException,
                           java.io.IOException
Description copied from interface: IEditorPageManager
Create the editor-specific content in outputStream from getEcoreResource().

Throws:
org.eclipse.gmt.umlx.alien.mapping.MappingConfigurationException
java.io.IOException

doSave

public void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
Description copied from interface: IPageManager
Save the page contents to editor input file.

Specified by:
doSave in interface IPageManager
Overrides:
doSave in class EditorPageManager

getFileExtension

public java.lang.String getFileExtension()
Description copied from interface: IPageManager
Return the file extension appropriate for temporary files created to support this page.


refresh

public void refresh()
Description copied from interface: IPageManager
Respond to an external change such as a model registry update.


saveTo

public void saveTo(org.eclipse.core.resources.IFile file,
                   org.eclipse.core.runtime.IProgressMonitor monitor)
Description copied from interface: IPageManager
Save the page contents to the specified file.

Specified by:
saveTo in interface IPageManager
Overrides:
saveTo in class AbstractPageManager