diff options
author | slewis | 2009-08-13 05:58:31 +0000 |
---|---|---|
committer | slewis | 2009-08-13 05:58:31 +0000 |
commit | f633cd4ce3b082d7c64639273ddabdaadc02e28e (patch) | |
tree | 2cf6221b9faaf63f3859165e2b5c30aa8f3f6c92 /providers/bundles/org.eclipse.ecf.provider.filetransfer | |
parent | 1c182e078ef38e22bc0e87b47a5a8e43dfe3274b (diff) | |
download | org.eclipse.ecf-f633cd4ce3b082d7c64639273ddabdaadc02e28e.tar.gz org.eclipse.ecf-f633cd4ce3b082d7c64639273ddabdaadc02e28e.tar.xz org.eclipse.ecf-f633cd4ce3b082d7c64639273ddabdaadc02e28e.zip |
Added unregistration for the protocol mapper
Diffstat (limited to 'providers/bundles/org.eclipse.ecf.provider.filetransfer')
-rw-r--r-- | providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/Activator.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/Activator.java b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/Activator.java index cfd3eae4a..140efdfe9 100644 --- a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/Activator.java +++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/Activator.java @@ -118,6 +118,8 @@ public class Activator implements BundleActivator, IFileTransferProtocolToFactor private String[] excludedPlugins = null; + private ServiceRegistration protocolMapperRegistration; + private IRegistryChangeListener registryChangeListener = new IRegistryChangeListener() { public void registryChanged(IRegistryChangeEvent event) { @@ -262,7 +264,7 @@ public class Activator implements BundleActivator, IFileTransferProtocolToFactor // platform loadProtocolHandlers(); // Finally, register this object as a IFileTransferProtocolToFactoryMapper service - context.registerService(IFileTransferProtocolToFactoryMapper.class.getName(), this, null); + protocolMapperRegistration = context.registerService(IFileTransferProtocolToFactoryMapper.class.getName(), this, null); } /* @@ -308,6 +310,11 @@ public class Activator implements BundleActivator, IFileTransferProtocolToFactor this.browseFileTransferProtocolMap.clear(); this.browseFileTransferProtocolMap = null; } + if (this.protocolMapperRegistration != null) { + this.protocolMapperRegistration.unregister(); + this.protocolMapperRegistration = null; + } + synchronized (this) { this.context = null; } |