Search code examples
eclipseeclipse-plugin

Eclipse preferences: How to hide value associated with some key


My project has some preferences which includes username and password for some service. Password is stored in preferences and it is encrypted. But problem is when I export All preferences and then import them in another workspace password is also transferred to second workspace. I don't want this behaviour. How do I hide password when user export all preferences.


Solution

  • Make sure to use the Eclipse Secure storage for that:

    See e.g. Lars Vogel's blog post: Eclipse Secure storage of preferences