|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.core.commands.common.EventManager org.eclipse.ui.part.WorkbenchPart org.eclipse.ui.part.EditorPart org.eclipse.ui.part.MultiPageEditorPart sk.uniba.euromath.editor.MultiViewXMLEditor
public class MultiViewXMLEditor
For every opening file = IEditorInput new instance is created by workbench (or by us, somewhere in rcp, openfilewizard) and view for file is added.
For opened file new view can be opened by invoking ViewPopupMenu. Navigation between views is provided by pages localized at left-bottom of editor control, there can be also invoked ViewPopupMenu.
View is defined by selecting XSLT transformation, stylesheet. So views differs by XSLT transformation used on common input with other views - edited document. View implements IEditorPart, is a true compound editor and must be EditorSite or extended.
Field Summary | |
---|---|
static String |
ID
With this id is registered as IEditorPart. |
Fields inherited from interface org.eclipse.ui.IEditorPart |
---|
PROP_DIRTY, PROP_INPUT |
Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
---|
PROP_TITLE |
Constructor Summary | |
---|---|
MultiViewXMLEditor()
Constructor. |
Method Summary | |
---|---|
void |
addViewListener(IViewListener listener)
Adds view listener. |
void |
closeActiveView()
Closes active view. |
protected void |
createPages()
Creates one view = page for document which was just opened or created. |
void |
doSave(IProgressMonitor monitor)
|
void |
doSaveAs()
|
EditorSite |
getActiveView()
Return active view. |
Object |
getAdapter(Class adapter)
|
XMLResourceManipulator |
getResourceManipulator()
|
XMLAccess |
getXMLAccess()
Returns the document instance. |
void |
init(IEditorSite site,
IEditorInput input)
|
boolean |
isSaveAsAllowed()
|
boolean |
outlineAvailable()
Tests if outline is created/ready. |
protected void |
pageChange(int newPageIndex)
When view is activated, selection is synchronized with outline. |
void |
removeViewListener(IViewListener listener)
Removes view listener. |
protected void |
setInput(IEditorInput input)
Checks if input is correct. |
Methods inherited from class org.eclipse.ui.part.MultiPageEditorPart |
---|
addPage, addPage, addPage, addPage, createPageContainer, createPartControl, createSite, dispose, getActiveEditor, getActivePage, getContainer, getControl, getEditor, getPageCount, getPageImage, getPageText, handlePropertyChange, isDirty, removePage, setActivePage, setControl, setFocus, setPageImage, setPageText |
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 |
---|
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 |
Field Detail |
---|
public static final String ID
Constructor Detail |
---|
public MultiViewXMLEditor()
Method Detail |
---|
public Object getAdapter(Class adapter)
getAdapter
in interface IAdaptable
getAdapter
in class MultiPageEditorPart
public boolean outlineAvailable()
public void init(IEditorSite site, IEditorInput input) throws PartInitException
init
in interface IEditorPart
init
in class MultiPageEditorPart
PartInitException
protected void createPages()
createPages
in class MultiPageEditorPart
protected void setInput(IEditorInput input)
setInput
in class EditorPart
public void closeActiveView()
public EditorSite getActiveView()
public final XMLAccess getXMLAccess()
protected void pageChange(int newPageIndex)
pageChange
in class MultiPageEditorPart
public void doSave(IProgressMonitor monitor)
doSave
in interface ISaveablePart
doSave
in class EditorPart
public void doSaveAs()
doSaveAs
in interface ISaveablePart
doSaveAs
in class EditorPart
public boolean isSaveAsAllowed()
isSaveAsAllowed
in interface ISaveablePart
isSaveAsAllowed
in class EditorPart
public void addViewListener(IViewListener listener)
listener
- to addpublic void removeViewListener(IViewListener listener)
listener
- to removepublic XMLResourceManipulator getResourceManipulator()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |