Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where does Eclipse store preferences?

When I change a setting in a window like in the screenshot below, where are those settings actually stored?

Bonus: Is there any way, using Java, Eclipse RCP etc, to access the settings programmatically?

Thanks!

Eclipse Preferences

like image 939
CodyBugstein Avatar asked Jul 02 '13 17:07

CodyBugstein


People also ask

Where are Eclipse preferences?

You can locate a preference page by expanding the nodes of the tree in the left hand side of the dialog box. The filter text box on the left hand side top corner allows you to quickly locate a preference page.

Where are Eclipse project settings stored?

Where are they stored? Most preferences are stored under the workspace location, in a folder named . metadata. If you use project-specific settings (a good idea in general), those are stored under the project root directories in various folders and files, mostly beginning with .

How do I save my preferences in Eclipse?

Settings can be exported to a file using File -> Export -> Preferences, and you can import it to another Eclipse workspace.

Where does Eclipse store the workspace information?

eclipse stores all its workspace settings and files in the . metadata folder.


2 Answers

Source : Eclipse wiki

If you want to keep preferences from one version to the other, export them using File/Export/Preferences.

Preferences are stored in various places (this applies to Eclipse 3.1)

for each installation (but this may vary for multi-user installations), in files stored in: <eclipse_home>/eclipse/configuration/.settings/

There is typically one file per plugin, with a prefs extension. Note that very few plug-ins use installation-wide preferences.

for each workspace, in files stored in <workspace>/.metadata/.plugins/org.eclipse.core.runtime/.settings .

There is typically one file per plugin, with a prefs extension. for each project --for project-level settings -- in files stored in a .settings sub-directory of your project folder.

Here's the article to access preferences using java code.

like image 165
Optional Avatar answered Sep 23 '22 12:09

Optional


The preferences are stored in prefs files in the workspace at .metadata/.plugins/org.eclipse.core.runtime/.settings. There is one prefs-file for each plugin contributing preferences.

The programmatical access to the entire preferences is done with IPreferencesService the which you may obtain using Platform.getPreferencesService().

You may find more information and examples on how to use them in the Runtime preferences Eclipse help page.

like image 45
pellaton Avatar answered Sep 23 '22 12:09

pellaton