Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas FAUVERGUE2019-04-25 05:19:08 -0400
committerPatrick Tessier2019-05-06 07:55:07 -0400
commit89bc31de7736a1bfe9add4fdb050a98fa22ef697 (patch)
tree27db890af63d131895c85cd2706f688967dfd902 /plugins
parent1aaa9d5800f27c5aac22ddcd90132a1454abf267 (diff)
downloadorg.eclipse.papyrus-89bc31de7736a1bfe9add4fdb050a98fa22ef697.tar.gz
org.eclipse.papyrus-89bc31de7736a1bfe9add4fdb050a98fa22ef697.tar.xz
org.eclipse.papyrus-89bc31de7736a1bfe9add4fdb050a98fa22ef697.zip
Bug 546686: [SashEditor] Remove internal dependencies
- Remove deprecated references of useless services. Now, the nested binding service is manage automatically. I think the remaining internal dependencies cannot be fixed. Change-Id: Icb1eb3a09b6925006630927c8a6d4dd89cfca9b0 Signed-off-by: Nicolas FAUVERGUE <nicolas.fauvergue@cea.fr>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/ActiveEditorServicesSwitcher.java29
1 files changed, 3 insertions, 26 deletions
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/ActiveEditorServicesSwitcher.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/ActiveEditorServicesSwitcher.java
index 26b2a5f5809..488c3b4fdcc 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/ActiveEditorServicesSwitcher.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/ActiveEditorServicesSwitcher.java
@@ -26,8 +26,6 @@ import org.eclipse.papyrus.infra.core.sasheditor.internal.eclipsecopy.MultiPageS
import org.eclipse.ui.IEditorActionBarContributor;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.IKeyBindingService;
-import org.eclipse.ui.INestableKeyBindingService;
import org.eclipse.ui.IPartService;
import org.eclipse.ui.internal.services.INestable;
import org.eclipse.ui.part.MultiPageEditorActionBarContributor;
@@ -181,7 +179,7 @@ public class ActiveEditorServicesSwitcher implements IActiveEditorChangedListene
* Activates services of the active editor: site, keybinding
* deactivate old active site.
*/
- @SuppressWarnings({ "restriction", "deprecation" })
+ @SuppressWarnings({ "restriction" })
private void activateServices() {
// Deactivate old active site
if (activeServiceLocator != null) {
@@ -189,22 +187,11 @@ public class ActiveEditorServicesSwitcher implements IActiveEditorChangedListene
activeServiceLocator = null;
}
-
- // Get the service
- final IKeyBindingService service = getOuterEditorSite().getKeyBindingService();
-
-
final IEditorPart editor = getActiveIEditorPart();
if (editor != null) {
- // active the service for this inner editor
- if (service instanceof INestableKeyBindingService) {
- final INestableKeyBindingService nestableService = (INestableKeyBindingService) service;
- nestableService.activateKeyBindingService(editor.getEditorSite());
+ // It is not needed to manage the keys binding service because the nested binding service is already managed in the parent service currently
- } else {
- Activator.log.error("MultiPageEditorPart.activateSite() Parent key binding service was not an instance of INestableKeyBindingService. It was an instance of " + service.getClass().getName() + " instead.", null); //$NON-NLS-1$ //$NON-NLS-2$
- }
// Activate the services for the new service locator.
final IServiceLocator serviceLocator = editor.getEditorSite();
if (serviceLocator instanceof INestable) {
@@ -228,17 +215,7 @@ public class ActiveEditorServicesSwitcher implements IActiveEditorChangedListene
activeServiceLocator = null;
}
- final IEditorPart editor = getActiveIEditorPart();
- final IKeyBindingService service = getOuterEditorSite().getKeyBindingService();
- if (editor != null || immediate) {
- // There is no selected page, so deactivate the active service.
- if (service instanceof INestableKeyBindingService) {
- final INestableKeyBindingService nestableService = (INestableKeyBindingService) service;
- nestableService.activateKeyBindingService(null);
- } else {
- Activator.log.error("MultiPageEditorPart.deactivateSite() Parent key binding service was not an instance of INestableKeyBindingService. It was an instance of " + service.getClass().getName() + " instead.", null); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
+ // It is no more needed to manage nested keys binding service because this is already done by its parent service
}
/**

Back to the top