From 210612068cd49e09d31d4b482b09c55c62b5c4cd Mon Sep 17 00:00:00 2001 From: Martin Oberhuber < martin.oberhuber@windriver.com> Date: Thu, 24 May 2007 10:17:40 +0000 Subject: [PATCH] Fix SystemRegistryUI.postEvent() --- .../eclipse/rse/ui/internal/model/SystemRegistry.java | 11 +++++++++++ .../rse/ui/internal/model/SystemRegistryUI.java | 8 +++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemRegistry.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemRegistry.java index 1f53b89a504..4acb16a3ca4 100644 --- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemRegistry.java +++ b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemRegistry.java @@ -2461,6 +2461,17 @@ public class SystemRegistry implements ISystemRegistry { l.systemResourceChanged(event); } + + /** + * Return the listener manager such that the SystemRegistryUI + * can re-use it for posting events that can only be posted + * in UI. + * @return the System resource change listener manager + * used by the registry. + */ + public SystemResourceChangeManager getResourceChangeManager() { + return listenerManager; + } // ---------------------------- // MODEL RESOURCE EVENT METHODS... diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemRegistryUI.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemRegistryUI.java index 042c101cbfa..fc7a18a3bf5 100644 --- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemRegistryUI.java +++ b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemRegistryUI.java @@ -62,9 +62,8 @@ import org.eclipse.ui.part.ResourceTransfer; public class SystemRegistryUI implements ISystemRegistryUI, ISystemViewInputProvider { private static SystemRegistryUI _instance = null; - private ISystemRegistry registry = null; + private SystemRegistry registry = null; - private SystemResourceChangeManager listenerManager = null; private Viewer viewer = null; // progress monitor support @@ -85,8 +84,7 @@ public class SystemRegistryUI implements ISystemRegistryUI, ISystemViewInputProv protected SystemRegistryUI(String logfilePath) { super(); - registry = RSECorePlugin.getTheSystemRegistry(); - listenerManager = new SystemResourceChangeManager(); + registry = SystemRegistry.getInstance(); } // ---------------------------- @@ -586,7 +584,7 @@ public class SystemRegistryUI implements ISystemRegistryUI, ISystemViewInputProv */ public void postEvent(ISystemResourceChangeEvent event) { - listenerManager.postNotify(event); + registry.getResourceChangeManager().postNotify(event); } /*