|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.dialogs.DialogPage
org.eclipse.jface.wizard.WizardPage
de.cau.cs.kieler.core.ui.wizards.ResourceTreeAndListPage
de.cau.cs.kieler.core.ui.wizards.WorkspaceResourcesPage
public class WorkspaceResourcesPage
A wizard page that allows the user to choose files to import from the workspace. Optionally, a target group may allow the user to choose a target folder in the workspace to import to.
The settings made on this page can be saved if the wizard has an instance of
IDialogSettings
set on it. If it has not, settings are neither saved nor
loaded.
Field Summary |
---|
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider |
---|
ERROR, INFORMATION, NONE, WARNING |
Constructor Summary | |
---|---|
WorkspaceResourcesPage(String pageName,
boolean showTargetGroup,
String[] fileExtensions,
IStructuredSelection selection)
Constructs a new instance with the given name. |
Method Summary | |
---|---|
protected void |
applyNewTarget(String text)
Called when the target group combo loses focus. |
protected Composite |
createOptionsGroup(Composite parent)
Creates the options group. |
protected Composite |
createSourceGroup(Composite parent)
Creates the source group. |
protected Composite |
createTargetGroup(Composite parent)
Creates the target group. |
protected void |
doBrowseTarget()
Called when the target group browse button is clicked. |
protected boolean |
doValidate()
Validates the page. |
protected ViewerFilter[] |
getResourceListFilters()
Returns the viewer filters to be used for the resource list. |
List<IResource> |
getResources(IProgressMonitor monitor)
Returns the selected files. |
protected ViewerFilter[] |
getResourceTreeFilters()
Returns the viewer filters to be used for the resource tree. |
IPath |
getTargetContainerPath()
Returns the target container path entered by the user. |
protected IStructuredSelection |
getWorkspaceSelection()
Returns the selection the wizard was invoked on. |
protected void |
initializeControls()
Called after the controls were created and the settings restored. |
protected void |
restoreDialogSettings()
Restores the user's saved input. |
void |
saveDialogSettings()
Saves the user's input. |
Methods inherited from class org.eclipse.jface.wizard.WizardPage |
---|
canFlipToNextPage, getContainer, getDialogSettings, getImage, getName, getNextPage, getPreviousPage, getShell, getWizard, isCurrentPage, isPageComplete, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toString |
Methods inherited from class org.eclipse.jface.dialogs.DialogPage |
---|
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, dispose, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, setButtonLayoutData, setControl, setMessage, setVisible |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.jface.dialogs.IDialogPage |
---|
dispose, getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelp, setVisible |
Constructor Detail |
---|
public WorkspaceResourcesPage(String pageName, boolean showTargetGroup, String[] fileExtensions, IStructuredSelection selection)
pageName
- name of the page. Used as part of the IDs the dialog
settings are saved as.showTargetGroup
- if true
, a target group is created
where the user can select a folder in the
workspace to import to.fileExtensions
- array of allowed file name extensions without
preceding dot. May be null
.selection
- the selection on which the wizard was invoked.Method Detail |
---|
public List<IResource> getResources(IProgressMonitor monitor)
monitor
- progress monitor. May be null
.
public IPath getTargetContainerPath()
protected IStructuredSelection getWorkspaceSelection()
protected void initializeControls()
initializeControls
in class ResourceTreeAndListPage
protected ViewerFilter[] getResourceTreeFilters()
Note: This could be made more flexible to allow changeing the list of active filters after creation.
getResourceTreeFilters
in class ResourceTreeAndListPage
protected ViewerFilter[] getResourceListFilters()
Note: This could be made more flexible to allow changeing the list of active filters after creation.
getResourceListFilters
in class ResourceTreeAndListPage
protected Composite createSourceGroup(Composite parent)
Subclasses may call ResourceTreeAndListPage.createDefaultSourceGroup(Composite, String, String)
to have a default source group with a label, a combo box and a browse
button created. In this case, it should also implement ResourceTreeAndListPage.applyNewSource(String)
and ResourceTreeAndListPage.doBrowseSource()
. While access to the combo box and the browse
button shouldn't normally be necessary, they can be retrieved using
ResourceTreeAndListPage.getSourceGroupCombo()
and ResourceTreeAndListPage.getSourceGroupBrowseButton()
.
createSourceGroup
in class ResourceTreeAndListPage
parent
- the new source group's parent.
null
if none should be shown.protected Composite createTargetGroup(Composite parent)
Subclasses may call ResourceTreeAndListPage.createDefaultTargetGroup(Composite, String, String)
to have a default target group with a label, a combo box and a browse
button created. In this case, it should also implement ResourceTreeAndListPage.applyNewTarget(String)
and ResourceTreeAndListPage.doBrowseTarget()
. While access to the combo box and the browse
button shouldn't normally be necessary, they can be retrieved using
ResourceTreeAndListPage.getTargetGroupCombo()
and ResourceTreeAndListPage.getTargetGroupBrowseButton()
.
createTargetGroup
in class ResourceTreeAndListPage
parent
- the new target group's parent.
null
if none should be shown.protected void applyNewTarget(String text)
After this method was called, ResourceTreeAndListPage.validate()
is called automatically.
applyNewTarget
in class ResourceTreeAndListPage
text
- the combo's current text.protected void doBrowseTarget()
After this method was called, ResourceTreeAndListPage.validate()
is called automatically.
doBrowseTarget
in class ResourceTreeAndListPage
protected Composite createOptionsGroup(Composite parent)
createOptionsGroup
in class ResourceTreeAndListPage
parent
- the new options group's parent.
null
if none should be shown.protected boolean doValidate()
true
.
doValidate
in class ResourceTreeAndListPage
true
if the page validates fine and the page is complete,
false
otherwise.public void saveDialogSettings()
saveDialogSettings
in class ResourceTreeAndListPage
protected void restoreDialogSettings()
restoreDialogSettings
in class ResourceTreeAndListPage
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |