|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.EditorPart
org.eclipse.ui.part.MultiPageEditorPart
org.eclipse.xsd.presentation.XSDEditor
This is a an example of a xsd model editor.
| Nested Class Summary | |
static class |
XSDEditor.ActionBarContributor
This is the contributor for the XSD model editor. |
static class |
XSDEditor.GenericXMLLoadAction
|
static class |
XSDEditor.GenericXMLResourceFactoryImpl
|
static class |
XSDEditor.GenericXMLResourceImpl
|
| Field Summary | |
protected org.eclipse.ui.views.contentoutline.IContentOutlinePage |
contentOutlinePage
This is the content outline page. |
protected org.eclipse.jface.action.IStatusLineManager |
contentOutlineStatusLineManager
This is a kludge... |
protected org.eclipse.jface.viewers.TreeViewer |
contentOutlineViewer
This is the content outline page's viewer. |
protected org.eclipse.jface.viewers.Viewer |
currentViewer
This keeps track of the active content viewer, which may be either one of the viewers in the pages or the content outline viewer. |
protected org.eclipse.emf.common.ui.ViewerPane |
currentViewerPane
This keeps track of the active viewer pane, in the book. |
protected org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain |
editingDomain
This keeps track of the editing domain that is used to track all changes to the model. |
protected org.eclipse.jface.viewers.ISelection |
editorSelection
This keeps track of the selection of the editor as a whole. |
protected boolean |
handledStructuredModelChange
|
protected org.eclipse.ui.IPartListener |
partListener
This listens for when things becomes active. |
protected org.eclipse.ui.views.properties.PropertySheetPage |
propertySheetPage
This is the property sheet page. |
protected org.eclipse.jface.viewers.ISelectionChangedListener |
selectionChangedListener
This listens to which ever viewer is active. |
protected Collection |
selectionChangedListeners
This keeps track of all the ISelectionChangedListeners that are listening to this editor. |
protected org.eclipse.xsd.presentation.XSDEditor.SelectDiagnosticAction |
selectNextDiagnosticsAction
This is the outline action to select the next unresolved component. |
protected org.eclipse.xsd.presentation.XSDEditor.SelectUseAction |
selectNextUseAction
This is the outline action to select the next use of a component. |
protected org.eclipse.xsd.presentation.XSDEditor.SelectDiagnosticAction |
selectPreviousDiagnosticsAction
This is the outline action to select the previous unresolved component. |
protected org.eclipse.xsd.presentation.XSDEditor.SelectUseAction |
selectPreviousUseAction
This is the outline action to select the previous use of a component. |
protected XSDItemProviderAdapterFactory |
semanticAdapterFactory
This is the adapter factory used for providing the semantic views of the model. |
protected org.eclipse.jface.viewers.TreeViewer |
semanticSelectionViewer
This is the semantic viewer that shadows the selection in the content outline. |
protected org.eclipse.jface.text.source.ISourceViewer |
sourceViewer
|
protected XSDItemProviderAdapterFactory |
syntacticAdapterFactory
This is the adapter factory used for providing the syntactive views of the model. |
protected org.eclipse.jface.viewers.TreeViewer |
syntacticSelectionViewer
This is the syntactic viewer that shadows the selection in the content outline. |
protected org.eclipse.ui.editors.text.TextEditor |
textEditor
This source part of the editor. |
protected boolean |
validateAutomatically
|
protected XSDSchema |
xsdSchema
This keeps track of the root object of the model. |
| Fields inherited from interface org.eclipse.ui.IEditorPart |
PROP_DIRTY, PROP_INPUT |
| Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
PROP_TITLE |
| Constructor Summary | |
XSDEditor()
This creates a model editor. |
|
| Method Summary | |
void |
addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
This implements ISelectionProvider. |
protected void |
createContextMenuFor(org.eclipse.jface.viewers.StructuredViewer viewer)
This creates a context menu for the viewer and adds a listener as well registering the menu for extension. |
protected void |
createModel()
|
void |
createPages()
This is the method used by the framework to install your own controls. |
protected void |
createResource(String uri)
|
protected void |
createSemanticsPage()
|
protected void |
createSourcePage()
|
protected void |
createSyntaxPage()
|
protected String |
determineEncoding()
|
void |
dispose()
This is called when the editor is disposed. |
void |
doSave(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
This is for implementing IEditorPart and simply saves the model file. |
void |
doSaveAs()
This also changes the editor's input. |
protected void |
extendedCreateResource(String uri)
|
Element |
findBestElement(Element element,
int line,
int column)
|
protected void |
firePropertyChange(int action)
This is here for the listener to be able to call it. |
org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor |
getActionBarContributor()
This convenience method provides typed access to the contributor. |
org.eclipse.ui.IActionBars |
getActionBars()
This convenience method provides access to the actionbars. |
Object |
getAdapter(Class key)
This is how the framework determines which interfaces we implement. |
org.eclipse.ui.views.contentoutline.IContentOutlinePage |
getContentOutlinePage()
This accesses a cached version of the content outliner. |
org.eclipse.emf.edit.domain.EditingDomain |
getEditingDomain()
This returns the editing domain as required by the IEditingDomainProvider interface.
|
org.eclipse.ui.views.properties.IPropertySheetPage |
getPropertySheetPage()
This accesses a cached version of the property sheet. |
static XSDConcreteComponent |
getResolvedObject(XSDConcreteComponent xsdConcreteComponent)
This is a utility function to resolve a component. |
org.eclipse.jface.viewers.ISelection |
getSelection()
This implements ISelectionProvider to return this editor's overall selection. |
org.eclipse.jface.viewers.Viewer |
getViewer()
This returns the viewer as required by the IViewerProvider interface. |
void |
gotoMarker(org.eclipse.core.resources.IMarker marker)
|
void |
handleContentOutlineSelection(org.eclipse.jface.viewers.ISelection selection)
This deals with how we want selection in the outliner to affect the other views. |
void |
handleContentOutlineSelectionForTextEditor(org.eclipse.jface.viewers.ISelection selection,
boolean reveal)
This deals with how we want selection in the outliner to affect the text editor. |
protected void |
handleDiagnostics(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
|
protected void |
handleDocumentChange()
|
protected void |
handlePartActivated(org.eclipse.ui.IWorkbenchPart workbenchPart)
This handles part activation. |
void |
handleSelectedNodes(Collection nodes)
|
protected void |
handleSourceCaretPosition()
|
protected void |
handleStructuredModelChange()
|
void |
init(org.eclipse.ui.IEditorSite site,
org.eclipse.ui.IEditorInput editorInput)
This is called during startup. |
protected void |
initializeMarkerPosition(org.eclipse.core.resources.IMarker marker,
XSDDiagnostic xsdDiagnostic)
|
boolean |
isDirty()
This is for implementing IEditorPart and simply tests the command stack. |
boolean |
isSaveAsAllowed()
This always returns false because it is not current supported. |
boolean |
isValidateAutomatically()
|
void |
menuAboutToShow(org.eclipse.jface.action.IMenuManager menuManager)
This implements IMenuListener to help fill the context menus with contributions from the Edit menu. |
protected void |
pageChange(int pageIndex)
This is used to track the active viewer. |
void |
removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
This implements ISelectionProvider. |
void |
setCurrentViewer(org.eclipse.jface.viewers.Viewer viewer)
This makes sure that one content viewer, either for the current page or the outline view, if it has focus, is the current one. |
void |
setCurrentViewerPane(org.eclipse.emf.common.ui.ViewerPane viewerPane)
|
void |
setFocus()
|
void |
setSelection(org.eclipse.jface.viewers.ISelection selection)
This implements ISelectionProvider to set this editor's overall selection.
|
void |
setSelectionToViewer(Collection collection)
This sets the selection into whichever viewer is active. |
void |
setStatusLineManager(org.eclipse.jface.viewers.ISelection selection)
This shows the selection on the status line. |
void |
setValidateAutomatically(boolean validateAutomatically)
|
protected void |
standardCreateResource(String uri)
|
protected void |
updateActions()
|
| Methods inherited from class org.eclipse.ui.part.MultiPageEditorPart |
addPage, addPage, createPartControl, createSite, getActiveEditor, getActivePage, getContainer, getControl, getEditor, getPageCount, getPageImage, getPageText, handlePropertyChange, removePage, setActivePage, setControl, setPageImage, setPageText |
| Methods inherited from class org.eclipse.ui.part.EditorPart |
getEditorInput, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setContentDescription, setInitializationData, setInput, setPartName |
| Methods inherited from class org.eclipse.ui.part.WorkbenchPart |
addPropertyListener, getConfigurationElement, getContentDescription, getDefaultImage, getPartName, getSite, getTitle, getTitleImage, removePropertyListener, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy |
| 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 |
protected XSDSchema xsdSchema
protected org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain editingDomain
protected XSDItemProviderAdapterFactory syntacticAdapterFactory
protected XSDItemProviderAdapterFactory semanticAdapterFactory
protected org.eclipse.ui.views.contentoutline.IContentOutlinePage contentOutlinePage
protected org.eclipse.jface.action.IStatusLineManager contentOutlineStatusLineManager
protected org.eclipse.jface.viewers.TreeViewer contentOutlineViewer
protected org.eclipse.ui.views.properties.PropertySheetPage propertySheetPage
protected org.eclipse.ui.editors.text.TextEditor textEditor
protected org.eclipse.jface.text.source.ISourceViewer sourceViewer
protected org.eclipse.jface.viewers.TreeViewer syntacticSelectionViewer
protected org.eclipse.jface.viewers.TreeViewer semanticSelectionViewer
protected org.eclipse.emf.common.ui.ViewerPane currentViewerPane
protected org.eclipse.jface.viewers.Viewer currentViewer
protected org.eclipse.jface.viewers.ISelectionChangedListener selectionChangedListener
protected Collection selectionChangedListeners
ISelectionChangedListeners that are listening to this editor.
protected org.eclipse.jface.viewers.ISelection editorSelection
protected org.eclipse.xsd.presentation.XSDEditor.SelectDiagnosticAction selectNextDiagnosticsAction
protected org.eclipse.xsd.presentation.XSDEditor.SelectDiagnosticAction selectPreviousDiagnosticsAction
protected org.eclipse.xsd.presentation.XSDEditor.SelectUseAction selectNextUseAction
protected org.eclipse.xsd.presentation.XSDEditor.SelectUseAction selectPreviousUseAction
protected org.eclipse.ui.IPartListener partListener
protected boolean handledStructuredModelChange
protected boolean validateAutomatically
| Constructor Detail |
public XSDEditor()
| Method Detail |
protected void updateActions()
protected String determineEncoding()
protected void handleStructuredModelChange()
protected void handlePartActivated(org.eclipse.ui.IWorkbenchPart workbenchPart)
protected void firePropertyChange(int action)
public void setSelectionToViewer(Collection collection)
public org.eclipse.emf.edit.domain.EditingDomain getEditingDomain()
IEditingDomainProvider interface.
This is important for implementing the static methods of AdapterFactoryEditingDomain
and for supporting CommandAction.
getEditingDomain in interface org.eclipse.emf.edit.domain.IEditingDomainProviderpublic void setCurrentViewerPane(org.eclipse.emf.common.ui.ViewerPane viewerPane)
public void setCurrentViewer(org.eclipse.jface.viewers.Viewer viewer)
public org.eclipse.jface.viewers.Viewer getViewer()
IViewerProvider interface.
getViewer in interface org.eclipse.emf.common.ui.viewer.IViewerProviderprotected void createContextMenuFor(org.eclipse.jface.viewers.StructuredViewer viewer)
public void createPages()
protected void createResource(String uri)
protected void standardCreateResource(String uri)
protected void extendedCreateResource(String uri)
protected void createModel()
protected void handleSourceCaretPosition()
public Element findBestElement(Element element,
int line,
int column)
public void handleSelectedNodes(Collection nodes)
protected void handleDocumentChange()
protected void createSourcePage()
protected void createSemanticsPage()
protected void createSyntaxPage()
protected void initializeMarkerPosition(org.eclipse.core.resources.IMarker marker,
XSDDiagnostic xsdDiagnostic)
throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreExceptionprotected void handleDiagnostics(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
protected void pageChange(int pageIndex)
public Object getAdapter(Class key)
getAdapter in interface org.eclipse.core.runtime.IAdaptablepublic static XSDConcreteComponent getResolvedObject(XSDConcreteComponent xsdConcreteComponent)
public org.eclipse.ui.views.contentoutline.IContentOutlinePage getContentOutlinePage()
public org.eclipse.ui.views.properties.IPropertySheetPage getPropertySheetPage()
public void handleContentOutlineSelection(org.eclipse.jface.viewers.ISelection selection)
public void handleContentOutlineSelectionForTextEditor(org.eclipse.jface.viewers.ISelection selection,
boolean reveal)
public boolean isDirty()
IEditorPart and simply tests the command stack.
isDirty in interface org.eclipse.ui.ISaveablePartpublic void doSave(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
IEditorPart and simply saves the model file.
doSave in interface org.eclipse.ui.ISaveablePartpublic boolean isSaveAsAllowed()
isSaveAsAllowed in interface org.eclipse.ui.ISaveablePartpublic void doSaveAs()
doSaveAs in interface org.eclipse.ui.ISaveablePartpublic void gotoMarker(org.eclipse.core.resources.IMarker marker)
public void init(org.eclipse.ui.IEditorSite site,
org.eclipse.ui.IEditorInput editorInput)
throws org.eclipse.ui.PartInitException
init in interface org.eclipse.ui.IEditorPartorg.eclipse.ui.PartInitExceptionpublic void setFocus()
setFocus in interface org.eclipse.ui.IWorkbenchPartpublic void addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
ISelectionProvider.
addSelectionChangedListener in interface org.eclipse.jface.viewers.ISelectionProviderpublic void removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
ISelectionProvider.
removeSelectionChangedListener in interface org.eclipse.jface.viewers.ISelectionProviderpublic org.eclipse.jface.viewers.ISelection getSelection()
ISelectionProvider to return this editor's overall selection.
getSelection in interface org.eclipse.jface.viewers.ISelectionProviderpublic void setSelection(org.eclipse.jface.viewers.ISelection selection)
ISelectionProvider to set this editor's overall selection.
Calling this result will notify the listeners.
setSelection in interface org.eclipse.jface.viewers.ISelectionProviderpublic void setStatusLineManager(org.eclipse.jface.viewers.ISelection selection)
public void menuAboutToShow(org.eclipse.jface.action.IMenuManager menuManager)
IMenuListener to help fill the context menus with contributions from the Edit menu.
menuAboutToShow in interface org.eclipse.jface.action.IMenuListenerpublic org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor getActionBarContributor()
public org.eclipse.ui.IActionBars getActionBars()
public void dispose()
dispose in interface org.eclipse.ui.IWorkbenchPartpublic void setValidateAutomatically(boolean validateAutomatically)
public boolean isValidateAutomatically()
|
Copyright 2001-2004 IBM Corporation and others. All Rights Reserved. |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||