com.ibm.jdg2e.msseditor.ui
Class MiniSSFileEditor
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.EditorPart
com.ibm.jdg2e.msseditor.ui.AbstractMiniSSEditor
com.ibm.jdg2e.msseditor.ui.MiniSSFileEditor
- All Implemented Interfaces:
- org.eclipse.core.runtime.IAdaptable, org.eclipse.ui.IEditorPart, org.eclipse.core.runtime.IExecutableExtension, IMiniSSListener, org.eclipse.ui.ISaveablePart, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.part.IWorkbenchPartOrientation
- public class MiniSSFileEditor
- extends AbstractMiniSSEditor
Defines a sample "mini-spreadsheet" editor that demonstrates how to create an
editor whose input is based on files directly from the file system (not the
the workspace).
The mini-spreadsheet editor defines its own toolbar button, main menu bar
pull-down labeled "Calculations," and context menu. It will also allow others
to extend it with their own actions; for example, the
com.ibm.jdg2e.msseditor.extras plug-in contributes toolbar
buttons, menu choices, and editor pop-up menu choices (denoted in the UI with
an asterisk).
| Fields inherited from interface org.eclipse.ui.IEditorPart |
PROP_DIRTY, PROP_INPUT |
| Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
PROP_TITLE |
|
Method Summary |
org.eclipse.ui.IEditorInput |
createNewInput(java.lang.String message)
Create a new valid IEditorInput for this concrete
implementation, an editor input of java.io.File. |
static void |
openDemo()
For demonstration purposes, open a sample mini-spreadsheet in the
currently active window. |
boolean |
saveContents()
Persist the mini-spreadsheet as a file. |
void |
setContents(org.eclipse.ui.IEditorInput editorInput)
Set the mini-spreadsheet's contents using the given IEditorInput,
knowing that it has already been validated. |
org.eclipse.ui.IEditorInput |
validateEditorInput(org.eclipse.ui.IEditorInput editorInput)
Return the given editor input if it valid without attempting to adapt it. |
| Methods inherited from class com.ibm.jdg2e.msseditor.ui.AbstractMiniSSEditor |
appendRow, createPartControl, doSave, doSaveAs, getDefaultAlignment, getMiniSpreadsheet, init, isDirty, isSaveAsAllowed, rowsChanged, selectAll, selectionChanged, setAlignment, setFocus, setIsDirty, valueChanged |
| 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 |
addPropertyListener, dispose, firePropertyChange, getAdapter, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getSite, getTitle, getTitleImage, removePropertyListener, 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, dispose, getSite, getTitle, getTitleImage, removePropertyListener |
| Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
getAdapter |
MiniSSFileEditor
public MiniSSFileEditor()
createNewInput
public org.eclipse.ui.IEditorInput createNewInput(java.lang.String message)
throws org.eclipse.core.runtime.CoreException
- Create a new valid
IEditorInput for this concrete
implementation, an editor input of java.io.File.
- Specified by:
createNewInput in class AbstractMiniSSEditor
- Throws:
org.eclipse.core.runtime.CoreException
openDemo
public static void openDemo()
- For demonstration purposes, open a sample mini-spreadsheet in the
currently active window.
saveContents
public boolean saveContents()
throws org.eclipse.core.runtime.CoreException
- Persist the mini-spreadsheet as a file. Unlike the workspace-oriented
implementation, this doesn't allow for options
like Restore from Local History... (unless, of course,
we reimplemented for an RCP application like the Mini-Workplace).
- Specified by:
saveContents in class AbstractMiniSSEditor
- Throws:
org.eclipse.core.runtime.CoreException
setContents
public void setContents(org.eclipse.ui.IEditorInput editorInput)
throws org.eclipse.core.runtime.CoreException
- Set the mini-spreadsheet's contents using the given
IEditorInput,
knowing that it has already been validated.
- Specified by:
setContents in class AbstractMiniSSEditor
- Throws:
org.eclipse.core.runtime.CoreException- See Also:
validateEditorInput(IEditorInput)
validateEditorInput
public org.eclipse.ui.IEditorInput validateEditorInput(org.eclipse.ui.IEditorInput editorInput)
- Return the given editor input if it valid without attempting to adapt it.
- Specified by:
validateEditorInput in class AbstractMiniSSEditor