[564124] Use default scope to set default preferences from initializer
SiriusPropertiesViewPreferenceInitializer used to initialize the
InstanceScope instead of the DefaultScope. This used to break the
standard possibility to set/overrides default values (plugin
customizations for example).
Bug: 564124
Change-Id: Idea7450677e92523efde153f8b55ef269a2dbba8
Signed-off-by: Maxime Porhel <maxime.porhel@obeo.fr>
diff --git a/plugins/org.eclipse.sirius.properties.core/src/org/eclipse/sirius/properties/core/internal/preferences/SiriusPropertiesViewPreferenceInitializer.java b/plugins/org.eclipse.sirius.properties.core/src/org/eclipse/sirius/properties/core/internal/preferences/SiriusPropertiesViewPreferenceInitializer.java
index c8d1661..72d7ebf 100644
--- a/plugins/org.eclipse.sirius.properties.core/src/org/eclipse/sirius/properties/core/internal/preferences/SiriusPropertiesViewPreferenceInitializer.java
+++ b/plugins/org.eclipse.sirius.properties.core/src/org/eclipse/sirius/properties/core/internal/preferences/SiriusPropertiesViewPreferenceInitializer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2016, 2017 Obeo.
+ * Copyright (c) 2016, 2020 Obeo.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -13,8 +13,8 @@
package org.eclipse.sirius.properties.core.internal.preferences;
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.core.runtime.preferences.DefaultScope;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.sirius.properties.core.internal.SiriusPropertiesCorePlugin;
/**
@@ -31,7 +31,7 @@
*/
@Override
public void initializeDefaultPreferences() {
- IEclipsePreferences preferences = InstanceScope.INSTANCE.getNode(SiriusPropertiesCorePlugin.PLUGIN_ID);
+ IEclipsePreferences preferences = DefaultScope.INSTANCE.getNode(SiriusPropertiesCorePlugin.PLUGIN_ID);
preferences.put(SiriusPropertiesCorePreferencesKeys.PREF_FILTER_PROPERTIES_VIEW_DEFAULT_TAB.name(),
SiriusPropertiesCorePreferencesKeys.PREF_FILTER_PROPERTIES_VIEW_DEFAULT_TAB.getDefaultValue());
preferences.put(SiriusPropertiesCorePreferencesKeys.PREF_FILTER_PROPERTIES_VIEW_SEMANTIC_TAB.name(),