|
TPTP 4.5.0 Platform Project Internal API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.core.commands.common.EventManager
org.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.EditorPart
org.eclipse.ui.part.MultiPageEditorPart
org.eclipse.ui.forms.editor.FormEditor
org.eclipse.hyades.ui.internal.editor.PageContainerEditorPart
org.eclipse.hyades.ui.internal.editor.HyadesEditorPart
public abstract class HyadesEditorPart
Abstract implementation of the IHyadesEditorPart. This class has all the code to support the Hyades editor extension mechanism.
Subclasses are supposed to customize the HyadesEditorPart to a particular type of object or resource file.
IHyadesEditorPart| Field Summary |
|---|
| Fields inherited from class org.eclipse.ui.forms.editor.FormEditor |
|---|
pages |
| Fields inherited from class org.eclipse.ui.part.MultiPageEditorPart |
|---|
PAGE_CONTAINER_SITE |
| Fields inherited from interface org.eclipse.hyades.ui.editor.IHyadesEditorPart |
|---|
PROP_DIRTY, PROP_INPUT, PROP_OBJECT, PROP_TITLE |
| Fields inherited from interface org.eclipse.ui.IEditorPart |
|---|
PROP_DIRTY, PROP_INPUT |
| Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
|---|
PROP_TITLE |
| Constructor Summary | |
|---|---|
HyadesEditorPart()
Constructor for HyadesEditorPart |
|
| Method Summary | |
|---|---|
int |
addPage(org.eclipse.swt.widgets.Control control)
|
int |
addPage(org.eclipse.ui.IEditorPart editor,
org.eclipse.ui.IEditorInput input)
|
protected void |
addPages()
|
void |
addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
|
protected void |
adjustContainer()
Adjusts the container by adjusting the height of the tab depending on the number of available pages - the goal is to hide all tab if there is only one page. |
protected boolean |
cloneExtensionDefinitions()
Returns true if this editor should clone the extension definitions that are used in its context. |
void |
dispose()
|
void |
doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
|
void |
doSaveAs()
|
protected void |
enableEditActions()
|
protected void |
enableFileSynchronization()
|
protected void |
fileSelection(org.eclipse.jface.viewers.ISelection selection)
|
java.lang.Object |
getAdapter(java.lang.Class adapterClass)
|
org.eclipse.hyades.ui.extension.IAssociationDescriptor |
getEditorDescriptor()
|
org.eclipse.hyades.ui.editor.IEditorExtension |
getEditorExtension()
Returns the editor extension that is used by this editor. |
java.lang.Object |
getEditorObject()
|
org.eclipse.ui.IEditorPart |
getEditorPart()
|
org.eclipse.jface.viewers.ISelection |
getSelection()
|
protected java.lang.String |
getStatusLineMessage(org.eclipse.jface.viewers.IStructuredSelection structuredSelection)
Returns the message to show in the status line. |
void |
gotoMarker(org.eclipse.core.resources.IMarker marker)
|
protected abstract org.eclipse.hyades.ui.extension.IAssociationDescriptor |
identifyEditorDescriptor(org.eclipse.ui.IEditorInput input)
Identifies the editor descriptor that should be used with the editor input. |
void |
init(org.eclipse.ui.IEditorSite site,
org.eclipse.ui.IEditorInput input)
|
boolean |
isDirty()
|
boolean |
isReadOnly()
|
boolean |
isSaveAsAllowed()
|
protected void |
notifyPageChange(int newPageIndex)
Notifies the editor extension that a new page was activated. |
protected void |
pageChange(int newPageIndex)
|
void |
refreshContent(java.lang.Object data)
|
void |
removePage(int pageIndex)
|
void |
removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
|
void |
selectionChanged(org.eclipse.ui.IWorkbenchPart part,
org.eclipse.jface.viewers.ISelection selection)
|
void |
setActivePage(int pageIndex)
|
void |
setEditorObject(java.lang.Object editorObject)
|
void |
setInput(org.eclipse.ui.IEditorInput input)
|
void |
setSelection(org.eclipse.jface.viewers.ISelection selection)
|
protected void |
updateStatusLine(org.eclipse.jface.viewers.IStructuredSelection structuredSelection)
Updates the message shown in the status line. |
| Methods inherited from class org.eclipse.hyades.ui.internal.editor.PageContainerEditorPart |
|---|
firePropertyChange, getActivePage, getContainer, getContainerComposite, getControl, getEditor, getPageCount, getPageImage, getPageText, setControl, setEditorTitle, setPageImage, setPageText, setTitle, setTitleImage, setTitleToolTip |
| Methods inherited from class org.eclipse.ui.forms.editor.FormEditor |
|---|
addPage, addPage, addPage, addPage, addPageChangedListener, close, commitPages, configurePage, createPageContainer, createPages, createToolkit, editorDirtyStateChanged, findPage, getActiveEditor, getActivePageInstance, getCurrentPage, getSelectedPage, getToolkit, removePageChangedListener, selectReveal, setActivePage, setActivePage, updateActionBarContributor |
| Methods inherited from class org.eclipse.ui.part.MultiPageEditorPart |
|---|
activateSite, createPartControl, createSite, deactivateSite, findEditors, getPageSite, handlePropertyChange, initializePageSwitching, setActiveEditor, setFocus |
| Methods inherited from class org.eclipse.ui.part.EditorPart |
|---|
checkSite, getEditorInput, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setContentDescription, setInitializationData, setInputWithNotify, setPartName |
| Methods inherited from class org.eclipse.ui.part.WorkbenchPart |
|---|
addPartPropertyListener, addPropertyListener, firePartPropertyChanged, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, showBusy |
| Methods inherited from class org.eclipse.core.commands.common.EventManager |
|---|
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.hyades.ui.editor.IHyadesEditorPart |
|---|
addPropertyListener, getFileExtension, getTitle, getTitleImage, getTitleToolTip, removePropertyListener |
| Methods inherited from interface org.eclipse.ui.IWorkbenchPart |
|---|
addPropertyListener, getSite, getTitle, getTitleImage, removePropertyListener |
| Constructor Detail |
|---|
public HyadesEditorPart()
| Method Detail |
|---|
public void dispose()
dispose in interface org.eclipse.hyades.ui.util.IDisposabledispose in interface org.eclipse.ui.IWorkbenchPartdispose in class org.eclipse.ui.forms.editor.FormEditorIWorkbenchPart.dispose()public final org.eclipse.hyades.ui.extension.IAssociationDescriptor getEditorDescriptor()
getEditorDescriptor in interface org.eclipse.hyades.ui.editor.IHyadesEditorPartorg.eclipse.hyades.ui.editor.IHyadesEditorPart#getEditorExtensionDefinition()public final org.eclipse.hyades.ui.editor.IEditorExtension getEditorExtension()
public void setEditorObject(java.lang.Object editorObject)
setEditorObject in interface org.eclipse.hyades.ui.editor.IHyadesEditorPartIHyadesEditorPart.setEditorObject(Object)public java.lang.Object getEditorObject()
getEditorObject in interface org.eclipse.hyades.ui.editor.IHyadesEditorPartIHyadesEditorPart.getEditorObject()public int addPage(org.eclipse.swt.widgets.Control control)
addPage in interface org.eclipse.hyades.ui.editor.IHyadesEditorPartaddPage in class org.eclipse.ui.forms.editor.FormEditorMultiPageEditorPart.addPage(org.eclipse.swt.widgets.Control)
public int addPage(org.eclipse.ui.IEditorPart editor,
org.eclipse.ui.IEditorInput input)
throws org.eclipse.ui.PartInitException
addPage in interface org.eclipse.hyades.ui.editor.IHyadesEditorPartaddPage in class org.eclipse.ui.forms.editor.FormEditororg.eclipse.ui.PartInitExceptionMultiPageEditorPart.addPage(org.eclipse.ui.IEditorPart, org.eclipse.ui.IEditorInput)protected void pageChange(int newPageIndex)
pageChange in class org.eclipse.ui.forms.editor.FormEditorMultiPageEditorPart.pageChange(int)public void setActivePage(int pageIndex)
setActivePage in interface org.eclipse.hyades.ui.editor.IHyadesEditorPartsetActivePage in class PageContainerEditorPartMultiPageEditorPart.setActivePage(int)protected void notifyPageChange(int newPageIndex)
newPageIndex - public void removePage(int pageIndex)
removePage in interface org.eclipse.hyades.ui.editor.IHyadesEditorPartremovePage in class org.eclipse.ui.forms.editor.FormEditorMultiPageEditorPart.removePage(int)protected void adjustContainer()
protected final void addPages()
addPages in class org.eclipse.ui.forms.editor.FormEditorMultiPageEditorPart.createPages()public void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
doSave in interface org.eclipse.ui.ISaveablePartdoSave in class org.eclipse.ui.part.EditorPartISaveablePart.doSave(org.eclipse.core.runtime.IProgressMonitor)public void doSaveAs()
doSaveAs in interface org.eclipse.ui.ISaveablePartdoSaveAs in class org.eclipse.ui.part.EditorPartISaveablePart.doSaveAs()public void gotoMarker(org.eclipse.core.resources.IMarker marker)
org.eclipse.ui.IEditorPart#gotoMarker(org.eclipse.core.resources.IMarker)public boolean isSaveAsAllowed()
isSaveAsAllowed in interface org.eclipse.ui.ISaveablePartisSaveAsAllowed in class org.eclipse.ui.part.EditorPartISaveablePart.isSaveAsAllowed()public boolean isDirty()
isDirty in interface org.eclipse.hyades.ui.editor.IHyadesEditorPartisDirty in interface org.eclipse.ui.ISaveablePartisDirty in class org.eclipse.ui.forms.editor.FormEditorISaveablePart.isDirty()public void refreshContent(java.lang.Object data)
refreshContent in interface org.eclipse.hyades.ui.util.IRefreshableIRefreshable.refreshContent(java.lang.Object)
public void init(org.eclipse.ui.IEditorSite site,
org.eclipse.ui.IEditorInput input)
throws org.eclipse.ui.PartInitException
init in interface org.eclipse.ui.IEditorPartinit in class org.eclipse.ui.forms.editor.FormEditororg.eclipse.ui.PartInitExceptionIEditorPart.init(org.eclipse.ui.IEditorSite, org.eclipse.ui.IEditorInput)protected void enableEditActions()
protected void enableFileSynchronization()
protected boolean cloneExtensionDefinitions()
Note: The editor extension is always instantiated so it is not necessary to clone it.
Subclasses may overwrite this method.
protected abstract org.eclipse.hyades.ui.extension.IAssociationDescriptor identifyEditorDescriptor(org.eclipse.ui.IEditorInput input)
throws org.eclipse.ui.PartInitException
Implementors of this method may store the identified extension as a preference for the next time this editor is opened.
Important: This method is supposed to return a valid IAssociationDescriptor - ie. not null and related to an editor.
input -
org.eclipse.ui.PartInitException - if the editor input is not valid.public void addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
addSelectionChangedListener in interface org.eclipse.hyades.ui.editor.IHyadesEditorPartaddSelectionChangedListener in interface org.eclipse.jface.viewers.ISelectionProviderISelectionProvider.addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)public org.eclipse.jface.viewers.ISelection getSelection()
getSelection in interface org.eclipse.jface.viewers.ISelectionProviderISelectionProvider.getSelection()public void removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
removeSelectionChangedListener in interface org.eclipse.hyades.ui.editor.IHyadesEditorPartremoveSelectionChangedListener in interface org.eclipse.jface.viewers.ISelectionProviderISelectionProvider.removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)public void setSelection(org.eclipse.jface.viewers.ISelection selection)
setSelection in interface org.eclipse.jface.viewers.ISelectionProviderISelectionProvider.setSelection(org.eclipse.jface.viewers.ISelection)protected void fileSelection(org.eclipse.jface.viewers.ISelection selection)
protected void updateStatusLine(org.eclipse.jface.viewers.IStructuredSelection structuredSelection)
selection - the current selectionprotected java.lang.String getStatusLineMessage(org.eclipse.jface.viewers.IStructuredSelection structuredSelection)
If a subclass requires a more sophisticated use of the
status line, it should manipulate the status line direct. The
status line can be obtained by
getEditorSite().getActionBars().getStatusLineManager().
selection - the current selection
public org.eclipse.ui.IEditorPart getEditorPart()
getEditorPart in interface org.eclipse.hyades.ui.editor.IHyadesEditorPartIHyadesEditorPart.getEditorPart()public java.lang.Object getAdapter(java.lang.Class adapterClass)
getAdapter in interface org.eclipse.core.runtime.IAdaptablegetAdapter in class org.eclipse.ui.part.MultiPageEditorPartIAdaptable.getAdapter(java.lang.Class)public boolean isReadOnly()
isReadOnly in interface org.eclipse.hyades.ui.editor.IHyadesEditorPartIHyadesEditorPart.isReadOnly()
public void selectionChanged(org.eclipse.ui.IWorkbenchPart part,
org.eclipse.jface.viewers.ISelection selection)
selectionChanged in interface org.eclipse.ui.ISelectionListenerISelectionListener.selectionChanged(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)public void setInput(org.eclipse.ui.IEditorInput input)
setInput in class org.eclipse.ui.part.EditorPart
|
TPTP 4.5.0 Platform Project Internal API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||