It's all about the answers!

Ask a question

Default preferences for RTC


Timothy McKemy (1082317) | asked Sep 24 '12, 10:21 a.m.

Is there a way to set default values for the options normally set via Windows => Preferences?

What I am after is to be able to automatically have RTC check in stuff WITHOUT having each user set that in Pererences manually.

One answer



permanent link
DJ Houghton (2663) | answered Sep 24 '12, 1:58 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
There are a couple of solutions to this. Since it is Eclipse-based, you can use the Eclipse command-line mechanism to set any default preferences you may have. My recommendation would be to invoke RTC with the "-pluginCustomization myFile.ini" argument and populate myFile.ini with the default preference values that you wish to change. 

The format of this file is a set of key/value pairs where the key is a combination of the defining plug-in name and the path to the preference, and the value is the preference value. For instance: 
   org.eclipse.ui.workbench/RUN_IN_BACKGROUND=true

I believe the easiest way to discover the plug-in/preference key paths for the options you are interested in, would be to change those values in the UI, and then export them (File -> Export -> General -> Preferences) and look at the resulting file.

Of course the other solution is for you to set all the preferences you want, export that file, and then get all users to import that file into their client when they first setup their environment. 

Note that preferences can also be set on a per-project level so once users check that project out of the repository, they will get those preference values for free.

Comments
Timothy McKemy commented Sep 25 '12, 12:07 p.m.

How would I go about setting the preference at the project level? Would existing project members get the preference update the next time they connect to the project?

Thanks for the other info, btw. Very helpful!


DJ Houghton commented Sep 25 '12, 1:38 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

Hmm... just to be clear when I said "project" I meant "project" in the sense of a resource in the Eclipse Client UI. I realized afterwards that it could have been confused with RTC's "project area" concept.

Project-based preferences are common for sharing things like compiler error/warning settings as well as code formatting, etc. The easiest way to set them is through the Eclipse Client UI. In the Package Explorer select your project, right click, choose "Properties", and then the page for the options you wish to change. (e.g. Java Compiler) There should be a check-box at the top of the preference dialog which says "Enable project specific settings". Enabling this checkbox will cause a file to be created and stored in your project (and thus stored in the repository). Other team members will receive this file (and the appropriate preference values) when they load the project from the repository.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.