Can the Default Preferences in Workbench be changed?

Document ID : KB000020796
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

We would like to set the master default preferences setting for the CASCM Harvest R12 SP3 Workbench and Elclipse Plug-in. Our objective is to be able to change the default master settings so that default preferences are uniformly established for each and every user and each and every workspace created.

Solution:

With SCM Workbench, we do not provide a way to change the "default" values (what you would get if you clicked the "Restore Defaults" button on the Preferences dialog), but there is a way to change the "initial" values for those preferences.

The SCM Workbench stores preferences settings in the following folder:
C:\MyData\.metadata\.plugins\org.eclipse.core.runtime\.settings

The names of the preference files include:

 com.ca.harvest.workbench.prefs       
 com.ca.scm.peerreview.prefs 
 org.eclipse.birt.report.designer.ui.prefs
 org.eclipse.compare.prefs
 org.eclipse.core.resources.prefs
 org.eclipse.core.runtime.prefs
 org.eclipse.help.base.prefs
 org.eclipse.team.core.prefs
 org.eclipse.team.ui.prefs
 org.eclipse.ui.editors.prefs
 org.eclipse.ui.prefs
 org.eclipse.ui.workbench.prefs

Only the settings that override the defaults will be stored here. So for example, if you make no changes to the preferences for the Peer Review feature you will not see a "com.ca.scm.peerreview.prefs" file in this folder.

So to create a set of initial values for the Workbench preferences and deploy that when you install Workbench on a new client machine, what you can do is:

  1. On a machine where Workbench is installed, open Workbench, select Tools -> Preferences from the menu and go through all the preference settings. Make any changes to the preferences that are needed to create a set of initial preferences settings, and then close Workbench.

  2. Create a zip file containing all the "*.prefs" files from the "C:\MyData\.metadata\.plugins\org.eclipse.core.runtime\.settings" folder.

  3. Create your Workbench installation script to first install Workbench (or the full SCM Client if you like), and then second to create a folder named "C:\MyData\.metadata\.plugins\org.eclipse.core.runtime\.settings" and place the unzipped "*.prefs" files in it.

When the user on that machine starts up Workbench, the initial values for the preferences will reflect your selections from step 1. From there, Workbench will allow the user to make changes to any of the preferences, or to click the "Restore Defaults" button and get the generic default values. If your install script also deployed a copy of the preferences zip file, restoring your selections for the initial values would be a matter of unzipping that file again to re-deploy the "*.prefs" files.