public interface IFileInterpreterProvider
Modifier and Type | Method and Description |
---|---|
boolean |
canCreateNewFile(IWorkbench workbench)
Tests whether a new file can be created at the current workbench state.
|
IFileInterpreter |
createFromFile(IAbstractFile file)
Creates a abstract file based on the given folder and file.
|
IFileInterpreter |
createNewFile(IAbstractFile file)
Should create a new file that matches the file type.
|
String |
getDescription()
Returns a description about the content of the file.
|
String |
getFileType()
Returns the file type as a string. e.g.
|
Icon |
getIcon()
Returns the icon of the file
|
IWizard |
getNewFileWizard()
Returns a wizard that can in several steps create a new file of the
providers file type.
|
boolean |
hasNewFileWizard()
Returns whether a wizard exists for this file type.
|
boolean |
matchFormat(IAbstractFile file)
Tests whether the content of the file matches the file type of the
provider.
|
boolean matchFormat(IAbstractFile file) throws FileInterpreterProviderException
file
- the file to testFileInterpreterProviderException
- -
if the file cannot be testedIFileInterpreter createFromFile(IAbstractFile file) throws FileInterpreterProviderException
file
- the file to which the project element should be assignedFileInterpreterProviderException
- -
if the file cannot be readIFileInterpreter createNewFile(IAbstractFile file) throws FileInterpreterProviderException
file
- the file that should be createdFileInterpreterProviderException
- -
if the file cannot be createdString getFileType()
String getDescription()
Icon getIcon()
IWizard getNewFileWizard()
boolean hasNewFileWizard()
boolean canCreateNewFile(IWorkbench workbench)
workbench
- the current workbench