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

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

public abstract class EditorPageManager
extends AbstractPageManager
implements IEditorPageManager


Nested Class Summary
static class EditorPageManager.ByteArrayOutputStream2InputStream
           
 
Constructor Summary
EditorPageManager(QVTEditor multiPageEditor, boolean isPrimary, java.lang.String pageTitle)
           
 
Method Summary
 void activate(org.eclipse.core.runtime.IProgressMonitor monitor)
          Activate the page by loading from the core representation.
 void deactivate(org.eclipse.core.runtime.IProgressMonitor monitor)
          Deactivate the page by saving to the core representation.
 void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
          Save the page contents to editor input file.
 java.lang.String getCurrentContents()
          Create the current editor-specific content.
 LazyTextEditor getEditor()
          Return the editor managed by this page manager.
 org.eclipse.ui.IFileEditorInput getEditorInput()
          Return the edit or input that is (or will become) the editor input once the editor is activated.
 boolean hasContent()
          Return true if the page has been given some initial content.
 boolean hasCopy()
          Return true if there is a local copy to which editing can revert.
 boolean isDirtyPage()
          Return true if the page has been modified.
 boolean isEditingAsSecondary()
          Return true if this primary editor is currently editing its secondary page.
 boolean isPrimary()
          Return true if the page directly edits the file upon which the multi-page editor was opened.
 void postDeactivate()
          On completion of deactivate() release any resources established by cannotDeactivate().
 void setActive()
          Install the page as the active page.
 void setEditingAsSecondary()
          Configure a primary page editor to edit its secondary copy following completion of an edit in a secondary page.
 
Methods inherited from class org.eclipse.gmt.umlx.editor.pages.AbstractPageManager
getCreationFactory, getResourceSet, getTitle, isActivePageManager, isContentPageManager, isDirty, saveTo
 
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
createContents, isActivePageManager, isContentPageManager
 
Methods inherited from interface org.eclipse.gmt.umlx.editor.IPageManager
cannotDeactivate, getFileExtension, getTitle, isDirty, refresh, saveTo
 

Constructor Detail

EditorPageManager

public EditorPageManager(QVTEditor multiPageEditor,
                         boolean isPrimary,
                         java.lang.String pageTitle)
Method Detail

activate

public void activate(org.eclipse.core.runtime.IProgressMonitor monitor)
              throws org.eclipse.core.runtime.CoreException,
                     java.io.IOException,
                     org.eclipse.gmt.umlx.alien.mapping.MappingConfigurationException
Description copied from interface: IPageManager
Activate the page by loading from the core representation.

Specified by:
activate in interface IPageManager
Throws:
org.eclipse.core.runtime.CoreException
java.io.IOException
org.eclipse.gmt.umlx.alien.mapping.MappingConfigurationException

deactivate

public void deactivate(org.eclipse.core.runtime.IProgressMonitor monitor)
Description copied from interface: IPageManager
Deactivate the page by saving to the core representation.

Specified by:
deactivate in interface IPageManager

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

getCurrentContents

public java.lang.String getCurrentContents()
Description copied from interface: IPageManager
Create the current editor-specific content.

Specified by:
getCurrentContents in interface IPageManager

getEditor

public LazyTextEditor getEditor()
Description copied from interface: IEditorPageManager
Return the editor managed by this page manager.

Specified by:
getEditor in interface IEditorPageManager

getEditorInput

public org.eclipse.ui.IFileEditorInput getEditorInput()
Description copied from interface: IEditorPageManager
Return the edit or input that is (or will become) the editor input once the editor is activated.

Specified by:
getEditorInput in interface IEditorPageManager

hasContent

public boolean hasContent()
Description copied from interface: IPageManager
Return true if the page has been given some initial content.

Specified by:
hasContent in interface IPageManager

hasCopy

public boolean hasCopy()
Description copied from interface: IPageManager
Return true if there is a local copy to which editing can revert.

Specified by:
hasCopy in interface IPageManager

isDirtyPage

public boolean isDirtyPage()
Description copied from interface: IPageManager
Return true if the page has been modified.

Specified by:
isDirtyPage in interface IPageManager

isEditingAsSecondary

public boolean isEditingAsSecondary()
Description copied from interface: IEditorPageManager
Return true if this primary editor is currently editing its secondary page.

Specified by:
isEditingAsSecondary in interface IEditorPageManager

isPrimary

public boolean isPrimary()
Description copied from interface: IPageManager
Return true if the page directly edits the file upon which the multi-page editor was opened.

Specified by:
isPrimary in interface IPageManager

postDeactivate

public void postDeactivate()
Description copied from interface: IPageManager
On completion of deactivate() release any resources established by cannotDeactivate().

Specified by:
postDeactivate in interface IPageManager

setActive

public void setActive()
Description copied from interface: IPageManager
Install the page as the active page.

Specified by:
setActive in interface IPageManager

setEditingAsSecondary

public void setEditingAsSecondary()
Description copied from interface: IEditorPageManager
Configure a primary page editor to edit its secondary copy following completion of an edit in a secondary page. This ensures that the regenerated content of the secondary page does not overwrite the original primary without review by the user.

Specified by:
setEditingAsSecondary in interface IEditorPageManager