Class JSONCheckSettingsProfileStore
java.lang.Object
com.e1c.g5.v8.dt.internal.check.settings.JSONCheckSettingsProfileStore
- All Implemented Interfaces:
IProjectCheckSettingsProfileStore
public class JSONCheckSettingsProfileStore
extends Object
implements IProjectCheckSettingsProfileStore
JSON format profile store
-
Constructor Summary
ConstructorsConstructorDescriptionJSONCheckSettingsProfileStore(org.eclipse.core.resources.IProject project, ICheckRepository checkRepository) Constructs an instance of the store -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteProfile(String profileName) Deletes the given profile from the store.voidduplicateProfile(String sourceProfileName, String destinationProfileName) Duplicates given profile and names it accordinglyvoidexportSettingsProfile(String profileName, Path destinationPath) Exports an existing settings profile into the selected destination file The operation quietly replaces the existing file in the destination folder if any.Gets the name of the active profile.Gets the names of existing profilesvoidimportSettingsProfile(Path sourcePath) Imports an external settings profile into the project's set of profiles.booleanChecks if the massive automatic check pre-computation process is disabledLoads the data from the store (if exists)voidrenameProfile(String currentProfileName, String newProfileName) Renames the settings profile using the provided name.voidsave(Map<CheckUid, ProfileCheckSettingsData> settingsData, String profileName) Saves the given data to the given profilevoidsetActiveProfile(String newProfileName, boolean isDefaultProfile) Sets active profile and stores in the corresponding preferencesvoidsetMassiveCheckProcessDisabled(boolean massiveCheckProcessDisabled) Sets/resets massive check mode
-
Constructor Details
-
JSONCheckSettingsProfileStore
public JSONCheckSettingsProfileStore(org.eclipse.core.resources.IProject project, ICheckRepository checkRepository) Constructs an instance of the store- Parameters:
project- Project which contains stored files and preferences
-
-
Method Details
-
deleteProfile
Description copied from interface:IProjectCheckSettingsProfileStoreDeletes the given profile from the store. Ignores non-existing profile names quietly- Specified by:
deleteProfilein interfaceIProjectCheckSettingsProfileStore- Parameters:
profileName- The name of the profile to delete. May not benull
-
duplicateProfile
Description copied from interface:IProjectCheckSettingsProfileStoreDuplicates given profile and names it accordingly- Specified by:
duplicateProfilein interfaceIProjectCheckSettingsProfileStore- Parameters:
sourceProfileName- The source profile name. May not benulldestinationProfileName- The destination profile name. May not benull. Must be unqique among currently registered profiles
-
exportSettingsProfile
Description copied from interface:IProjectCheckSettingsProfileStoreExports an existing settings profile into the selected destination file The operation quietly replaces the existing file in the destination folder if any.- Specified by:
exportSettingsProfilein interfaceIProjectCheckSettingsProfileStore- Parameters:
profileName- The name of the profile. May not benulldestinationPath- The destination path to write the profile into. It'a full file path, not a folder. May not benull
-
getActiveProfileName
Description copied from interface:IProjectCheckSettingsProfileStoreGets the name of the active profile.- Specified by:
getActiveProfileNamein interfaceIProjectCheckSettingsProfileStore- Returns:
- The name of the active profile. May be
nullin case if the active profile still not set/data is cleared
-
getExistingProfileNames
Description copied from interface:IProjectCheckSettingsProfileStoreGets the names of existing profiles- Specified by:
getExistingProfileNamesin interfaceIProjectCheckSettingsProfileStore- Returns:
- The list of existing profile names. Never
null
-
importSettingsProfile
Description copied from interface:IProjectCheckSettingsProfileStoreImports an external settings profile into the project's set of profiles. The operation quietly replaces the existing file if any.- Specified by:
importSettingsProfilein interfaceIProjectCheckSettingsProfileStore- Parameters:
sourcePath- The path to the profile. May not benull
-
load
Description copied from interface:IProjectCheckSettingsProfileStoreLoads the data from the store (if exists)- Specified by:
loadin interfaceIProjectCheckSettingsProfileStore- Parameters:
profileName- The name of the profile. May not benull- Returns:
- The profile's data. Never
null
-
renameProfile
Description copied from interface:IProjectCheckSettingsProfileStoreRenames the settings profile using the provided name.- Specified by:
renameProfilein interfaceIProjectCheckSettingsProfileStore- Parameters:
currentProfileName- Current name of the profile. May not benull
-
save
Description copied from interface:IProjectCheckSettingsProfileStoreSaves the given data to the given profile- Specified by:
savein interfaceIProjectCheckSettingsProfileStore- Parameters:
settingsData- The data to save. May not benullprofileName- The name of the profile. May not benull
-
setActiveProfile
Description copied from interface:IProjectCheckSettingsProfileStoreSets active profile and stores in the corresponding preferences- Specified by:
setActiveProfilein interfaceIProjectCheckSettingsProfileStore- Parameters:
newProfileName- The name of the profile. May not benullisDefaultProfile- The default profile set, with preferences clearance
-
isMassiveCheckProcessDisabled
public boolean isMassiveCheckProcessDisabled()Description copied from interface:IProjectCheckSettingsProfileStoreChecks if the massive automatic check pre-computation process is disabled- Specified by:
isMassiveCheckProcessDisabledin interfaceIProjectCheckSettingsProfileStore- Returns:
- True if the process is disabled
-
setMassiveCheckProcessDisabled
public void setMassiveCheckProcessDisabled(boolean massiveCheckProcessDisabled) Description copied from interface:IProjectCheckSettingsProfileStoreSets/resets massive check mode- Specified by:
setMassiveCheckProcessDisabledin interfaceIProjectCheckSettingsProfileStore- Parameters:
massiveCheckProcessDisabled- The mode to set
-