java.lang.Objectorg.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.ViewPart
com.ibm.jdg2e.view.marker.MarkerView
This view example uses the workspace as its input but only for markers of
a specific type. The marker type that will be displayed has been defined
as part of the com.ibm.jdg2e.resources.extensions project.
A TableViewer is used to create the user interface.
This demonstrates some of the workspace-specific processing requirements for a view based on JFace viewers, including the user of a resource change listener to identify when there have been changes to the input.
| Nested Class Summary | |
|---|---|
(package private) static class |
MarkerView.NameSorter
Added to viewer to force alphabetical sort as-is (no other logic required). |
| Field Summary | |
|---|---|
(package private) static java.lang.String[] |
COLUMN_NAMES
Columns for the table viewer |
(package private) static java.lang.String[] |
MARKER_ATTRIBUTES
Attributes that will be obtained from the marker |
(package private) static java.lang.String |
MARKER_ID
Identifier for the marker defined by extension in the com.ibm.jdg2e.resources.extensions project. |
| Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
|---|
PROP_TITLE |
| Constructor Summary | |
|---|---|
MarkerView()
The constructor. |
|
| Method Summary | |
|---|---|
void |
createPartControl(org.eclipse.swt.widgets.Composite parent)
Define user interface for the view. |
(package private) org.eclipse.jface.viewers.TableViewer |
multiColumnViewer(org.eclipse.swt.widgets.Composite parent)
Creates a TableViewer that has a table with multiple columns. |
(package private) void |
openEditor(org.eclipse.jface.viewers.ISelection selection)
Opens the file referenced by the marker in the appropriate editor. |
void |
setFocus()
Passing the focus request to the viewer's control. |
(package private) void |
setupHelp()
Markers are displayed in the viewer in this view. |
| Methods inherited from class org.eclipse.ui.part.ViewPart |
|---|
getViewSite, init, init, saveState, setContentDescription, setInitializationData, setPartName |
| Methods inherited from class org.eclipse.ui.part.WorkbenchPart |
|---|
addPropertyListener, dispose, firePropertyChange, getAdapter, getConfigurationElement, getContentDescription, getDefaultImage, getPartName, getSite, getTitle, getTitleImage, getTitleToolTip, 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, dispose, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener |
| Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
|---|
getAdapter |
| Field Detail |
static final java.lang.String[] COLUMN_NAMES
static final java.lang.String[] MARKER_ATTRIBUTES
static final java.lang.String MARKER_ID
| Constructor Detail |
public MarkerView()
| Method Detail |
public void createPartControl(org.eclipse.swt.widgets.Composite parent)
IWorkbenchPart.createPartControl(org.eclipse.swt.widgets.Composite)org.eclipse.jface.viewers.TableViewer multiColumnViewer(org.eclipse.swt.widgets.Composite parent)
TableViewer that has a table with multiple columns.
parent -
void openEditor(org.eclipse.jface.viewers.ISelection selection)
Logic extracted from similar Eclipse actions. Some of the Eclipse actions are a bit more robust in their implementation. See org.eclipse.ui.views.markers.internal.ActionOpenMarker for a more detailed example.
selection - - the marker that will be used to open an editor.public void setFocus()
IWorkbenchPart.setFocus()void setupHelp()
com.ibm.jdg2e.resources.extensions project).
The marker help API is used to find and display any help defined for the marker being displayed.