Bug 566527 - SiriusPropertiesViewPreferenceInitializer should use Default scope to set default preferences
Summary: SiriusPropertiesViewPreferenceInitializer should use Default scope to set def...
Status: CLOSED FIXED
Alias: None
Product: Sirius
Classification: Modeling
Component: Properties (show other bugs)
Version: 6.3.0   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: 6.4.0   Edit
Assignee: Maxime Porhel CLA
QA Contact: Glenn Plouhinec CLA
URL:
Whiteboard:
Keywords: triaged
Depends on: 564124
Blocks:
  Show dependency tree
 
Reported: 2020-08-31 10:42 EDT by Maxime Porhel CLA
Modified: 2020-12-04 04:23 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maxime Porhel CLA 2020-08-31 10:42:21 EDT
+++ This bug was initially created as a clone of Bug #564124 +++

SiriusPropertiesViewPreferenceInitializer.initializeDefaultPreferences() use the instance scope to store default values for 3 preferences.

This prevents anyone from programmaticallt setting its own default values for these values. The usual plugin_customization.ini can not be used for example.

Default scope should be used instead of instance scope.
Comment 1 Eclipse Genie CLA 2020-08-31 10:49:59 EDT
New Gerrit change created: https://git.eclipse.org/r/c/sirius/org.eclipse.sirius/+/168507
Comment 3 Maxime Porhel CLA 2020-09-01 05:09:21 EDT
User will have to use a new workspace or to reset preference of the Sirius properties core plugin to see pluginCustomization mecanism work for this plugin.
Comment 4 Glenn Plouhinec CLA 2020-11-18 11:25:40 EST
When using the pluginCustomization.ini, we observe in debug mode that the default scope is used instead of the instance scope. The change is visible in the "Sirius Properties View" preferences page. However the validation steps suggest that the modification is also visible in "Installation details > Configuration", which is not the case.
Comment 5 Maxime Porhel CLA 2020-11-24 08:36:07 EST
The behavior is then ok and valid on Sirius 6.4.0 .0-S20201110-075607 and  : the default scope is used in the preference initializer instead of the previous misuse of the instance scope.

One of the validation step was wrong : Installation Details > Configuration does not show the plugins customization in the bundle_default section.

We have also checked on a new workspace that after the initialization of the preferences, the ppreference page displays the values from the plugin_customization.ini and there is nothing put in the Instance scope until the user concretely change the preferences from the preference page. 

With previous versions using plugin_customization.ini had no effect on preferences used by SiriusPropertiesViewsPreferenceInitializer
Comment 6 Pierre-Charles David CLA 2020-12-04 04:23:41 EST
Available in Sirius 6.4.0, see https://download.eclipse.org/sirius/updates/releases/6.4.0/ for details.