|
|||||||||
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.gmt.umlx.editor.MultiSheetEditor
public class MultiSheetEditor
An example showing how to create a multi-page editor. This example has 3 pages:
Field Summary |
---|
Fields inherited from interface org.eclipse.ui.IEditorPart |
---|
PROP_DIRTY, PROP_INPUT |
Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
---|
PROP_TITLE |
Constructor Summary | |
---|---|
MultiSheetEditor()
Creates a multi-page editor example. |
Method Summary | |
---|---|
int |
closeSheet(GSheet sheet)
|
OutlinePage |
createContentOutlinePage()
|
int |
createPageForSheet(GSheet sheet,
int sheetIndex)
|
org.eclipse.ui.views.properties.IPropertySheetPage |
createPropertySheetPage()
|
void |
dispose()
The MultiPageEditorPart implementation of this
IWorkbenchPart method disposes all nested editors. |
void |
doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
Saves the multi-page editor's document. |
void |
doSaveAs()
Saves the multi-page editor's document as another file. |
int |
findSheet(GSheet sheet)
Return the page index for the first editor for sheet, -ve if none. |
int |
findSheetId(java.lang.String sheetName)
Return the page index for the first editor for sheet, -ve if none. |
org.eclipse.ui.IEditorPart |
getActiveEditor()
|
java.lang.Object |
getAdapter(java.lang.Class adapter)
Returns the adapter for the specified key. |
SharedCommandStack |
getCommandStack()
Returns the command stack. |
OutlinePage |
getContentOutlinePage()
|
ActiveEditDomain |
getEditDomain()
Returns the edit domain. |
void |
gotoMarker(org.eclipse.core.resources.IMarker marker)
Show the marker, preferably in the Outline, but failing that in the first page in which the marker is visible. |
void |
init(org.eclipse.ui.IEditorSite site,
org.eclipse.ui.IEditorInput editorInput)
The MultiPageEditorExample implementation of this method
checks that the input is an instance of IFileEditorInput . |
boolean |
isDirty()
Returns true if the command stack is dirty |
boolean |
isSaveAsAllowed()
|
void |
openSheet(GSheet sheet,
int sheetIndex)
|
void |
refreshPageImageAndText()
Refreshes the tabs. |
void |
resourceChanged(org.eclipse.core.resources.IResourceChangeEvent event)
Closes all project files on project close. |
Methods inherited from class org.eclipse.ui.part.MultiPageEditorPart |
---|
addPage, addPage, addPage, addPage, createPartControl, removePage, setFocus |
Methods inherited from class org.eclipse.ui.part.EditorPart |
---|
getEditorInput, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setInitializationData |
Methods inherited from class org.eclipse.ui.part.WorkbenchPart |
---|
addPropertyListener, getContentDescription, getOrientation, getPartName, getSite, getTitle, getTitleImage, removePropertyListener, showBusy |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.ui.IWorkbenchPart |
---|
addPropertyListener, getSite, getTitle, getTitleImage, removePropertyListener |
Constructor Detail |
---|
public MultiSheetEditor()
Method Detail |
---|
public int closeSheet(GSheet sheet)
public OutlinePage createContentOutlinePage()
public int createPageForSheet(GSheet sheet, int sheetIndex)
public org.eclipse.ui.views.properties.IPropertySheetPage createPropertySheetPage()
public void dispose()
MultiPageEditorPart
implementation of this
IWorkbenchPart
method disposes all nested editors.
Subclasses may extend.
dispose
in interface org.eclipse.ui.IWorkbenchPart
dispose
in class org.eclipse.ui.part.MultiPageEditorPart
public void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
doSave
in interface org.eclipse.ui.ISaveablePart
doSave
in class org.eclipse.ui.part.EditorPart
public void doSaveAs()
doSaveAs
in interface org.eclipse.ui.ISaveablePart
doSaveAs
in class org.eclipse.ui.part.EditorPart
public int findSheet(GSheet sheet)
public int findSheetId(java.lang.String sheetName)
public org.eclipse.ui.IEditorPart getActiveEditor()
getActiveEditor
in class org.eclipse.ui.part.MultiPageEditorPart
public java.lang.Object getAdapter(java.lang.Class adapter)
IMPORTANT certain requests, such as the property sheet, may be made before
or after MultiPageEditorPart.createPartControl(Composite)
is called. The order is unspecified by
the Workbench.
getAdapter
in interface org.eclipse.core.runtime.IAdaptable
getAdapter
in class org.eclipse.ui.part.WorkbenchPart
IAdaptable.getAdapter(java.lang.Class)
public SharedCommandStack getCommandStack()
public OutlinePage getContentOutlinePage()
public ActiveEditDomain getEditDomain()
public void gotoMarker(org.eclipse.core.resources.IMarker marker)
gotoMarker
in interface org.eclipse.ui.ide.IGotoMarker
public void init(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput editorInput) throws org.eclipse.ui.PartInitException
MultiPageEditorExample
implementation of this method
checks that the input is an instance of IFileEditorInput
.
init
in interface org.eclipse.ui.IEditorPart
init
in class org.eclipse.ui.part.MultiPageEditorPart
org.eclipse.ui.PartInitException
public boolean isDirty()
true
if the command stack is dirty
isDirty
in interface org.eclipse.ui.ISaveablePart
isDirty
in class org.eclipse.ui.part.MultiPageEditorPart
ISaveablePart.isDirty()
public boolean isSaveAsAllowed()
isSaveAsAllowed
in interface org.eclipse.ui.ISaveablePart
isSaveAsAllowed
in class org.eclipse.ui.part.EditorPart
public void openSheet(GSheet sheet, int sheetIndex)
public void refreshPageImageAndText()
public void resourceChanged(org.eclipse.core.resources.IResourceChangeEvent event)
resourceChanged
in interface org.eclipse.core.resources.IResourceChangeListener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |