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 TypeMethodDescriptionvoid
deleteProfile
(String profileName) Deletes the given profile from the store.void
duplicateProfile
(String sourceProfileName, String destinationProfileName) Duplicates given profile and names it accordinglyvoid
exportSettingsProfile
(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 profilesvoid
importSettingsProfile
(Path sourcePath) Imports an external settings profile into the project's set of profiles.boolean
Checks if the massive automatic check pre-computation process is disabledLoads the data from the store (if exists)void
renameProfile
(String currentProfileName, String newProfileName) Renames the settings profile using the provided name.void
save
(Map<CheckUid, ProfileCheckSettingsData> settingsData, String profileName) Saves the given data to the given profilevoid
setActiveProfile
(String newProfileName, boolean isDefaultProfile) Sets active profile and stores in the corresponding preferencesvoid
setMassiveCheckProcessDisabled
(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:IProjectCheckSettingsProfileStore
Deletes the given profile from the store. Ignores non-existing profile names quietly- Specified by:
deleteProfile
in interfaceIProjectCheckSettingsProfileStore
- Parameters:
profileName
- The name of the profile to delete. May not benull
-
duplicateProfile
Description copied from interface:IProjectCheckSettingsProfileStore
Duplicates given profile and names it accordingly- Specified by:
duplicateProfile
in interfaceIProjectCheckSettingsProfileStore
- Parameters:
sourceProfileName
- The source profile name. May not benull
destinationProfileName
- The destination profile name. May not benull
. Must be unqique among currently registered profiles
-
exportSettingsProfile
Description copied from interface:IProjectCheckSettingsProfileStore
Exports an existing settings profile into the selected destination file The operation quietly replaces the existing file in the destination folder if any.- Specified by:
exportSettingsProfile
in interfaceIProjectCheckSettingsProfileStore
- Parameters:
profileName
- The name of the profile. May not benull
destinationPath
- The destination path to write the profile into. It'a full file path, not a folder. May not benull
-
getActiveProfileName
Description copied from interface:IProjectCheckSettingsProfileStore
Gets the name of the active profile.- Specified by:
getActiveProfileName
in interfaceIProjectCheckSettingsProfileStore
- Returns:
- The name of the active profile. May be
null
in case if the active profile still not set/data is cleared
-
getExistingProfileNames
Description copied from interface:IProjectCheckSettingsProfileStore
Gets the names of existing profiles- Specified by:
getExistingProfileNames
in interfaceIProjectCheckSettingsProfileStore
- Returns:
- The list of existing profile names. Never
null
-
importSettingsProfile
Description copied from interface:IProjectCheckSettingsProfileStore
Imports an external settings profile into the project's set of profiles. The operation quietly replaces the existing file if any.- Specified by:
importSettingsProfile
in interfaceIProjectCheckSettingsProfileStore
- Parameters:
sourcePath
- The path to the profile. May not benull
-
load
Description copied from interface:IProjectCheckSettingsProfileStore
Loads the data from the store (if exists)- Specified by:
load
in interfaceIProjectCheckSettingsProfileStore
- Parameters:
profileName
- The name of the profile. May not benull
- Returns:
- The profile's data. Never
null
-
renameProfile
Description copied from interface:IProjectCheckSettingsProfileStore
Renames the settings profile using the provided name.- Specified by:
renameProfile
in interfaceIProjectCheckSettingsProfileStore
- Parameters:
currentProfileName
- Current name of the profile. May not benull
-
save
Description copied from interface:IProjectCheckSettingsProfileStore
Saves the given data to the given profile- Specified by:
save
in interfaceIProjectCheckSettingsProfileStore
- Parameters:
settingsData
- The data to save. May not benull
profileName
- The name of the profile. May not benull
-
setActiveProfile
Description copied from interface:IProjectCheckSettingsProfileStore
Sets active profile and stores in the corresponding preferences- Specified by:
setActiveProfile
in interfaceIProjectCheckSettingsProfileStore
- Parameters:
newProfileName
- The name of the profile. May not benull
isDefaultProfile
- The default profile set, with preferences clearance
-
isMassiveCheckProcessDisabled
public boolean isMassiveCheckProcessDisabled()Description copied from interface:IProjectCheckSettingsProfileStore
Checks if the massive automatic check pre-computation process is disabled- Specified by:
isMassiveCheckProcessDisabled
in interfaceIProjectCheckSettingsProfileStore
- Returns:
- True if the process is disabled
-
setMassiveCheckProcessDisabled
public void setMassiveCheckProcessDisabled(boolean massiveCheckProcessDisabled) Description copied from interface:IProjectCheckSettingsProfileStore
Sets/resets massive check mode- Specified by:
setMassiveCheckProcessDisabled
in interfaceIProjectCheckSettingsProfileStore
- Parameters:
massiveCheckProcessDisabled
- The mode to set
-