Skip to content

Commit

Permalink
Merge "[2202] Sirius overridden preferences are not always overridden"
Browse files Browse the repository at this point in the history
  • Loading branch information
minhtutonthat authored and Gerrit Code Review @ Polarsys.org committed Oct 2, 2018
2 parents c0fe440 + a961a41 commit bf0fdc8
Show file tree
Hide file tree
Showing 12 changed files with 86 additions and 844 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.emf.common.ui,
org.eclipse.sirius.common,
org.eclipse.sirius.diagram.ui,
org.polarsys.capella.shared.id.handler
org.polarsys.capella.shared.id.handler,
org.eclipse.sirius.common.ui
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Export-Package: org.polarsys.capella.common.platform.sirius.customisation,
org.polarsys.capella.common.platform.sirius.customisation.resourcelocator,
org.polarsys.capella.common.platform.sirius.customisation.uicallback
Bundle-Localization: plugin
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
# ====================================================================
# Copyright (c) 2006, 2015 THALES GLOBAL SERVICES.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# Thales - initial API and implementation
# ====================================================================

pluginName = Sirius Customization
providerName = Eclipse.org

_Pref_ReloadOnLastEditorClose = false
_Pref_SaveWhenNoEditor = false
# ====================================================================
# Copyright (c) 2006, 2018 THALES GLOBAL SERVICES.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# Thales - initial API and implementation
# ====================================================================

pluginName = Sirius Customization
providerName = Eclipse.org
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
Thales - initial API and implementation
-->
<plugin>
<extension point="org.eclipse.sirius.ui.resourcelocator">
<resourcelocator
class="org.polarsys.capella.common.platform.sirius.customisation.resourcelocator.DelegatingSiriusResourceLocator">
</resourcelocator>
</extension>
<extension
point="org.polarsys.capella.shared.id.handler.IdHandler">
<IdHandler
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.sirius.business.api.preferences.SiriusPreferencesKeys;
import org.eclipse.sirius.common.tools.api.constant.CommonPreferencesConstants;
import org.eclipse.sirius.common.ui.SiriusTransPlugin;
import org.eclipse.sirius.ui.business.api.preferences.SiriusUIPreferencesKeys;
import org.eclipse.sirius.viewpoint.provider.SiriusEditPlugin;
import org.eclipse.ui.IWorkbenchPreferenceConstants;
Expand Down Expand Up @@ -53,6 +55,9 @@ public void start(BundleContext context) throws Exception {
try {
// Initialize the preferences for Sirius
PlatformUI.getPreferenceStore().setValue(IWorkbenchPreferenceConstants.PROMPT_WHEN_SAVEABLE_STILL_OPEN, false);

// Disable Sirius Pre-commit listener behavior since Capella has the same one.
SiriusTransPlugin.getPlugin().getPreferenceStore().setValue(CommonPreferencesConstants.PREF_DEFENSIVE_EDIT_VALIDATION, false);

// Change the UICallBack to have a specific Session displayed name
SiriusEditPlugin.getPlugin().setUiCallback(new SiriusUiCallBack(SiriusEditPlugin.getPlugin().getUiCallback()));
Expand All @@ -71,7 +76,7 @@ public void start(BundleContext context) throws Exception {

// Don't use colors from odesign in diagram palettes
store.setDefault(SiriusUIPreferencesKeys.PREF_DISPLAY_VSM_USER_FIXED_COLOR_IN_PALETTE.name(), false);

} catch (Exception e) {
getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK, e.getMessage(), e));
}
Expand Down

0 comments on commit bf0fdc8

Please sign in to comment.