|
JIVE Platform Release 0.3.1 |
|||||||||
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.ViewPart edu.buffalo.cse.jive.ui.AbstractJiveView
public abstract class AbstractJiveView
An abstract view part used to present IJiveDebugTarget
s. The view
part supports viewing multiple targets using a drop down action to switch
between them. In order for a target to be displayed, it must be present in
the launch manager. As a convenience, the view also provides actions to
remove terminated launches in a fashion similar to that of the Console view.
Clients offering views of a JIVE model should derive from this class either directly or indirectly.
AbstractStructuredJiveView
,
AbstractGraphicalJiveView
Field Summary | |
---|---|
protected static String |
DISPLAY_TARGET_GROUP
The group used to hold the action used to switch between targets. |
protected static String |
REMOVE_TERMINATED_GROUP
The group used to hold actions having to do with removing terminated launches. |
protected static String |
STEP_CONTROLS_GROUP
The group used to hold actions having to do with stepping through a program in both directions. |
Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
---|
PROP_TITLE |
Constructor Summary | |
---|---|
AbstractJiveView()
Constructs the view. |
Method Summary | |
---|---|
protected void |
addUpdatableAction(IUpdatableAction action)
Adds an IUpdatableAction to the list of actions that must be
updated when the active target changes. |
protected void |
configurePullDownMenu(IMenuManager manager)
Configures the view's pull-down menu with actions. |
protected void |
configureToolBar(IToolBarManager manager)
Adds the actions to the tool bar using the supplied tool bar manager. |
protected void |
createActions()
Creates the actions that will be used by the view. |
protected abstract void |
createContextMenu()
Creates the context menu for the view. |
void |
createPartControl(Composite parent)
|
void |
display(IJiveDebugTarget target)
Changes the view to present the supplied IJiveDebugTarget ,
making it the new active target. |
void |
dispose()
|
protected abstract String |
getDefaultContentDescription()
Returns the content description to be used when there is no active target. |
protected abstract ImageDescriptor |
getDisplayDropDownDisabledImageDescriptor()
Returns the ImageDescriptor of the image to be used for the
DisplayTargetDropDownAction when it is disabled. |
protected abstract ImageDescriptor |
getDisplayDropDownEnabledImageDescriptor()
Returns the ImageDescriptor of the image to be used for the
DisplayTargetDropDownAction when it is enabled. |
IJiveDebugTarget |
getDisplayed()
Returns the IJiveDebugTarget that is currently being
presented by the view. |
protected abstract String |
getDisplayTargetDropDownText()
Returns the text to be used for the DisplayTargetDropDownAction . |
void |
handleDebugEvents(DebugEvent[] events)
|
protected abstract void |
initializeViewer(Composite parent)
Called immediately in createPartControl(Composite) to initialize
the internal viewer for the view. |
void |
launchAdded(ILaunch launch)
|
void |
launchChanged(ILaunch launch)
|
void |
launchRemoved(ILaunch launch)
|
void |
propertyChange(PropertyChangeEvent event)
|
void |
selectionChanged(IWorkbenchPart part,
ISelection selection)
|
protected abstract void |
setViewerInput(IJiveDebugTarget target)
Sets the internal viewer's input to that of the supplied target. |
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, setFocus, 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.IViewPart |
---|
getViewSite, init, init, saveState |
Methods inherited from interface org.eclipse.ui.IWorkbenchPart |
---|
addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener, setFocus |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
---|
getAdapter |
Field Detail |
---|
protected static final String REMOVE_TERMINATED_GROUP
protected static final String STEP_CONTROLS_GROUP
protected static final String DISPLAY_TARGET_GROUP
Constructor Detail |
---|
public AbstractJiveView()
Method Detail |
---|
public void createPartControl(Composite parent)
createPartControl
in interface IWorkbenchPart
createPartControl
in class WorkbenchPart
public void dispose()
dispose
in interface IWorkbenchPart
dispose
in class WorkbenchPart
protected abstract void initializeViewer(Composite parent)
createPartControl(Composite)
to initialize
the internal viewer for the view. Subclasses must implement this method
for the specific framework being used.
parent
- the parent widget of the viewerprotected void createActions()
protected abstract void createContextMenu()
protected void configureToolBar(IToolBarManager manager)
manager
- the manager used to add the actions to the tool barprotected void configurePullDownMenu(IMenuManager manager)
manager
- the menu manager in which to add actionspublic IJiveDebugTarget getDisplayed()
IJiveView
IJiveDebugTarget
that is currently being
presented by the view. If there isn't an active target, then
null
is returned.
getDisplayed
in interface IJiveView
null
if there
isn't onepublic void display(IJiveDebugTarget target)
IJiveView
IJiveDebugTarget
,
making it the new active target. Implementers may determine if the
target should actually be presented.
This method should only be called on the UI thread. In order for non-UI threads to invoke this method, the following can be done.
IJiveView view = ... ; IJiveDebugTarget target = ... ; Display display = JiveUITools.getStandardDisplay(); display.syncExec(new Runnable() { public void run() { view.display(target); } });
display
in interface IJiveView
target
- the target to display in the viewJiveUITools.getStandardDisplay()
,
Display#asyncExec(Runnable)
,
Display#syncExec(Runnable)
protected abstract void setViewerInput(IJiveDebugTarget target)
target
- the target to set as input.protected void addUpdatableAction(IUpdatableAction action)
IUpdatableAction
to the list of actions that must be
updated when the active target changes.
action
- the action to addpublic void launchAdded(ILaunch launch)
launchAdded
in interface ILaunchListener
public void launchChanged(ILaunch launch)
launchChanged
in interface ILaunchListener
public void launchRemoved(ILaunch launch)
launchRemoved
in interface ILaunchListener
public void handleDebugEvents(DebugEvent[] events)
handleDebugEvents
in interface IDebugEventSetListener
public void propertyChange(PropertyChangeEvent event)
propertyChange
in interface IPropertyChangeListener
public void selectionChanged(IWorkbenchPart part, ISelection selection)
selectionChanged
in interface ISelectionListener
protected abstract String getDefaultContentDescription()
ViewPart.setContentDescription(String)
protected abstract String getDisplayTargetDropDownText()
DisplayTargetDropDownAction
.
protected abstract ImageDescriptor getDisplayDropDownEnabledImageDescriptor()
ImageDescriptor
of the image to be used for the
DisplayTargetDropDownAction
when it is enabled.
protected abstract ImageDescriptor getDisplayDropDownDisabledImageDescriptor()
ImageDescriptor
of the image to be used for the
DisplayTargetDropDownAction
when it is disabled.
|
JIVE Platform Release 0.3.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |