Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to read RTC Eclipse preferences using the Java API?

How can I read the values in the Window>Preferences>Team>Jazz Source Control>External Compare Tools preference page?

In particular I am interested to find if the checkbox "Use an external compare tool as the default open action" is selected and the name of the selected 2-way compare tool there.

Thanks!

1

0 votes


Accepted answer

Permanent link
You can try to export the Eclipse preferences and it should look like below

/instance/org.eclipse.ui.ide/IMPORT_FILES_AND_FOLDERS_VIRTUAL_FOLDER_MODE=prompt
/instance/com.ibm.team.filesystem.rcp.core/com.ibm.team.filesystem.rcp.core.SandboxListening=true
/instance/com.ibm.team.filesystem.ide.ui/external_compare_tool_merge_executable_path_pref_key_Beyond\ Compare=C\:\\Program Files\\Beyond Compare 4\\BComp.exe
/instance/com.ibm.team.filesystem.ide.ui/external_compare_previously_selected_compare_tool=Beyond Compare
/instance/com.ibm.team.filesystem.ide.ui/external_compare_default_tool_preference_key=true
Krasimir Malchev selected this answer as the correct answer

0 votes

Comments

Hello Karthik.
   Thanks for your answer!
   Indeed, I exported the preferences: File>Export>General>Preferences
   From the dump I found the node ids I was interested in
   I saw that there are several types of preferences (instance, configuration, etc. A nice tutorial can be found here: http://www.vogella.com/tutorials/EclipsePreferences/article.html).
     // org.eclipse.core.runtime.preferences
      InstanceScope instScope = InstanceScope.INSTANCE;
      IEclipsePreferences extCmpToolNode =
          instScope.getNode( "com.ibm.team.filesystem.ide.ui" );
      boolean openExtCmpToolByDefault = extCmpToolNode.getBoolean(
                             "external_compare_default_tool_preference_key", false);

1 vote

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,994

Question asked: Sep 20 '16, 8:28 a.m.

Question was seen: 1,913 times

Last updated: Sep 20 '16, 10:19 a.m.

Confirmation Cancel Confirm