Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Global preferences in 3.4
Global preferences in 3.4 [message #330277] Thu, 24 July 2008 11:32 Go to next message
Miles Daffin is currently offline Miles DaffinFriend
Messages: 86
Registered: July 2009
Member
Hi All,

Can anyone tell me if it is possible to provide global preferences in 3.4,
i.e. preferences that will apply to *all* workspaces by default? The only
way I could find of doing this in 3.3 was:
1 Configure an install of Eclipse just the way I wanted it
2 Export these preferences (everything)
3 Edit the exported epf file: remove /configuration/ and /instance/
prefixes on each line and remove any lines for stuff we do not want as
defaults (e.g. recnet workspaces)
4 Create an eclipse launch script and use the -plugincustomization arg
to make these edited preferences the default for all workspaces.

Is there a cleaner way of achieving the same thing in 3.4?

Thanks,

Miles
Re: Global preferences in 3.4 [message #330296 is a reply to message #330277] Thu, 24 July 2008 15:44 Go to previous messageGo to next message
Miles Daffin is currently offline Miles DaffinFriend
Messages: 86
Registered: July 2009
Member
Oh dear. My question is already slipping down the list into obscurity... I
guess I must be the only person using eclipse 3.4 who would like to be
able to do this :(
Re: Global preferences in 3.4 [message #330298 is a reply to message #330296] Thu, 24 July 2008 17:52 Go to previous messageGo to next message
Eclipse Webmaster is currently offline Eclipse WebmasterFriend
Messages: 511656
Registered: July 2009
Senior Member
Miles Daffin wrote:
> Oh dear. My question is already slipping down the list into obscurity...
> I guess I must be the only person using eclipse 3.4 who would like to be
> able to do this :(

Hang in there, Miles ... 4 hours is only 1/6 of the world's rotation.


--

Eclipse WebMaster - webmaster@eclipse.org
Questions? Consult the WebMaster FAQ at
http://wiki.eclipse.org/index.php/Webmaster_FAQ
View my status at http://wiki.eclipse.org/index.php/WebMaster
Re: Global preferences in 3.4 [message #330299 is a reply to message #330277] Thu, 24 July 2008 18:00 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Preferences in the configuration area apply to all workspaces run from
that machine.

http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/runtime_preferences.htm
explains the scopes, but some preferences use specific search scopes and
so could bypass the configuration area completely. I guess the only way
is to try packaging them in the configuration "scope" area.

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/workbench.htm


Re: Global preferences in 3.4 [message #330319 is a reply to message #330299] Fri, 25 July 2008 09:32 Go to previous messageGo to next message
Miles Daffin is currently offline Miles DaffinFriend
Messages: 86
Registered: July 2009
Member
> Preferences in the configuration area apply to all workspaces run from
> that machine.

>
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/runtime_preferences.htm
> explains the scopes, but some preferences use specific search scopes and
> so could bypass the configuration area completely. I guess the only way
> is to try packaging them in the configuration "scope" area.

Thanks for the information. Did you see my original description of how I
created a global config definition and then got it to apply to eclipse
instances installed by my script? Can you suggest a better way of
achieving this in 3.4? (I have googled till I'm blue.)

Thanks,

Miles
Re: Global preferences in 3.4 [message #330403 is a reply to message #330319] Mon, 28 July 2008 11:43 Go to previous messageGo to next message
Miles Daffin is currently offline Miles DaffinFriend
Messages: 86
Registered: July 2009
Member
>> I guess the only way is to try packaging them in
>> the configuration "scope" area.

How would one do this? Is there any documentation on this anywhere?

Thanks,

Miles
Re: Global preferences in 3.4 [message #330426 is a reply to message #330403] Mon, 28 July 2008 16:38 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Miles Daffin wrote:
>>> I guess the only way is to try packaging them in the configuration
>>> "scope" area.
>
> How would one do this? Is there any documentation on this anywhere?

Configuration level settings are stored in the
eclipse/configuration/.settings directory. creating the appropriate
*.prefs file there will put the preferences at that level. But ...

plugins using the default preference lookup will then pick up those
preferences. But if a plugin uses
org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore(), they'll
only ever see their instance level preferences (since it defaults to
InstanceScope only).

At least your method of using -plugincustomization sets all of the
preferences whether they're instance scope or configuration scope. If
you were providing the product, you can tell eclipse to look for a
plugin_customization.ini file in a provided plugin (much the same way we
provide one in eclipse/plugins/org.eclipse.sdk_3.*)

There was some investigative work done in 3.3 (and possibly more in 3.4)
to consider sharing preferences ... but I don't know how far it got.

Later,
PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/workbench.htm


Re: Global preferences in 3.4 [message #330481 is a reply to message #330426] Tue, 29 July 2008 23:15 Go to previous messageGo to next message
Miles Daffin is currently offline Miles DaffinFriend
Messages: 86
Registered: July 2009
Member
Thanks PW. That was all I needed to know.

Miles
Re: Global preferences in 3.4 [message #490192 is a reply to message #330426] Wed, 07 October 2009 18:25 Go to previous messageGo to next message
Miles Daffin is currently offline Miles DaffinFriend
Messages: 86
Registered: July 2009
Member
Hi All,

I am trying to work out the best way of providing global preferences for an Eclipse 3.5 install and am wondering if anything has changed in this space. The usual method (see below for recap) does not seem to be working 100%. Some things only seem to get applied if you add a preferences file somewhere in the install (for example the p2 repository preferences and the core net preferences).

Can anyone tell me if the need for global preferences has been considered in 3.5 or is being considered in 3.6? If not shall I raise a bugzilla issue to kick off a proper discussion? (If so then what do I raise it against?)

Thanks,

Miles

----

1. Install eclipse + all the features/plugins you want
2. Configure the preferences in this instance
3. Export the preferences to epf
4. Convert epf to ini file:
* Remove /instance/ and /configuration/ prefixes
* Remove any preferences you do not want applied globally

[Updated on: Wed, 07 October 2009 18:25]

Report message to a moderator

Re: Global preferences in 3.4 [message #490898 is a reply to message #490192] Mon, 12 October 2009 10:21 Go to previous message
Miles Daffin is currently offline Miles DaffinFriend
Messages: 86
Registered: July 2009
Member
Hi All,

In case anyone is interested the task of provinding default global preferences is harder in 3.5. Here is what I had to do.

1. Create a 3.5 default install based on classic with all the features/plugins required by default.
2. Configure this install (Windows > Preferences)
3. Export all preferences to an epf file which is then converted into an ini file that can be applied via at the command line via -plugincustomization: remove the /instance/ and /configuration/ scope prefixes; remove any preferences that we really do not want as global defaults.

When I tested the resulting file using the -plugincustomization command line argument on an unconfigured installation I noticed that some preferences had not been applied: anything under Install/Update and General/Network Connections. It seems that these preferences are persisted in .prefs files in the eclipse install. So I tried copying them from the configured install to the same location in the test install and voila - they were applied.

All this seems pretty inconsistent and could do with looking at. Does anyone know if there is a suitable bugzilla to which I could add some observations? If not I will open one.

Thanks,

Miles
Previous Topic:Installed Features Versions
Next Topic:How to provide examples?
Goto Forum:
  


Current Time: Thu Nov 27 23:23:31 GMT 2014

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

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