Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » question about storage
question about storage [message #1827736] Fri, 22 May 2020 06:59 Go to next message
kazimi hote is currently offline kazimi hoteFriend
Messages: 1
Registered: May 2020
Junior Member
Hello, I want to add new key value pair in eclipse secure storage. Can you give me some suggestion?
Re: question about storage [message #1828333 is a reply to message #1827736] Sun, 07 June 2020 18:56 Go to previous message
Emmanuel Chebbi is currently offline Emmanuel ChebbiFriend
Messages: 123
Registered: February 2018
Senior Member
AFAIK this can only be done programmatically from an Eclipse plug-in; is that your use case?

Corresponding code (taken from Vogella's tutorial https://www.vogella.com/tutorials/EclipsePreferences/article.html#tutorial-secure-storage-of-preferences), is the following:
import org.eclipse.equinox.security.storage.ISecurePreferences;
import org.eclipse.equinox.security.storage.SecurePreferencesFactory;
import org.eclipse.equinox.security.storage.StorageException;

...

class Foo {

    public void foo() {
        ISecurePreferences preferences = SecurePreferencesFactory.getDefault();
        ISecurePreferences node = preferences.node("info");
        try {
            node.put("key", "value", true);
        } 
        catch (StorageException e) {
            e.printStackTrace();
        }
    }

}
Previous Topic:this picture will show you here.
Next Topic:Mac Installation Error
Goto Forum:
  


Current Time: Thu Apr 25 04:14:25 GMT 2024

Powered by FUDForum. Page generated in 0.07684 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top