public class CreateLinkedResourceGroup
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
CreateLinkedResourceGroup.IStringValue
Helper interface intended for updating a string value based on the currently selected link target.
|
Constructor and Description |
---|
CreateLinkedResourceGroup(int type,
org.eclipse.swt.widgets.Listener listener,
CreateLinkedResourceGroup.IStringValue updatableResourceName)
Creates a link target group
|
Modifier and Type | Method and Description |
---|---|
org.eclipse.swt.widgets.Composite |
createContents(org.eclipse.swt.widgets.Composite parent)
Creates the widgets
|
void |
dispose()
Disposes the group's widgets.
|
java.net.URI |
getLinkTargetURI()
Returns the link target location entered by the user.
|
protected void |
initializeDialogUnits(org.eclipse.swt.widgets.Control control)
Initializes the computation of horizontal and vertical dialog units based on the size of current font.
|
void |
setFilterExtensions(java.lang.String[] filterExtensions)
Set the file extensions which the
FileDialog will use to filter the files it shows to the argument, which
may be null. |
void |
setLinkTarget(java.lang.String target)
Sets the value of the link target field
|
org.eclipse.core.runtime.IStatus |
validateLinkLocation(org.eclipse.core.resources.IResource linkHandle)
Validates this page's controls.
|
public CreateLinkedResourceGroup(int type, org.eclipse.swt.widgets.Listener listener, CreateLinkedResourceGroup.IStringValue updatableResourceName)
type
- specifies the type of resource to link to. IResource.FILE
or
IResource.FOLDER
listener
- listener to notify when one of the widgets' value is changed.updatableResourceName
- an updatable string value that will be updated to reflect the link target's last segment, or
null
. Updating will only happen if the current value of that string is null or the empty
string, or if it has not been changed since the last time it was updated.public org.eclipse.swt.widgets.Composite createContents(org.eclipse.swt.widgets.Composite parent)
parent
- parent composite of the widget grouppublic void dispose()
public java.net.URI getLinkTargetURI()
protected void initializeDialogUnits(org.eclipse.swt.widgets.Control control)
This method must be called before setButtonLayoutData
is called.
control
- a control from which to obtain the current fontpublic void setLinkTarget(java.lang.String target)
target
- the value of the link target fieldpublic org.eclipse.core.runtime.IStatus validateLinkLocation(org.eclipse.core.resources.IResource linkHandle)
linkHandle
- The target to checkpublic void setFilterExtensions(java.lang.String[] filterExtensions)
FileDialog
will use to filter the files it shows to the argument, which
may be null.
The strings are platform specific. For example, on some platforms, an extension filter string is typically of the form "*.extension", where "*.*" matches all files. For filters with multiple extensions, use semicolon as a separator, e.g. "*.jpg;*.png".
filterExtensions
- the filterExtensions to set on the FileDialog
opened when the user select the browse button.