public class ClasspathFileInput extends Object implements Input<org.eclipse.swt.widgets.Composite>
Input
to obtain a file from the class path.Constructor and Description |
---|
ClasspathFileInput(org.eclipse.core.resources.IContainer container,
org.eclipse.swt.widgets.Shell shell)
Initiate.
|
ClasspathFileInput(org.eclipse.ui.IEditorPart editor)
Convenience constructor to use the
IProject and Shell of
the IEditorPart . |
Modifier and Type | Method and Description |
---|---|
org.eclipse.swt.widgets.Composite |
buildControl(InputContext context)
Builds the
Control . |
Object |
getValue(org.eclipse.swt.widgets.Composite control,
InputContext context)
Obtains the value from the input
Control . |
protected String |
transformToPath(org.eclipse.core.resources.IFile file)
Transforms the
IFile to the path to use. |
public ClasspathFileInput(org.eclipse.core.resources.IContainer container, org.eclipse.swt.widgets.Shell shell)
container
- IContainer
to find the file within.shell
- Shell
.public ClasspathFileInput(org.eclipse.ui.IEditorPart editor)
IProject
and Shell
of
the IEditorPart
.editor
- IEditorPart
.protected String transformToPath(org.eclipse.core.resources.IFile file)
Transforms the IFile
to the path to use.
Allows overriding for more specialised transformation.
file
- IFile
.public org.eclipse.swt.widgets.Composite buildControl(InputContext context)
Input
Control
.buildControl
in interface Input<org.eclipse.swt.widgets.Composite>
context
- InputContext
.Control
to input the value.public Object getValue(org.eclipse.swt.widgets.Composite control, InputContext context)
Input
Obtains the value from the input Control
.
The input Control
will be the one created by
Input.buildControl(InputContext)
.
getValue
in interface Input<org.eclipse.swt.widgets.Composite>
control
- Control
.context
- InputContext
.Copyright © 2005–2016. All rights reserved.