4559

How to Import Preferences (.epf) in eclipse via command prompt?

Question:

I wanted to run a bat file in which it can <strong>import preferences</strong> from a location (which was exported manually). I searched for the <strong><em>command which would import preferences</em></strong> but, could not find any.

Answer1:

There is no existing code to do this. You would have to write an Eclipse headless application that does something like this:

<pre class="lang-java prettyprint-override">IPreferencesService service = Platform.getPreferencesService(); IExportedPreferences prefs = service.readPreferences(file input stream); // TODO create IPreferenceFilter array to filter what you want service.applyPreferences(prefs, filter array);

See the source of the import preferences page org.eclipse.ui.internal.wizards.preferences.WizardPreferencesImportPage1 for an example.

Answer2:

Backstory: I was looking for something similar and, a few tabs back, I've stumbled on a "half-an-answer"/alternative solution. Even if the thread is old might still turn in handy ...

In <a href="http://blog.vogella.com/2012/08/07/eclipse-papercut-9-default-preference-settings-via-plugin_customization-ini-type-filter-example/" rel="nofollow">this page</a> the author talks about using -pluginCustomization parameter inside the eclipse.ini file

-pluginCustomization plugin_customization.ini -startup plugins/org.eclipse....

The plugin_customization.ini file is similar to the *.epf file, same variables minus the /instance/ prefix (maybe because this way they are interpreted/applied at product(eclipse) level and not as per-workspace preferences).

Recommend

  • Android Save Spinner Selection
  • How to refactor code to use MonadRandom
  • XULRunner ignores updates on edited files
  • I'm trying to use Java Preferences from XML WITHOUT using Windows registry, but I see a Registr
  • Custom browser preferences for file download for PDF file
  • Shared preference always taking default value
  • android service to start activity not reacting like I think it should
  • iOS int always returning 0 [duplicate]
  • UICollectionView scrolling is not smooth. Why?
  • Add menu item created with the sdk/context-menu API to the top of the context menu
  • Selenium WebDriver/Firefox|Chrome/Java How to disable image loading
  • Reading custom firefox about:config
  • XMLParser.sharedParser.decode() in swift3
  • UITableView count not increasing
  • Can I write to Android SharedPreference for a different package?
  • Swift 4 ,must be used from main thread only warning
  • Where does Eclipse store keyboard bindings?
  • Reload Python module
  • how to programmatically open Settings > Privacy > Location Services in iOS 11+?
  • Anaconda on Mac: Can't set Matplotlib backend to Agg
  • Twitter Authentication through Android's AccountManager classes
  • Changing background colour with SharedPreference in Android
  • iPhone - upgrading from old app preferences
  • ExifInterface returns null for all Tags
  • How to Import Preferences (.epf) in eclipse via command prompt?
  • Java - Program which remembers/saves entered fields
  • Shared preferences in mono android
  • Update application programmatically from Google store while autoupdate is off in android
  • How to keep the user logged in or check if the user is logged in or not in Shopify?
  • The method addPreferencesFromResource(int) from the type PreferenceActivity is deprecated
  • Android animation while switching imageview resource
  • Traditional (standard) checkout (step by step page)
  • Directive subscription doesn't fire despite the subject calling next
  • WordPress - Add/Edit Post Screen Options not showing Categories
  • What is meant by ?? in Dart
  • Hide full path to project in Project browser?
  • Server-Client malfunction in Android (socket is not bound/socket is already in use)
  • Can't switch to database other than _system within Foxx