|
||||||||||
| 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
ch.sahits.phpclassgenerator.editors.PhpClassGeneratorEditor
public class PhpClassGeneratorEditor
An example showing how to create a multi-page editor. This example has 3 pages:
| Field Summary | |
|---|---|
private org.eclipse.ui.editors.text.TextEditor |
editor
The text editor used in page 0. |
private org.eclipse.swt.graphics.Font |
font
The font chosen in page 1. |
private org.eclipse.swt.custom.StyledText |
text
The text widget used in page 2. |
| Fields inherited from interface org.eclipse.ui.IEditorPart |
|---|
PROP_DIRTY, PROP_INPUT |
| Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
|---|
PROP_TITLE |
| Constructor Summary | |
|---|---|
PhpClassGeneratorEditor()
Creates a multi-page editor example. |
|
| Method Summary | |
|---|---|
(package private) void |
createPage0()
Creates page 0 of the multi-page editor, which contains a text editor. |
(package private) void |
createPage1()
Creates page 1 of the multi-page editor, which allows you to change the font used in page 2. |
(package private) void |
createPage2()
Creates page 2 of the multi-page editor, which shows the sorted text. |
protected void |
createPages()
Creates the pages of the multi-page editor. |
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. |
void |
gotoMarker(org.eclipse.core.resources.IMarker marker)
Method declared on IEditorPart |
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 |
isSaveAsAllowed()
Method declared on IEditorPart. |
protected void |
pageChange(int newPageIndex)
Calculates the contents of page 2 when the it is activated. |
void |
resourceChanged(org.eclipse.core.resources.IResourceChangeEvent event)
Closes all project files on project close. |
(package private) void |
setFont()
Sets the font related data to be applied to the text in page 2. |
(package private) void |
sortWords()
Sorts the words in page 0, and shows them in page 2. |
| Methods inherited from class org.eclipse.ui.part.MultiPageEditorPart |
|---|
addPage, addPage, addPage, addPage, createPageContainer, createPartControl, createSite, findEditors, getActiveEditor, getActivePage, getAdapter, getContainer, getControl, getEditor, getPageCount, getPageImage, getPageText, handlePropertyChange, isDirty, removePage, setActiveEditor, setActivePage, setControl, setFocus, setPageImage, setPageText |
| Methods inherited from class org.eclipse.ui.part.EditorPart |
|---|
checkSite, getEditorInput, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setContentDescription, setInitializationData, setInput, setInputWithNotify, setPartName |
| Methods inherited from class org.eclipse.ui.part.WorkbenchPart |
|---|
addPartPropertyListener, addPropertyListener, firePartPropertyChanged, firePropertyChange, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, 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.ui.IWorkbenchPart |
|---|
addPropertyListener, getSite, getTitle, getTitleImage, removePropertyListener |
| Field Detail |
|---|
private org.eclipse.ui.editors.text.TextEditor editor
private org.eclipse.swt.graphics.Font font
private org.eclipse.swt.custom.StyledText text
| Constructor Detail |
|---|
public PhpClassGeneratorEditor()
| Method Detail |
|---|
void createPage0()
void createPage1()
void createPage2()
protected void createPages()
createPages in class org.eclipse.ui.part.MultiPageEditorPartpublic void dispose()
MultiPageEditorPart implementation of this
IWorkbenchPart method disposes all nested editors.
Subclasses may extend.
dispose in interface org.eclipse.ui.IWorkbenchPartdispose in class org.eclipse.ui.part.MultiPageEditorPartpublic void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
doSave in interface org.eclipse.ui.ISaveablePartdoSave in class org.eclipse.ui.part.EditorPartmonitor - The progress monitorpublic void doSaveAs()
doSaveAs in interface org.eclipse.ui.ISaveablePartdoSaveAs in class org.eclipse.ui.part.EditorPartpublic void gotoMarker(org.eclipse.core.resources.IMarker marker)
IEditorPart
marker - the marker
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.IEditorPartinit in class org.eclipse.ui.part.MultiPageEditorPartsite - the editor siteeditorInput - the editor input
org.eclipse.ui.PartInitExceptionpublic boolean isSaveAsAllowed()
IEditorPart.
isSaveAsAllowed in interface org.eclipse.ui.ISaveablePartisSaveAsAllowed in class org.eclipse.ui.part.EditorPartprotected void pageChange(int newPageIndex)
pageChange in class org.eclipse.ui.part.MultiPageEditorPartpublic void resourceChanged(org.eclipse.core.resources.IResourceChangeEvent event)
resourceChanged in interface org.eclipse.core.resources.IResourceChangeListenerevent - Change eventvoid setFont()
void sortWords()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||