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

java.lang.Object
  extended by org.eclipse.gmt.umlx.editor.pages.AbstractPageManager
      extended by org.eclipse.gmt.umlx.editor.pages.TreePageManager
All Implemented Interfaces:
IPageManager

public class TreePageManager
extends AbstractPageManager

A TextPageManager manages editing of the primary edit Resource as a ResourceSet tree.


Constructor Summary
TreePageManager(QVTEditor multiPageEditor, int pageIndex)
           
 
Method Summary
 void activate(org.eclipse.core.runtime.IProgressMonitor monitor)
          Activate the page by loading from the core representation.
 java.lang.String cannotDeactivate(org.eclipse.core.runtime.IProgressMonitor monitor)
          Return a non-null reason if deactivate should not occur.
 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.
 java.lang.String getFileExtension()
          Return the file extension appropriate for temporary files created to support this page.
 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 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 refresh()
          Respond to an external change such as a model registry update.
 void setActive()
          Install the page as the active 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
 

Constructor Detail

TreePageManager

public TreePageManager(QVTEditor multiPageEditor,
                       int pageIndex)
Method Detail

activate

public void activate(org.eclipse.core.runtime.IProgressMonitor monitor)
Description copied from interface: IPageManager
Activate the page by loading from the core representation.


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:

deactivate

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


getCurrentContents

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

Throws:
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.


getFileExtension

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


hasContent

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


hasCopy

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


isDirtyPage

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


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.


postDeactivate

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


refresh

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


setActive

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