this class realize the axbench files preferences handle. One instance for one eclipse session. More...
Public Types | |
enum | FilePreferencesTypes { SIMPLE_PREFERENCES = ( "SIMPLE_PREFERENCES" ) } |
this enum class defines the possible preferences types. More... | |
enum | SimpleFilePreferences { AUTHORKEY = ( new QualifiedName( "Author", "mainauthor" ), true, true, Text.class, false ), VERSION = ( new QualifiedName( "Version", "0.8.0" ), true, false, Text.class, false ), FILESIZE = ( new QualifiedName( "Size", "-1" ), true, false, Text.class, true ) } |
this enum class defines the simple file preferences, which are saved inside the simpleFilePreferences map and are displayed by the general tab propertie. -->new QualifiedName(qualifier,default value), this is saved inside the preferences file More... | |
Public Member Functions | |
Object | getSimpleFilePreferencesValue (IFile file, QualifiedName name) |
void | initializeDefaultPreferences (IProject project, FilePreferencesTypes type) |
reads in all axl files from the project and initialize the default values. | |
void | initializeDefaultPreferencesForFile (IFile file, FilePreferencesTypes type) |
initialize the file preferences for one file with the default values. | |
boolean | readInFilesPreferencesFromProject (IProject project, IFile searchedfile) |
reads in all preferences for the specified file, if the project don't have a preferencesFile this method will create a default one and save it. If the searchedfile isn't inside the (currently) simpleFilesPreferences map default values will be established and the preferences will be saved. | |
boolean | saveFilePreferences (IProject project) |
saves the file preferences. 1.project name -------------- 2.SIMPLE_PREFERENCES 3.file relative path 4.content ++++++++++++++ 5.file releative path 6.type 7. .... | |
boolean | setSimpleFilePreferencesValue (IFile file, QualifiedName qualifier, Object value) |
to set a value inside the file preferences key. | |
Static Public Member Functions | |
static AXBenchFilesPreferences | getInstance () |
Static Public Attributes | |
static int | modi = 1 |
static final String | preferencesFileName = "de.fraunhofer.isst.axbench.axbenchfiles.prefs" |
the file where all preferences of all axbench files inside workspace will be saved | |
Private Member Functions | |
void | correctOldProblems (IFile searchedfile) |
this method realizes the correction of old errors and new file preferences. (relevant for files where the filepref. already exists) | |
void | deleteFilePreferencesFile (IProject project) |
deletes the file preferences file. | |
String | getFilePreferencesPath (IProject project) |
void | lookForFileAndHandle (IProject project) |
checks if the file exists, if not it creates the folder and the file. | |
Static Private Attributes | |
static AXBenchFilesPreferences | axBenchFilesPreferencesInstance = null |
static LinkedHashMap< IFile, LinkedHashMap< QualifiedName, Object > > | simpleFilesPreferences = null |
this class realize the axbench files preferences handle. One instance for one eclipse session.
this enum class defines the simple file preferences, which are saved inside the simpleFilePreferences map and are displayed by the general tab propertie. -->new QualifiedName(qualifier,default value), this is saved inside the preferences file
void de.fraunhofer.isst.axbench.utilities.AXBenchFilesPreferences.correctOldProblems | ( | IFile | searchedfile | ) | [private] |
this method realizes the correction of old errors and new file preferences. (relevant for files where the filepref. already exists)
void de.fraunhofer.isst.axbench.utilities.AXBenchFilesPreferences.deleteFilePreferencesFile | ( | IProject | project | ) | [private] |
deletes the file preferences file.
String de.fraunhofer.isst.axbench.utilities.AXBenchFilesPreferences.getFilePreferencesPath | ( | IProject | project | ) | [private] |
file |
static AXBenchFilesPreferences de.fraunhofer.isst.axbench.utilities.AXBenchFilesPreferences.getInstance | ( | ) | [static] |
Object de.fraunhofer.isst.axbench.utilities.AXBenchFilesPreferences.getSimpleFilePreferencesValue | ( | IFile | file, | |
QualifiedName | name | |||
) |
file | ||
name |
void de.fraunhofer.isst.axbench.utilities.AXBenchFilesPreferences.initializeDefaultPreferences | ( | IProject | project, | |
FilePreferencesTypes | type | |||
) |
reads in all axl files from the project and initialize the default values.
file | ||
type |
void de.fraunhofer.isst.axbench.utilities.AXBenchFilesPreferences.initializeDefaultPreferencesForFile | ( | IFile | file, | |
FilePreferencesTypes | type | |||
) |
initialize the file preferences for one file with the default values.
file | ||
type |
void de.fraunhofer.isst.axbench.utilities.AXBenchFilesPreferences.lookForFileAndHandle | ( | IProject | project | ) | [private] |
checks if the file exists, if not it creates the folder and the file.
file |
boolean de.fraunhofer.isst.axbench.utilities.AXBenchFilesPreferences.readInFilesPreferencesFromProject | ( | IProject | project, | |
IFile | searchedfile | |||
) |
reads in all preferences for the specified file, if the project don't have a preferencesFile this method will create a default one and save it. If the searchedfile isn't inside the (currently) simpleFilesPreferences map default values will be established and the preferences will be saved.
file | ||
searchedfile |
< later it has to be removed!
boolean de.fraunhofer.isst.axbench.utilities.AXBenchFilesPreferences.saveFilePreferences | ( | IProject | project | ) |
saves the file preferences. 1.project name -------------- 2.SIMPLE_PREFERENCES 3.file relative path 4.content ++++++++++++++ 5.file releative path 6.type 7. ....
file |
boolean de.fraunhofer.isst.axbench.utilities.AXBenchFilesPreferences.setSimpleFilePreferencesValue | ( | IFile | file, | |
QualifiedName | qualifier, | |||
Object | value | |||
) |
to set a value inside the file preferences key.
file | ||
qualifier | e.g. SimpleFilePreferences.AUTHORKEY.getQualifier() | |
value |
AXBenchFilesPreferences de.fraunhofer.isst.axbench.utilities.AXBenchFilesPreferences.axBenchFilesPreferencesInstance = null [static, private] |
int de.fraunhofer.isst.axbench.utilities.AXBenchFilesPreferences.modi = 1 [static] |
0 - changes are saved immediately after a value was manipulated 1 - changes are saved by clicking the confirm button
final String de.fraunhofer.isst.axbench.utilities.AXBenchFilesPreferences.preferencesFileName = "de.fraunhofer.isst.axbench.axbenchfiles.prefs" [static] |
the file where all preferences of all axbench files inside workspace will be saved
LinkedHashMap<IFile, LinkedHashMap<QualifiedName, Object> > de.fraunhofer.isst.axbench.utilities.AXBenchFilesPreferences.simpleFilesPreferences = null [static, private] |