IBM Rational Software Modeler
Release 6.0

com.ibm.xtools.ras.edit.ui
Interface IEditorPage

All Superinterfaces:
IAdaptable, IEditorPart, IFormPage, ISaveablePart, IWorkbenchPart

public interface IEditorPage
extends IFormPage

This interface is intended to be implemented by clients who want to supply pages to the RAS Manifest Editor. The fully qualified name of the implementing class should be placed into the "class" attribute of the page element of the com.ibm.xtools.ras.edit.ui.editorCustomization extension- point. The methods of this interface are used by the manifest editor to communicate with the pages. It extends the IFormPage interface, since the hosting editor is a FormEditor and the FormEditors require pages to implement that interface. Note: This interface is part of an evolving API and is subject to change. It is being made available to early adopters in the hope of soliciting feedback. Such early adopters should understand that any code that uses this API is bound to be broken (repeatedly) as the API changes.


Field Summary
 
Fields inherited from interface org.eclipse.ui.IEditorPart
PROP_DIRTY, PROP_INPUT
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Method Summary
 boolean activationFired()
          Informs the page that is being activated.
 void assetChanged()
          Informs the page that the Asset has changed, so that it can refresh whatever controls are stale.
 boolean deactivationRequested()
          When the active page is about to change, this method is called on the active page to inform the page that deactivation is being requested, allowing the page to veto the deactivation.
 Class[] getHandledEClasses()
          Get the highest level EClass types this page handles.
 boolean saveRequested()
          Send a save request message.
 void setResource(Resource assetResource)
          Set the reference to the Resource which the page will be editing.
 void setSelectionOnPage(IStructuredSelection selection)
          Set the selected element on the page.
 
Methods inherited from interface org.eclipse.ui.forms.editor.IFormPage
canLeaveThePage, getEditor, getId, getIndex, getManagedForm, getPartControl, initialize, isActive, isEditor, selectReveal, setActive, setIndex
 
Methods inherited from interface org.eclipse.ui.IEditorPart
getEditorInput, getEditorSite, init
 
Methods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, createPartControl, dispose, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener, setFocus
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.ui.ISaveablePart
doSave, doSaveAs, isDirty, isSaveAsAllowed, isSaveOnCloseNeeded
 

Method Detail

setResource

public void setResource(Resource assetResource)
Set the reference to the Resource which the page will be editing.

Parameters:
assetResource - the Resource that has been read from the manifest file

activationFired

public boolean activationFired()
Informs the page that is being activated. Here, the page should insure that its handle to the Asset is in sync, just in case the Asset needed to be reloaded from source. It may be necessary to set the input on any Viewer or other controls as well, since they may be out of sync for the same reason.

Returns:
true if the page can be activated

deactivationRequested

public boolean deactivationRequested()
When the active page is about to change, this method is called on the active page to inform the page that deactivation is being requested, allowing the page to veto the deactivation.

Returns:
true if the page decides that deactivation can be done

getHandledEClasses

public Class[] getHandledEClasses()
Get the highest level EClass types this page handles. When the selection in the content outline is changed, the page which handles the closest containing type to the type of the selected object will be activated. Note that if two pages handle the same EClasses, the page that is associated with the more derived profile will actually win the right to handle the the class.

Returns:
an array of Class objects for which the page is considered the editing page

saveRequested

public boolean saveRequested()
Send a save request message. The editor page can veto a save if there is a problem.

Returns:
true if a save of the Asset can be done in its current state, false if not.

setSelectionOnPage

public void setSelectionOnPage(IStructuredSelection selection)
Set the selected element on the page. Client pages should respond to this by selecting the passed element in any Viewers or other controls which contains the selected element.

Parameters:
selection - the selection that should be made

assetChanged

public void assetChanged()
Informs the page that the Asset has changed, so that it can refresh whatever controls are stale. This method is called by the hosting editor only on the active page. It is assumed that the page will sync up with the asset at the time activationFired() is called as well. This saves the page implementor the trouble of adding a listener to the Asset.


IBM Rational Software Modeler
Release 6.0


Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2004. All rights reserved.