com.ibm.jdg2e.activex.editor
Class ActiveXHTMLEditor
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.EditorPart
org.eclipse.ui.part.MultiPageEditorPart
com.ibm.jdg2e.activex.editor.ActiveXHTMLEditor
- All Implemented Interfaces:
- org.eclipse.core.runtime.IAdaptable, org.eclipse.ui.IEditorPart, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.ui.ISaveablePart, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.part.IWorkbenchPartOrientation
- public class ActiveXHTMLEditor
- extends org.eclipse.ui.part.MultiPageEditorPart
This class takes existing function and incoporate it into an
Eclipse-aware plug-in building on the Eclipse platform frameworks using the
Microsoft Web Browser control. It integrates Web Browser editing
capability into an Eclipse multi-page editor using editor input from Eclipse
resources and connecting custom actions to the workbench toolbar and menus.
The user does not use the browser in a way to navigate to a specific
document, rather the navigation occurs inside Eclipse when the user opens an
.htm file in their workspace. When the user saves the document, all changes
to the .htm file are saved in the workspace. There is no need to refresh the
workspace manually.
| Fields inherited from interface org.eclipse.ui.IEditorPart |
PROP_DIRTY, PROP_INPUT |
| Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
PROP_TITLE |
|
Method Summary |
protected void |
createPages()
This is the method which create a text editor page and a page that hosts
the IE ActiveX control. |
void |
doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
This method gets the text editor page and saves the contents. |
void |
doSaveAs()
This implements a save as on the text editor input |
ActiveXWebBrowser |
getBrowser()
A getter method to the editor page hosting the ActiveX (browser) control. |
void |
gotoMarker(org.eclipse.core.resources.IMarker marker)
|
void |
init(org.eclipse.ui.IEditorSite site,
org.eclipse.ui.IEditorInput input)
The ActiveXHTMLEditor implementation of this method checks
that the input is an instance of IFileEditorInput. |
boolean |
isDirty()
|
boolean |
isSaveAsAllowed()
|
protected void |
pageChange(int newPageIndex)
This method syncronizes the contents of the text editor input and the the
contents of the IE ActiveX control. |
| Methods inherited from class org.eclipse.ui.part.MultiPageEditorPart |
addPage, addPage, addPage, addPage, createPageContainer, createPartControl, createSite, dispose, getActiveEditor, getActivePage, getAdapter, getContainer, getControl, getEditor, getPageCount, getPageImage, getPageText, handlePropertyChange, removePage, 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 |
addPropertyListener, firePropertyChange, 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, getSite, getTitle, getTitleImage, removePropertyListener |
EDITOR_LABEL
public static final java.lang.String EDITOR_LABEL
- See Also:
- Constant Field Values
ActiveXHTMLEditor
public ActiveXHTMLEditor()
- Constructor for ActiveXHTMLEditor.
createPages
protected void createPages()
- This is the method which create a text editor page and a page that hosts
the IE ActiveX control.
- See Also:
MultiPageEditorPart.createPages()
doSave
public void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
- This method gets the text editor page and saves the contents.
- See Also:
ISaveablePart.doSave(IProgressMonitor)
doSaveAs
public void doSaveAs()
- This implements a save as on the text editor input
- See Also:
ISaveablePart.doSaveAs()
getBrowser
public ActiveXWebBrowser getBrowser()
- A getter method to the editor page hosting the ActiveX (browser) control.
gotoMarker
public void gotoMarker(org.eclipse.core.resources.IMarker marker)
- See Also:
org.eclipse.ui.IEditorPart#gotoMarker(IMarker)
init
public void init(org.eclipse.ui.IEditorSite site,
org.eclipse.ui.IEditorInput input)
throws org.eclipse.ui.PartInitException
- The
ActiveXHTMLEditor implementation of this method checks
that the input is an instance of IFileEditorInput.
- Throws:
org.eclipse.ui.PartInitException- See Also:
IEditorPart.init(IEditorSite, IEditorInput)
isDirty
public boolean isDirty()
isSaveAsAllowed
public boolean isSaveAsAllowed()
- See Also:
ISaveablePart.isSaveAsAllowed()
pageChange
protected void pageChange(int newPageIndex)
- This method syncronizes the contents of the text editor input and the the
contents of the IE ActiveX control.
- See Also:
MultiPageEditorPart.pageChange(int)