public final class ImportUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
cleanConfig(java.util.Properties p,
java.lang.String propRoot)
Cleans the configuration related to filters from the given object.
|
static boolean |
getAddHiddenFiles(java.util.Properties p,
java.lang.String propRoot)
Returns the "add hidden files" option for the given properties.
|
static java.util.List<ImporterFileFilter> |
getFilters(VPTProject p)
Return the list of filters available for importing files.
|
static java.lang.String |
getImportFilterId(VPTProject p)
Returns the
String id of the last used import filter. |
static ImporterFileFilter |
loadFilter(java.util.Properties p,
java.util.List<ImporterFileFilter> filters,
java.lang.String propRoot)
Loads the filter information from the project, and tries to
identify a matching filter in the given list.
|
static void |
saveFilter(java.util.Properties p,
ImporterFileFilter filter,
boolean addHidden,
java.lang.String propRoot)
Saves the configuration about the selected filter to the
project.
|
static void |
saveFilter(java.util.Properties p,
ImporterFileFilter filter,
java.lang.String propRoot)
Saves the configuration about the selected filter to the
project.
|
static void |
setImportFilterId(VPTProject p,
java.lang.String id)
Sets the import filter which will be default for next import.
|
public static java.util.List<ImporterFileFilter> getFilters(VPTProject p)
public static void saveFilter(java.util.Properties p, ImporterFileFilter filter, java.lang.String propRoot)
p
- Properties object.filter
- The filter instance.propRoot
- Root of the configuration property names.public static void saveFilter(java.util.Properties p, ImporterFileFilter filter, boolean addHidden, java.lang.String propRoot)
p
- Properties object.filter
- The filter instance.addHidden
- The "add hidden files" option.propRoot
- Root of the configuration property names.public static ImporterFileFilter loadFilter(java.util.Properties p, java.util.List<ImporterFileFilter> filters, java.lang.String propRoot)
p
- Properties object.filters
- List of filters to search.propRoot
- Root of the configuration property names.public static java.lang.String getImportFilterId(VPTProject p)
String
id of the last used import filter.String
value to be used in
setImportFilterId
public static void setImportFilterId(VPTProject p, java.lang.String id)
id
- Returned from getImportFilterId
. This equals
to a String
returned by ImporterFileFilter.getId()
.public static void cleanConfig(java.util.Properties p, java.lang.String propRoot)
p
- Properties object.propRoot
- Root of the configuration property names.public static boolean getAddHiddenFiles(java.util.Properties p, java.lang.String propRoot)