Package com.e1c.langtool.storage
Interface IStorageSettingsManager
- All Superinterfaces:
IManagedService
- All Known Implementing Classes:
StorageSettingsManager
The Interface IStorageSettingsManager.
Allows to get and to save storage IDs available for the project.
Storage id is
String of ITranslationStorageProvider id and providers segment.-
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the settings change listener.getReadStorageIds(org.eclipse.core.resources.IProject project) Gets only available (enabled) settings for the project.getSettingsOrDefault(org.eclipse.core.resources.IProject project) Gets the storage settings by the project or default configured settings by the project type.booleanisStorageAvailable(org.eclipse.core.resources.IProject project, StorageID storageId) Check that storage with givenstorageIdis available for the specifiedproject.voidRemoves the settings change listener.voidsaveDefaultEditingStorageId(org.eclipse.core.resources.IProject project, StorageID id) Save default editing storage id for the project.voidsaveReadSettings(org.eclipse.core.resources.IProject project, List<StorageSettings> settings) Save the list of settings for the project.voidsaveReadStorageIds(org.eclipse.core.resources.IProject project, List<StorageID> ids) Saves the available storage ids for the project.voidsaveSettings(org.eclipse.core.resources.IProject project, ProjectStorageSettings settings, org.eclipse.core.runtime.IProgressMonitor monitor) Saves the project storage settings into the file of the project in/.settings/translation_storages.ymlMethods inherited from interface com._1c.g5.wiring.IManagedService
activate, deactivate
-
Method Details
-
getSettingsOrDefault
Gets the storage settings by the project or default configured settings by the project type.- Parameters:
project- the translating project (the project of the source code), cannot benull.- Returns:
- the settings or default, cannot return
null.
-
saveSettings
void saveSettings(org.eclipse.core.resources.IProject project, ProjectStorageSettings settings, org.eclipse.core.runtime.IProgressMonitor monitor) Saves the project storage settings into the file of the project in/.settings/translation_storages.yml- Parameters:
project- the translating project to save, cannot benull.settings- the settings, cannot benull.monitor- the monitor, cannot benull.
-
getReadStorageIds
Gets only available (enabled) settings for the project.- Parameters:
project- the project, cannot benull.- Returns:
- the available storage settings, cannot return
null.
-
saveReadSettings
Save the list of settings for the project.- Parameters:
project- the translating project, cannot benull.settings- the list of settings that should use to read with order, cannot benull.
-
saveReadStorageIds
Saves the available storage ids for the project.- Parameters:
project- the translating project, cannot benull.ids- the list of ids that should use to read with order, cannot benull.
-
saveDefaultEditingStorageId
Save default editing storage id for the project.- Parameters:
project- the translating project, cannot benull.id- the storage ID, cannot benull.
-
isStorageAvailable
Check that storage with givenstorageIdis available for the specifiedproject.- Parameters:
project- the translating project, cannot benull.storageId- Storage identifier to check, cannot benull.- Returns:
-
addChangeListener
Adds the settings change listener. Has no effect if an identical listener is already registered.- Parameters:
listener- the listener, cannot benull.
-
removeChangeListener
Removes the settings change listener. Has no effect if an identical listener is not registered.- Parameters:
listener- the listener, cannot benull.
-