public abstract class AbstractWorkingSetPage
extends org.eclipse.jface.wizard.WizardPage
implements org.eclipse.ui.dialogs.IWorkingSetPage
IWorkingSetPage
. A tree viewer on the
left is used to show the workspace content, a table viewer on the right
is used to show the working set content. Buttons to move content from right
to left and vice versa are available between the two viewers. A text field
allows to set/change the working set name.Modifier and Type | Field and Description |
---|---|
protected static org.eclipse.core.runtime.IAdaptable[] |
NO_ELEMENTS |
Constructor and Description |
---|
AbstractWorkingSetPage(java.lang.String pageName,
java.lang.String title,
org.eclipse.jface.resource.ImageDescriptor titleImage)
Creates a new wizard page with the given name, title, and image.
|
Modifier and Type | Method and Description |
---|---|
protected org.eclipse.core.runtime.IAdaptable[] |
adaptElements(org.eclipse.core.runtime.IAdaptable[] objects)
Transforms the supplied elements into elements that are suitable for
containment in the working set.
|
protected abstract void |
configureTable(org.eclipse.jface.viewers.TableViewer table)
Configures the table viewer used on the right side of the dialog.
|
protected abstract void |
configureTree(org.eclipse.jface.viewers.TreeViewer tree)
Configures the tree viewer used on the left side of the dialog.
|
void |
createControl(org.eclipse.swt.widgets.Composite parent) |
void |
finish() |
protected static org.eclipse.core.runtime.IAdaptable[] |
getAdaptables(java.lang.Object[] elements) |
protected org.eclipse.core.runtime.IAdaptable[] |
getFinalWorkingSetElements(org.eclipse.ui.IWorkingSet workingSet,
org.eclipse.core.runtime.IAdaptable[] elements)
Returns the elements that are to be set into the working set
configured by this dialog.
|
protected org.eclipse.jface.viewers.IStructuredSelection |
getInitialSelection() |
protected org.eclipse.core.runtime.IAdaptable[] |
getInitialWorkingSetElements(org.eclipse.ui.IWorkingSet workingSet)
Returns the elements that are to be shown in the table initially.
|
protected abstract java.lang.String |
getPageId()
Returns the page id as specified in the extension point
org.eclipse.ui.workingSets . |
org.eclipse.ui.IWorkingSet |
getSelection() |
protected void |
initializeTreeSelection(org.eclipse.jface.viewers.TreeViewer tree)
Sets initial selection for the tree viewer of the dialog.
|
void |
setInitialSelection(org.eclipse.jface.viewers.IStructuredSelection selection) |
void |
setSelection(org.eclipse.ui.IWorkingSet workingSet) |
canFlipToNextPage, getContainer, getDialogSettings, getImage, getName, getNextPage, getPreviousPage, getShell, getWizard, isCurrentPage, isPageComplete, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toString
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, dispose, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, setButtonLayoutData, setControl, setMessage, setVisible
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public AbstractWorkingSetPage(java.lang.String pageName, java.lang.String title, org.eclipse.jface.resource.ImageDescriptor titleImage)
pageName
- the name of the pagetitle
- the title for this wizard page,
or null
if nonetitleImage
- the image descriptor for the title of this wizard page,
or null
if nonepublic void setInitialSelection(org.eclipse.jface.viewers.IStructuredSelection selection)
public void createControl(org.eclipse.swt.widgets.Composite parent)
createControl
in interface org.eclipse.jface.dialogs.IDialogPage
public void finish()
finish
in interface org.eclipse.ui.dialogs.IWorkingSetPage
public org.eclipse.ui.IWorkingSet getSelection()
getSelection
in interface org.eclipse.ui.dialogs.IWorkingSetPage
public void setSelection(org.eclipse.ui.IWorkingSet workingSet)
setSelection
in interface org.eclipse.ui.dialogs.IWorkingSetPage
protected abstract java.lang.String getPageId()
org.eclipse.ui.workingSets
.protected abstract void configureTree(org.eclipse.jface.viewers.TreeViewer tree)
tree
- the tree viewer to configureinitializeTreeSelection(TreeViewer)
protected abstract void configureTable(org.eclipse.jface.viewers.TableViewer table)
table
- the table viewer to configureprotected final org.eclipse.jface.viewers.IStructuredSelection getInitialSelection()
protected void initializeTreeSelection(org.eclipse.jface.viewers.TreeViewer tree)
tree
- the tree viewerprotected org.eclipse.core.runtime.IAdaptable[] adaptElements(org.eclipse.core.runtime.IAdaptable[] objects)
objects
- the objects to transformprotected static org.eclipse.core.runtime.IAdaptable[] getAdaptables(java.lang.Object[] elements)
protected org.eclipse.core.runtime.IAdaptable[] getInitialWorkingSetElements(org.eclipse.ui.IWorkingSet workingSet)
null
if it does not yet exist.workingSet
- the working set to configure,
or null
if it does not yet existnull
)protected org.eclipse.core.runtime.IAdaptable[] getFinalWorkingSetElements(org.eclipse.ui.IWorkingSet workingSet, org.eclipse.core.runtime.IAdaptable[] elements)
workingSet
- the working set to configure,
or null
if it does not yet existelements
- the elements explicitly selected by the user
(never null
)null
)