org.eclipse.xtext.ui.views
Class AbstractSourceView
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.ViewPart
org.eclipse.xtext.ui.views.AbstractSourceView
- All Implemented Interfaces:
- java.util.EventListener, org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.jface.util.IPropertyChangeListener, org.eclipse.ui.IPartListener2, org.eclipse.ui.IPersistable, org.eclipse.ui.ISelectionListener, org.eclipse.ui.IViewPart, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.IWorkbenchPart3, org.eclipse.ui.part.IWorkbenchPartOrientation
- Direct Known Subclasses:
- DerivedSourceView
public abstract class AbstractSourceView
- extends org.eclipse.ui.part.ViewPart
- implements org.eclipse.ui.IPartListener2, org.eclipse.ui.ISelectionListener, org.eclipse.jface.util.IPropertyChangeListener
- Since:
- 2.3
- Author:
- Michael Clay - Initial contribution and API
Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
PROP_TITLE |
Methods inherited from class org.eclipse.ui.part.ViewPart |
checkSite, getViewSite, init, init, saveState, setContentDescription, setInitializationData, setPartName |
Methods inherited from class org.eclipse.ui.part.WorkbenchPart |
addPartPropertyListener, addPropertyListener, firePartPropertyChanged, firePropertyChange, getAdapter, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, getTitleToolTip, 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, getTitleToolTip, removePropertyListener |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
getAdapter |
AbstractSourceView
public AbstractSourceView()
getWorkbenchPartSelection
public IWorkbenchPartSelection getWorkbenchPartSelection()
setWorkbenchPartSelection
protected void setWorkbenchPartSelection(IWorkbenchPartSelection workbenchPartSelection)
getSourceViewer
protected org.eclipse.jface.text.source.SourceViewer getSourceViewer()
getLanguageName
public java.lang.String getLanguageName()
createPartControl
public void createPartControl(org.eclipse.swt.widgets.Composite parent)
- Specified by:
createPartControl
in interface org.eclipse.ui.IWorkbenchPart
- Specified by:
createPartControl
in class org.eclipse.ui.part.WorkbenchPart
createSourceViewer
protected abstract org.eclipse.jface.text.source.SourceViewer createSourceViewer(org.eclipse.swt.widgets.Composite parent)
inititalizeColors
protected void inititalizeColors()
getBackgroundColorKey
protected java.lang.String getBackgroundColorKey()
inititalizeFont
protected void inititalizeFont()
getViewerFontName
protected java.lang.String getViewerFontName()
selectionChanged
public void selectionChanged(org.eclipse.ui.IWorkbenchPart workbenchPart,
org.eclipse.jface.viewers.ISelection selection)
- Specified by:
selectionChanged
in interface org.eclipse.ui.ISelectionListener
propertyChange
public void propertyChange(org.eclipse.jface.util.PropertyChangeEvent event)
- Specified by:
propertyChange
in interface org.eclipse.jface.util.IPropertyChangeListener
partVisible
public void partVisible(org.eclipse.ui.IWorkbenchPartReference ref)
- Specified by:
partVisible
in interface org.eclipse.ui.IPartListener2
partHidden
public void partHidden(org.eclipse.ui.IWorkbenchPartReference ref)
- Specified by:
partHidden
in interface org.eclipse.ui.IPartListener2
partInputChanged
public void partInputChanged(org.eclipse.ui.IWorkbenchPartReference ref)
- Specified by:
partInputChanged
in interface org.eclipse.ui.IPartListener2
partActivated
public void partActivated(org.eclipse.ui.IWorkbenchPartReference ref)
- Specified by:
partActivated
in interface org.eclipse.ui.IPartListener2
partBroughtToTop
public void partBroughtToTop(org.eclipse.ui.IWorkbenchPartReference ref)
- Specified by:
partBroughtToTop
in interface org.eclipse.ui.IPartListener2
partClosed
public void partClosed(org.eclipse.ui.IWorkbenchPartReference ref)
- Specified by:
partClosed
in interface org.eclipse.ui.IPartListener2
partDeactivated
public void partDeactivated(org.eclipse.ui.IWorkbenchPartReference ref)
- Specified by:
partDeactivated
in interface org.eclipse.ui.IPartListener2
partOpened
public void partOpened(org.eclipse.ui.IWorkbenchPartReference ref)
- Specified by:
partOpened
in interface org.eclipse.ui.IPartListener2
addPostSelectionListener
protected void addPostSelectionListener()
removePostSelectionListener
protected void removePostSelectionListener()
computeAndSetInput
public void computeAndSetInput(IWorkbenchPartSelection workbenchPartSelection)
computeAndSetInput
public void computeAndSetInput(IWorkbenchPartSelection workbenchPartSelection,
boolean forceSelection)
internalComputeAndSetInput
protected void internalComputeAndSetInput(IWorkbenchPartSelection workbenchPartSelection,
boolean forceSelection)
isValidSelection
protected boolean isValidSelection(IWorkbenchPartSelection workbenchPartSelection)
isIgnored
protected boolean isIgnored(IWorkbenchPartSelection workbenchPartSelection)
computeInput
protected java.lang.String computeInput(IWorkbenchPartSelection workbenchPartSelection)
computeDescription
protected java.lang.String computeDescription(IWorkbenchPartSelection workbenchPartSelection)
setInput
protected void setInput(java.lang.String input)
createAnnotationModel
protected org.eclipse.jface.text.source.AnnotationModel createAnnotationModel()
createDocument
protected org.eclipse.jface.text.IDocument createDocument(java.lang.String input)
selectAndReveal
protected void selectAndReveal(IWorkbenchPartSelection workbenchPartSelection)
setSelection
protected void setSelection(ITextRegion textSelection,
boolean reveal)
computeSelectedText
protected ITextRegion computeSelectedText(IWorkbenchPartSelection workbenchPartSelection)
getDisplay
protected org.eclipse.swt.widgets.Display getDisplay()
setFocus
public void setFocus()
- Specified by:
setFocus
in interface org.eclipse.ui.IWorkbenchPart
- Specified by:
setFocus
in class org.eclipse.ui.part.WorkbenchPart
dispose
public void dispose()
- Specified by:
dispose
in interface org.eclipse.ui.IWorkbenchPart
- Overrides:
dispose
in class org.eclipse.ui.part.WorkbenchPart
getEditorResource
protected org.eclipse.core.resources.IStorage getEditorResource(IWorkbenchPartSelection workbenchPartSelection)