Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2008-03-08 00:18:17 +0000
committerslewis2008-03-08 00:18:17 +0000
commitb6d3d6f7b0cbb5c3c1ea8a33bc5c4ea57a304292 (patch)
tree59aebb5817e938d60f813f4a3db4240f08027d52
parentda466da9ba844b153baf8293b7f96c190560605c (diff)
downloadorg.eclipse.ecf-b6d3d6f7b0cbb5c3c1ea8a33bc5c4ea57a304292.tar.gz
org.eclipse.ecf-b6d3d6f7b0cbb5c3c1ea8a33bc5c4ea57a304292.tar.xz
org.eclipse.ecf-b6d3d6f7b0cbb5c3c1ea8a33bc5c4ea57a304292.zip
Addition of priority attribute for org.eclipse.ecf.provider.filetransfer.retrieveFileTransferProtocolFactory (and browse and send extension points also) for bug 221896
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.filetransfer/META-INF/MANIFEST.MF2
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.filetransfer/schema/browseFileTransferProtocolFactory.exsd57
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.filetransfer/schema/retrieveFileTransferProtocolFactory.exsd45
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.filetransfer/schema/sendFileTransferProtocolFactory.exsd45
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/Activator.java379
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/Messages.java7
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/messages.properties7
7 files changed, 412 insertions, 130 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer/META-INF/MANIFEST.MF b/providers/bundles/org.eclipse.ecf.provider.filetransfer/META-INF/MANIFEST.MF
index 9abe44edf..8585c1043 100644
--- a/providers/bundles/org.eclipse.ecf.provider.filetransfer/META-INF/MANIFEST.MF
+++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %plugin.name
Bundle-SymbolicName: org.eclipse.ecf.provider.filetransfer;singleton:=true
-Bundle-Version: 1.5.0.qualifier
+Bundle-Version: 1.6.0.qualifier
Bundle-Activator: org.eclipse.ecf.internal.provider.filetransfer.Activator
Bundle-Vendor: %plugin.provider
Bundle-Localization: plugin
diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer/schema/browseFileTransferProtocolFactory.exsd b/providers/bundles/org.eclipse.ecf.provider.filetransfer/schema/browseFileTransferProtocolFactory.exsd
index 3ab0fef15..2a0a9b381 100644
--- a/providers/bundles/org.eclipse.ecf.provider.filetransfer/schema/browseFileTransferProtocolFactory.exsd
+++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer/schema/browseFileTransferProtocolFactory.exsd
@@ -1,10 +1,10 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.ecf.provider.filetransfer">
+<schema targetNamespace="org.eclipse.ecf.provider.filetransfer" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
- <appInfo>
+ <appinfo>
<meta.schema plugin="org.eclipse.ecf.provider.filetransfer" id="browseFileTransferProtocolFactory" name="browseFileTransferProtocolFactory"/>
- </appInfo>
+ </appinfo>
<documentation>
This extension point allows IRemoteFileSystemBrowserFactorys to be defined for given file transfer protocols.
</documentation>
@@ -34,9 +34,9 @@
<documentation>
</documentation>
- <appInfo>
+ <appinfo>
<meta.attribute translatable="true"/>
- </appInfo>
+ </appinfo>
</annotation>
</attribute>
</complexType>
@@ -61,34 +61,42 @@
<documentation>
The factory class to use for given protocol. Must implement &lt;b&gt;org.eclipse.ecf.filetransfer.service.IRemoteFileSystemBrowserFactory&lt;/b&gt;
</documentation>
- <appInfo>
+ <appinfo>
<meta.attribute kind="java" basedOn=":org.eclipse.ecf.filetransfer.service.IRemoteFileSystemBrowserFactory"/>
- </appInfo>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="priority" type="string">
+ <annotation>
+ <documentation>
+ Priority relative to other browseFileTransferProtocolFactory extensions. Valid priorities are 0 (highest priority) to 100 (lowest priority). If this optional attribute is not specified, it will automatically be assigned a default priority of 100.
+ </documentation>
</annotation>
</attribute>
</complexType>
</element>
<annotation>
- <appInfo>
+ <appinfo>
<meta.section type="since"/>
- </appInfo>
+ </appinfo>
<documentation>
1.0.0
</documentation>
</annotation>
<annotation>
- <appInfo>
+ <appinfo>
<meta.section type="examples"/>
- </appInfo>
+ </appinfo>
<documentation>
&lt;pre&gt;
&lt;extension
point=&quot;org.eclipse.ecf.provider.filetransfer.browseFileTransferProtocolFactory&quot;&gt;
&lt;browseFileTransferProtocolFactory
class=&quot;org.eclipse.ecf.provider.filetransfer.ssh.ScpBrowseFileTransferFactory&quot;
- protocol=&quot;scp&quot;&gt;
+ protocol=&quot;scp&quot;
+ priority=&quot;90&quot;&gt;
&lt;/browseFileTransferProtocolFactory&gt;
&lt;/extension&gt;
@@ -97,9 +105,9 @@
</annotation>
<annotation>
- <appInfo>
+ <appinfo>
<meta.section type="apiInfo"/>
- </appInfo>
+ </appinfo>
<documentation>
Here is the &lt;b&gt;org.eclipse.ecf.filetransfer.service.IRemoteFileSystemBrowserFactory&lt;/b&gt;
@@ -110,31 +118,32 @@
*/
public interface IRemoteFileSystemBrowserFactory {
- /**
- * Get new instance of IRemoteFileSystemBrowser.
- *
- * @return IRemoteFileSystemBrowser for initiating a retrieval of a remote file.
- */
- public IRemoteFileSystemBrowser newInstance();
+ /**
+ * Get new instance of IRemoteFileSystemBrowser.
+ *
+ * @return IRemoteFileSystemBrowser for initiating a retrieval of a remote file.
+ */
+ public IRemoteFileSystemBrowser newInstance();
}
&lt;/pre&gt;
</documentation>
</annotation>
+
<annotation>
- <appInfo>
+ <appinfo>
<meta.section type="implementation"/>
- </appInfo>
+ </appinfo>
<documentation>
None
</documentation>
</annotation>
<annotation>
- <appInfo>
+ <appinfo>
<meta.section type="copyright"/>
- </appInfo>
+ </appinfo>
<documentation>
Copyright (c) 2004 Composent, Inc., IBM and others.
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: Composent, Inc. - initial API and implementation, IBM, Inc. - Initial API and implementation
diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer/schema/retrieveFileTransferProtocolFactory.exsd b/providers/bundles/org.eclipse.ecf.provider.filetransfer/schema/retrieveFileTransferProtocolFactory.exsd
index 14b29936b..91f9ddb4a 100644
--- a/providers/bundles/org.eclipse.ecf.provider.filetransfer/schema/retrieveFileTransferProtocolFactory.exsd
+++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer/schema/retrieveFileTransferProtocolFactory.exsd
@@ -1,10 +1,10 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.ecf.provider.filetransfer">
+<schema targetNamespace="org.eclipse.ecf.provider.filetransfer" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
- <appInfo>
+ <appinfo>
<meta.schema plugin="org.eclipse.ecf.provider.filetransfer" id="retrieveFileTransferProtocolFactory" name="retrieveFileTransferProtocolFactory"/>
- </appInfo>
+ </appinfo>
<documentation>
This extension point allows IRetrieveFileTransferFactorys to be defined for given file transfer protocols.
</documentation>
@@ -34,9 +34,9 @@
<documentation>
</documentation>
- <appInfo>
+ <appinfo>
<meta.attribute translatable="true"/>
- </appInfo>
+ </appinfo>
</annotation>
</attribute>
</complexType>
@@ -61,34 +61,42 @@
<documentation>
The factory class to use for given protocol. Must implement &lt;b&gt;org.eclipse.ecf.filetransfer.service.IRetrieveFileTransferFactory&lt;/b&gt;
</documentation>
- <appInfo>
+ <appinfo>
<meta.attribute kind="java" basedOn="org.eclipse.ecf.filetransfer.service.IRetrieveFileTransferFactory"/>
- </appInfo>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="priority" type="string">
+ <annotation>
+ <documentation>
+ Priority relative to other retrieveFileTransferProtocolFactory extensions. Valid priorities are 0 (highest priority) to 100 (lowest priority). If this optional attribute is not specified, it will automatically be assigned a default priority of 100.
+ </documentation>
</annotation>
</attribute>
</complexType>
</element>
<annotation>
- <appInfo>
+ <appinfo>
<meta.section type="since"/>
- </appInfo>
+ </appinfo>
<documentation>
1.0.0
</documentation>
</annotation>
<annotation>
- <appInfo>
+ <appinfo>
<meta.section type="examples"/>
- </appInfo>
+ </appinfo>
<documentation>
&lt;pre&gt;
&lt;extension
point=&quot;org.eclipse.ecf.provider.filetransfer.retrieveFileTransferProtocolFactory&quot;&gt;
&lt;retrieveFileTransferProtocolFactory
class=&quot;org.eclipse.ecf.provider.filetransfer.httpclient.HttpClientRetrieveFileTransferFactory&quot;
- protocol=&quot;http&quot;&gt;
+ protocol=&quot;http&quot;
+ priority=&quot;10&quot;&gt;
&lt;/retrieveFileTransferProtocolFactory&gt;
&lt;retrieveFileTransferProtocolFactory
class=&quot;org.eclipse.ecf.provider.filetransfer.httpclient.HttpClientRetrieveFileTransferFactory&quot;
@@ -101,9 +109,9 @@
</annotation>
<annotation>
- <appInfo>
+ <appinfo>
<meta.section type="apiInfo"/>
- </appInfo>
+ </appinfo>
<documentation>
Here is the &lt;b&gt;org.eclipse.ecf.filetransfer.service.IRetrieveFileTransferFactory&lt;/b&gt;
@@ -126,19 +134,20 @@ public interface IRetrieveFileTransferFactory {
</documentation>
</annotation>
+
<annotation>
- <appInfo>
+ <appinfo>
<meta.section type="implementation"/>
- </appInfo>
+ </appinfo>
<documentation>
None
</documentation>
</annotation>
<annotation>
- <appInfo>
+ <appinfo>
<meta.section type="copyright"/>
- </appInfo>
+ </appinfo>
<documentation>
Copyright (c) 2004 Composent, Inc., IBM and others.
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: Composent, Inc. - initial API and implementation, IBM, Inc. - Initial API and implementation
diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer/schema/sendFileTransferProtocolFactory.exsd b/providers/bundles/org.eclipse.ecf.provider.filetransfer/schema/sendFileTransferProtocolFactory.exsd
index 77428b85e..c6e22d722 100644
--- a/providers/bundles/org.eclipse.ecf.provider.filetransfer/schema/sendFileTransferProtocolFactory.exsd
+++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer/schema/sendFileTransferProtocolFactory.exsd
@@ -1,10 +1,10 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.ecf.provider.filetransfer">
+<schema targetNamespace="org.eclipse.ecf.provider.filetransfer" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
- <appInfo>
+ <appinfo>
<meta.schema plugin="org.eclipse.ecf.provider.filetransfer" id="sendFileTransferProtocolFactory" name="sendFileTransferProtocolFactory"/>
- </appInfo>
+ </appinfo>
<documentation>
This extension point allows IRetrieveFileTransferFactorys to be defined for given file transfer protocols.
</documentation>
@@ -34,9 +34,9 @@
<documentation>
</documentation>
- <appInfo>
+ <appinfo>
<meta.attribute translatable="true"/>
- </appInfo>
+ </appinfo>
</annotation>
</attribute>
</complexType>
@@ -61,34 +61,42 @@
<documentation>
The factory class to use for given protocol. Must implement &lt;b&gt;org.eclipse.ecf.filetransfer.service.ISendFileTransferFactory&lt;/b&gt;
</documentation>
- <appInfo>
+ <appinfo>
<meta.attribute kind="java" basedOn=":org.eclipse.ecf.filetransfer.service.ISendFileTransferFactory"/>
- </appInfo>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="priority" type="string">
+ <annotation>
+ <documentation>
+ Priority relative to other sendFileTransferProtocolFactory extensions. Valid priorities are 0 (highest priority) to 100 (lowest priority). If this optional attribute is not specified, it will automatically be assigned a default priority of 100.
+ </documentation>
</annotation>
</attribute>
</complexType>
</element>
<annotation>
- <appInfo>
+ <appinfo>
<meta.section type="since"/>
- </appInfo>
+ </appinfo>
<documentation>
1.0.0
</documentation>
</annotation>
<annotation>
- <appInfo>
+ <appinfo>
<meta.section type="examples"/>
- </appInfo>
+ </appinfo>
<documentation>
&lt;pre&gt;
&lt;extension
point=&quot;org.eclipse.ecf.provider.filetransfer.sendFileTransferProtocolFactory&quot;&gt;
&lt;sendFileTransferProtocolFactory
class=&quot;org.eclipse.ecf.provider.filetransfer.ssh.ScpOutgoingFileTransferFactory&quot;
- protocol=&quot;scp&quot;&gt;
+ protocol=&quot;scp&quot;
+ priority=&quot;50&quot;&gt;
&lt;/sendFileTransferProtocolFactory&gt;
&lt;/extension&gt;
@@ -97,9 +105,9 @@
</annotation>
<annotation>
- <appInfo>
+ <appinfo>
<meta.section type="apiInfo"/>
- </appInfo>
+ </appinfo>
<documentation>
Here is the &lt;b&gt;org.eclipse.ecf.filetransfer.service.IRetrieveFileTransferFactory&lt;/b&gt;
@@ -122,19 +130,20 @@ public interface IRetrieveFileTransferFactory {
</documentation>
</annotation>
+
<annotation>
- <appInfo>
+ <appinfo>
<meta.section type="implementation"/>
- </appInfo>
+ </appinfo>
<documentation>
None
</documentation>
</annotation>
<annotation>
- <appInfo>
+ <appinfo>
<meta.section type="copyright"/>
- </appInfo>
+ </appinfo>
<documentation>
Copyright (c) 2004 Composent, Inc., IBM and others.
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: Composent, Inc. - initial API and implementation, IBM, Inc. - Initial API and implementation
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 27605dfab..67da9b66e 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
@@ -32,6 +32,8 @@ import org.osgi.util.tracker.ServiceTracker;
public class Activator implements BundleActivator {
private static final String CLASS_ATTR = "class"; //$NON-NLS-1$
+ private static final String PRIORITY_ATTR = "priority"; //$NON-NLS-1$
+ private static final int DEFAULT_PRIORITY = 100;
private static final String PROTOCOL_ATTR = "protocol"; //$NON-NLS-1$
private static final String[] jvmSchemes = new String[] {Messages.FileTransferNamespace_Http_Protocol, Messages.FileTransferNamespace_Ftp_Protocol, Messages.FileTransferNamespace_File_Protocol, Messages.FileTransferNamespace_Jar_Protocol, Messages.FileTransferNamespace_Https_Protocol, Messages.FileTransferNamespace_Mailto_Protocol, Messages.FileTransferNamespace_Gopher_Protocol};
@@ -42,14 +44,20 @@ public class Activator implements BundleActivator {
// The plug-in ID
public static final String PLUGIN_ID = "org.eclipse.ecf.provider.filetransfer"; //$NON-NLS-1$
+ private static final String RETRIEVE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT_NAME = "retrieveFileTransferProtocolFactory"; //$NON-NLS-1$
+
private static final String RETRIEVE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT = PLUGIN_ID + "." //$NON-NLS-1$
- + "retrieveFileTransferProtocolFactory"; //$NON-NLS-1$
+ + RETRIEVE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT_NAME;
+
+ private static final String SEND_FILETRANSFER_PROTOCOL_FACTORY_EPOINT_NAME = "sendFileTransferProtocolFactory"; //$NON-NLS-1$
private static final String SEND_FILETRANSFER_PROTOCOL_FACTORY_EPOINT = PLUGIN_ID + "." //$NON-NLS-1$
- + "sendFileTransferProtocolFactory"; //$NON-NLS-1$
+ + SEND_FILETRANSFER_PROTOCOL_FACTORY_EPOINT_NAME;
+
+ private static final String BROWSE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT_NAME = "browseFileTransferProtocolFactory"; //$NON-NLS-1$
private static final String BROWSE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT = PLUGIN_ID + "." //$NON-NLS-1$
- + "browseFileTransferProtocolFactory"; //$NON-NLS-1$
+ + BROWSE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT_NAME;
// The shared instance
private static Activator plugin;
@@ -71,6 +79,46 @@ public class Activator implements BundleActivator {
private ServiceTracker proxyServiceTracker = null;
+ private IRegistryChangeListener registryChangeListener = new IRegistryChangeListener() {
+
+ public void registryChanged(IRegistryChangeEvent event) {
+ final IExtensionDelta retrieveDelta[] = event.getExtensionDeltas(PLUGIN_ID, RETRIEVE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT_NAME);
+ for (int i = 0; i < retrieveDelta.length; i++) {
+ switch (retrieveDelta[i].getKind()) {
+ case IExtensionDelta.ADDED :
+ addRetrieveExtensions(retrieveDelta[i].getExtension().getConfigurationElements());
+ break;
+ case IExtensionDelta.REMOVED :
+ removeRetrieveExtensions(retrieveDelta[i].getExtension().getConfigurationElements());
+ break;
+ }
+ }
+ final IExtensionDelta sendDelta[] = event.getExtensionDeltas(PLUGIN_ID, SEND_FILETRANSFER_PROTOCOL_FACTORY_EPOINT_NAME);
+ for (int i = 0; i < sendDelta.length; i++) {
+ switch (sendDelta[i].getKind()) {
+ case IExtensionDelta.ADDED :
+ addSendExtensions(sendDelta[i].getExtension().getConfigurationElements());
+ break;
+ case IExtensionDelta.REMOVED :
+ removeSendExtensions(sendDelta[i].getExtension().getConfigurationElements());
+ break;
+ }
+ }
+ final IExtensionDelta browseDelta[] = event.getExtensionDeltas(PLUGIN_ID, BROWSE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT_NAME);
+ for (int i = 0; i < browseDelta.length; i++) {
+ switch (browseDelta[i].getKind()) {
+ case IExtensionDelta.ADDED :
+ addBrowseExtensions(browseDelta[i].getExtension().getConfigurationElements());
+ break;
+ case IExtensionDelta.REMOVED :
+ removeBrowseExtensions(browseDelta[i].getExtension().getConfigurationElements());
+ break;
+ }
+ }
+ }
+
+ };
+
/**
* The constructor
*/
@@ -131,6 +179,12 @@ public class Activator implements BundleActivator {
return new MultiProtocolRetrieveAdapter();
}
}, null);
+ this.extensionRegistryTracker = new ServiceTracker(ctxt, IExtensionRegistry.class.getName(), null);
+ this.extensionRegistryTracker.open();
+ final IExtensionRegistry registry = getExtensionRegistry();
+ if (registry != null) {
+ registry.addRegistryChangeListener(registryChangeListener);
+ }
// Can't be lazy about this, as schemes need to be registered with
// platform
loadProtocolHandlers();
@@ -144,6 +198,10 @@ public class Activator implements BundleActivator {
public void stop(BundleContext ctxt) throws Exception {
plugin = null;
this.context = null;
+ final IExtensionRegistry registry = getExtensionRegistry();
+ if (registry != null) {
+ registry.removeRegistryChangeListener(registryChangeListener);
+ }
if (extensionRegistryTracker != null) {
extensionRegistryTracker.close();
extensionRegistryTracker = null;
@@ -217,93 +275,258 @@ public class Activator implements BundleActivator {
return (IExtensionRegistry) extensionRegistryTracker.getService();
}
- // TODO we need to be dynamic here
- private void loadProtocolHandlers() {
- this.retrieveFileTransferProtocolMap = new HashMap(3);
- this.sendFileTransferProtocolMap = new HashMap(3);
- this.browseFileTransferProtocolMap = new HashMap(3);
- final IExtensionRegistry reg = getExtensionRegistry();
- if (reg != null) {
- String[] existingSchemes = getPlatformSupportedSchemes();
- final IExtensionPoint retrieveExtensionPoint = reg.getExtensionPoint(RETRIEVE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT);
- if (retrieveExtensionPoint == null)
+ static class ProtocolFactory implements Comparable {
+ Object factory;
+ int priority = 0;
+ String id;
+
+ public ProtocolFactory(Object factory, int priority, String id) {
+ this.factory = factory;
+ this.priority = priority;
+ this.id = id;
+ }
+
+ public Object getFactory() {
+ return factory;
+ }
+
+ public String getID() {
+ return id;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Comparable#compareTo(java.lang.Object)
+ */
+ public int compareTo(Object another) {
+ if (!(another instanceof ProtocolFactory))
+ return -1;
+ ProtocolFactory other = (ProtocolFactory) another;
+ if (this.priority == other.priority)
+ return 0;
+ return (this.priority < other.priority) ? -1 : 1;
+ }
+ }
+
+ private int getPriority(IConfigurationElement configElement, String warning, String protocol) {
+ // Get priority for new entry, if optional priority attribute specified
+ final String priorityString = configElement.getAttribute(PRIORITY_ATTR);
+ int priority = DEFAULT_PRIORITY;
+ if (priorityString != null) {
+ try {
+ priority = new Integer(priorityString).intValue();
+ // Make sure that any negative values are reset to 0 (highest priority)
+ priority = (priority < 0) ? 0 : priority;
+ } catch (NumberFormatException e) {
+ // Give warning
+ Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind(Messages.Activator_WARNING_PRIORITY_ERROR, new Object[] {warning, protocol, configElement.getDeclaringExtension().getContributor().getName(), priorityString, String.valueOf(DEFAULT_PRIORITY)}), null));
+ }
+ }
+ return priority;
+ }
+
+ void addRetrieveExtensions(IConfigurationElement[] configElements) {
+ String[] existingSchemes = getPlatformSupportedSchemes();
+ for (int i = 0; i < configElements.length; i++) {
+ final String protocol = configElements[i].getAttribute(PROTOCOL_ATTR);
+ if (protocol == null || "".equals(protocol)) //$NON-NLS-1$
return;
- final IConfigurationElement[] retrieveConfigurationElements = retrieveExtensionPoint.getConfigurationElements();
- for (int i = 0; i < retrieveConfigurationElements.length; i++) {
- try {
- final String protocol = retrieveConfigurationElements[i].getAttribute(PROTOCOL_ATTR);
- if (protocol == null || "".equals(protocol)) //$NON-NLS-1$
- continue;
- if (retrieveFileTransferProtocolMap.containsKey(protocol)) {
- // Give warning
- Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind(Messages.Activator_WARNING_RETRIEVE_PROTOCOL_CONTRIBUTION_WILL_BE_IGNORED, protocol, retrieveExtensionPoint.getContributor().getName()), null));
- // And continue
- continue;
+ String CONTRIBUTION_WARNING = Messages.Activator_WARNING_RETRIEVE_CONTRIBUTION_PREFIX;
+ try {
+ // First create factory clazz
+ final IRetrieveFileTransferFactory clazz = (IRetrieveFileTransferFactory) configElements[i].createExecutableExtension(CLASS_ATTR);
+ // Get priority for new entry, if optional priority attribute specified
+ int priority = getPriority(configElements[i], CONTRIBUTION_WARNING, protocol);
+ String contributorName = configElements[i].getDeclaringExtension().getContributor().getName();
+ // Now create new ProtocolFactory
+ ProtocolFactory newProtocolFactory = new ProtocolFactory(clazz, priority, contributorName);
+ // Then look for any existing protocol factories under same protocol
+ synchronized (retrieveFileTransferProtocolMap) {
+ ProtocolFactory oldProtocolFactory = (ProtocolFactory) retrieveFileTransferProtocolMap.get(protocol);
+ // If found, choose between them based upon comparing their priority
+ if (oldProtocolFactory != null) {
+ // Now, compare priorities and pic winner
+ int result = oldProtocolFactory.compareTo(newProtocolFactory);
+ if (result < 0) {
+ // Existing one has higher priority, so we provide warning and return (leaving existing one as the handler)
+ Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind(Messages.Activator_WARNING_EXISTING_HIGHER_PRIORITY, new Object[] {CONTRIBUTION_WARNING, protocol, contributorName}), null));
+ continue;
+ } else if (result == 0) {
+ // Warn that we are using new one because they have the same priority.
+ Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind(Messages.Activator_WARNING_SAME_PRIORITY, new Object[] {CONTRIBUTION_WARNING, protocol, contributorName, new Integer(priority)}), null));
+ } else if (result > 0) {
+ // Warn that we are using new one because it has higher priority.
+ Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind(Messages.Activator_WARNING_NEW_HIGHER_PRIORITY, new Object[] {CONTRIBUTION_WARNING, protocol, contributorName, new Integer(priority), new Integer(oldProtocolFactory.priority)}), null));
+ }
}
- final IRetrieveFileTransferFactory clazz = (IRetrieveFileTransferFactory) retrieveConfigurationElements[i].createExecutableExtension(CLASS_ATTR);
if (!isSchemeRegistered(protocol, existingSchemes))
registerScheme(protocol);
// Finally, put clazz in map with protocol as key
- retrieveFileTransferProtocolMap.put(protocol, clazz);
- } catch (final CoreException e) {
- Activator.getDefault().log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, NLS.bind(Messages.Activator_EXCEPTION_LOADING_EXTENSION_POINT, RETRIEVE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT), e));
+ retrieveFileTransferProtocolMap.put(protocol, newProtocolFactory);
}
+ } catch (final CoreException e) {
+ Activator.getDefault().log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, NLS.bind(Messages.Activator_EXCEPTION_LOADING_EXTENSION_POINT, RETRIEVE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT), e));
}
- // Now do it with send
- final IExtensionPoint sendExtensionPoint = reg.getExtensionPoint(SEND_FILETRANSFER_PROTOCOL_FACTORY_EPOINT);
- if (sendExtensionPoint == null) {
+ }
+ }
+
+ void removeRetrieveExtensions(IConfigurationElement[] configElements) {
+ for (int i = 0; i < configElements.length; i++) {
+ final String protocol = configElements[i].getAttribute(PROTOCOL_ATTR);
+ if (protocol == null || "".equals(protocol)) //$NON-NLS-1$
return;
+ synchronized (retrieveFileTransferProtocolMap) {
+ ProtocolFactory protocolFactory = (ProtocolFactory) retrieveFileTransferProtocolMap.get(protocol);
+ if (protocolFactory != null) {
+ // If the contributor that is leaving is the one responsible for the protocol factory then remove
+ if (configElements[i].getContributor().getName().equals(protocolFactory.getID())) {
+ retrieveFileTransferProtocolMap.remove(protocol);
+ }
+ }
}
- final IConfigurationElement[] sendConfigurationElements = sendExtensionPoint.getConfigurationElements();
- existingSchemes = getPlatformSupportedSchemes();
- for (int i = 0; i < sendConfigurationElements.length; i++) {
- try {
- final String protocol = sendConfigurationElements[i].getAttribute(PROTOCOL_ATTR);
- if (protocol == null || "".equals(protocol)) //$NON-NLS-1$
- continue;
- if (sendFileTransferProtocolMap.containsKey(protocol)) {
- // Give warning
- Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind(Messages.Activator_WARNING_SEND_PROTOCOL_CONTRIBUTION_IGNORED, protocol, sendExtensionPoint.getContributor().getName()), null));
- // And continue
- continue;
+ }
+ }
+
+ void addSendExtensions(IConfigurationElement[] configElements) {
+ String[] existingSchemes = getPlatformSupportedSchemes();
+ for (int i = 0; i < configElements.length; i++) {
+ final String protocol = configElements[i].getAttribute(PROTOCOL_ATTR);
+ if (protocol == null || "".equals(protocol)) //$NON-NLS-1$
+ return;
+ String CONTRIBUTION_WARNING = Messages.Activator_WARNING_SEND_CONTRIBUTION_PREFIX;
+ try {
+ // First create factory clazz
+ final ISendFileTransferFactory clazz = (ISendFileTransferFactory) configElements[i].createExecutableExtension(CLASS_ATTR);
+ // Get priority for new entry, if optional priority attribute specified
+ int priority = getPriority(configElements[i], CONTRIBUTION_WARNING, protocol);
+ String contributorName = configElements[i].getDeclaringExtension().getContributor().getName();
+ // Now create new ProtocolFactory
+ ProtocolFactory newProtocolFactory = new ProtocolFactory(clazz, priority, contributorName);
+ // Then look for any existing protocol factories under same protocol
+ synchronized (sendFileTransferProtocolMap) {
+ ProtocolFactory oldProtocolFactory = (ProtocolFactory) sendFileTransferProtocolMap.get(protocol);
+ // If found, choose between them based upon comparing their priority
+ if (oldProtocolFactory != null) {
+ // Now, compare priorities and pic winner
+ int result = oldProtocolFactory.compareTo(newProtocolFactory);
+ if (result < 0) {
+ // Existing one has higher priority, so we provide warning and return (leaving existing one as the handler)
+ Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind(Messages.Activator_WARNING_EXISTING_HIGHER_PRIORITY, new Object[] {CONTRIBUTION_WARNING, protocol, contributorName}), null));
+ continue;
+ } else if (result == 0) {
+ // Warn that we are using new one because they have the same priority.
+ Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind(Messages.Activator_WARNING_SAME_PRIORITY, new Object[] {CONTRIBUTION_WARNING, protocol, contributorName, new Integer(priority)}), null));
+ } else if (result > 0) {
+ // Warn that we are using new one because it has higher priority.
+ Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind(Messages.Activator_WARNING_NEW_HIGHER_PRIORITY, new Object[] {CONTRIBUTION_WARNING, protocol, contributorName, new Integer(priority), new Integer(oldProtocolFactory.priority)}), null));
+ }
}
- final ISendFileTransferFactory clazz = (ISendFileTransferFactory) sendConfigurationElements[i].createExecutableExtension(CLASS_ATTR);
if (!isSchemeRegistered(protocol, existingSchemes))
registerScheme(protocol);
// Finally, put clazz in map with protocol as key
- sendFileTransferProtocolMap.put(protocol, clazz);
- } catch (final CoreException e) {
- Activator.getDefault().log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, NLS.bind(Messages.Activator_EXCEPTION_LOADING_EXTENSION_POINT, SEND_FILETRANSFER_PROTOCOL_FACTORY_EPOINT), e));
+ sendFileTransferProtocolMap.put(protocol, newProtocolFactory);
}
+ } catch (final CoreException e) {
+ Activator.getDefault().log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, NLS.bind(Messages.Activator_EXCEPTION_LOADING_EXTENSION_POINT, SEND_FILETRANSFER_PROTOCOL_FACTORY_EPOINT), e));
}
- // Now for browse
- final IExtensionPoint browseExtensionPoint = reg.getExtensionPoint(BROWSE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT);
- if (browseExtensionPoint == null) {
+ }
+ }
+
+ void removeSendExtensions(IConfigurationElement[] configElements) {
+ for (int i = 0; i < configElements.length; i++) {
+ final String protocol = configElements[i].getAttribute(PROTOCOL_ATTR);
+ if (protocol == null || "".equals(protocol)) //$NON-NLS-1$
return;
+ synchronized (sendFileTransferProtocolMap) {
+ ProtocolFactory protocolFactory = (ProtocolFactory) sendFileTransferProtocolMap.get(protocol);
+ if (protocolFactory != null) {
+ // If the contributor that is leaving is the one responsible for the protocol factory then remove
+ if (configElements[i].getContributor().getName().equals(protocolFactory.getID())) {
+ sendFileTransferProtocolMap.remove(protocol);
+ }
+ }
}
- final IConfigurationElement[] browseConfigurationElements = browseExtensionPoint.getConfigurationElements();
- existingSchemes = getPlatformSupportedSchemes();
- for (int i = 0; i < browseConfigurationElements.length; i++) {
- try {
- final String protocol = browseConfigurationElements[i].getAttribute(PROTOCOL_ATTR);
- if (protocol == null || "".equals(protocol)) //$NON-NLS-1$
- continue;
- if (browseFileTransferProtocolMap.containsKey(protocol)) {
- // Give warning
- Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind(Messages.Activator_WARNING_BROWSE_PROTOCOL_CONTRIBUTION_IGNORED, protocol, browseExtensionPoint.getContributor().getName()), null));
- // And continue
- continue;
+ }
+ }
+
+ void addBrowseExtensions(IConfigurationElement[] configElements) {
+ String[] existingSchemes = getPlatformSupportedSchemes();
+ for (int i = 0; i < configElements.length; i++) {
+ final String protocol = configElements[i].getAttribute(PROTOCOL_ATTR);
+ if (protocol == null || "".equals(protocol)) //$NON-NLS-1$
+ return;
+ String CONTRIBUTION_WARNING = Messages.Activator_WARNING_BROWSE_CONTRIBUTION_PREFIX;
+ try {
+ // First create factory clazz
+ final IRemoteFileSystemBrowserFactory clazz = (IRemoteFileSystemBrowserFactory) configElements[i].createExecutableExtension(CLASS_ATTR);
+ // Get priority for new entry, if optional priority attribute specified
+ int priority = getPriority(configElements[i], CONTRIBUTION_WARNING, protocol);
+ String contributorName = configElements[i].getDeclaringExtension().getContributor().getName();
+ // Now create new ProtocolFactory
+ ProtocolFactory newProtocolFactory = new ProtocolFactory(clazz, priority, contributorName);
+ synchronized (browseFileTransferProtocolMap) {
+ // Then look for any existing protocol factories under same protocol
+ ProtocolFactory oldProtocolFactory = (ProtocolFactory) browseFileTransferProtocolMap.get(protocol);
+ // If found, choose between them based upon comparing their priority
+ if (oldProtocolFactory != null) {
+ // Now, compare priorities and pic winner
+ int result = oldProtocolFactory.compareTo(newProtocolFactory);
+ if (result < 0) {
+ // Existing one has higher priority, so we provide warning and return (leaving existing one as the handler)
+ Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind(Messages.Activator_WARNING_EXISTING_HIGHER_PRIORITY, new Object[] {CONTRIBUTION_WARNING, protocol, contributorName}), null));
+ continue;
+ } else if (result == 0) {
+ // Warn that we are using new one because they have the same priority.
+ Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind(Messages.Activator_WARNING_SAME_PRIORITY, new Object[] {CONTRIBUTION_WARNING, protocol, contributorName, new Integer(priority)}), null));
+ } else if (result > 0) {
+ // Warn that we are using new one because it has higher priority.
+ Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind(Messages.Activator_WARNING_NEW_HIGHER_PRIORITY, new Object[] {CONTRIBUTION_WARNING, protocol, contributorName, new Integer(priority), new Integer(oldProtocolFactory.priority)}), null));
+ }
}
- final IRemoteFileSystemBrowserFactory clazz = (IRemoteFileSystemBrowserFactory) browseConfigurationElements[i].createExecutableExtension(CLASS_ATTR);
if (!isSchemeRegistered(protocol, existingSchemes))
registerScheme(protocol);
// Finally, put clazz in map with protocol as key
- browseFileTransferProtocolMap.put(protocol, clazz);
- } catch (final CoreException e) {
- Activator.getDefault().log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, NLS.bind(Messages.Activator_EXCEPTION_LOADING_EXTENSION_POINT, BROWSE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT), e));
+ browseFileTransferProtocolMap.put(protocol, newProtocolFactory);
+ }
+ } catch (final CoreException e) {
+ Activator.getDefault().log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, NLS.bind(Messages.Activator_EXCEPTION_LOADING_EXTENSION_POINT, BROWSE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT), e));
+ }
+ }
+ }
+
+ void removeBrowseExtensions(IConfigurationElement[] configElements) {
+ for (int i = 0; i < configElements.length; i++) {
+ final String protocol = configElements[i].getAttribute(PROTOCOL_ATTR);
+ if (protocol == null || "".equals(protocol)) //$NON-NLS-1$
+ return;
+ synchronized (browseFileTransferProtocolMap) {
+ ProtocolFactory protocolFactory = (ProtocolFactory) browseFileTransferProtocolMap.get(protocol);
+ if (protocolFactory != null) {
+ // If the contributor that is leaving is the one responsible for the protocol factory then remove
+ if (configElements[i].getContributor().getName().equals(protocolFactory.getID())) {
+ browseFileTransferProtocolMap.remove(protocol);
+ }
}
}
+ }
+ }
+ private void loadProtocolHandlers() {
+ this.retrieveFileTransferProtocolMap = new HashMap(3);
+ this.sendFileTransferProtocolMap = new HashMap(3);
+ this.browseFileTransferProtocolMap = new HashMap(3);
+ final IExtensionRegistry reg = getExtensionRegistry();
+ if (reg != null) {
+ final IExtensionPoint retrieveExtensionPoint = reg.getExtensionPoint(RETRIEVE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT);
+ if (retrieveExtensionPoint != null)
+ addRetrieveExtensions(retrieveExtensionPoint.getConfigurationElements());
+ // Now do it with send
+ final IExtensionPoint sendExtensionPoint = reg.getExtensionPoint(SEND_FILETRANSFER_PROTOCOL_FACTORY_EPOINT);
+ if (sendExtensionPoint != null)
+ addSendExtensions(sendExtensionPoint.getConfigurationElements());
+ // Now for browse
+ final IExtensionPoint browseExtensionPoint = reg.getExtensionPoint(BROWSE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT);
+ if (browseExtensionPoint != null)
+ addBrowseExtensions(browseExtensionPoint.getConfigurationElements());
}
}
@@ -337,21 +560,39 @@ public class Activator implements BundleActivator {
}
public IRetrieveFileTransfer getFileTransfer(String protocol) {
- final IRetrieveFileTransferFactory factory = (IRetrieveFileTransferFactory) retrieveFileTransferProtocolMap.get(protocol);
+ ProtocolFactory protocolFactory = null;
+ synchronized (retrieveFileTransferProtocolMap) {
+ protocolFactory = (ProtocolFactory) retrieveFileTransferProtocolMap.get(protocol);
+ }
+ if (protocolFactory == null)
+ return null;
+ final IRetrieveFileTransferFactory factory = (IRetrieveFileTransferFactory) protocolFactory.getFactory();
if (factory != null)
return factory.newInstance();
return null;
}
public ISendFileTransfer getSendFileTransfer(String protocol) {
- final ISendFileTransferFactory factory = (ISendFileTransferFactory) sendFileTransferProtocolMap.get(protocol);
+ ProtocolFactory protocolFactory = null;
+ synchronized (sendFileTransferProtocolMap) {
+ protocolFactory = (ProtocolFactory) sendFileTransferProtocolMap.get(protocol);
+ }
+ if (protocolFactory == null)
+ return null;
+ final ISendFileTransferFactory factory = (ISendFileTransferFactory) protocolFactory.getFactory();
if (factory != null)
return factory.newInstance();
return null;
}
public IRemoteFileSystemBrowser getBrowseFileTransfer(String protocol) {
- final IRemoteFileSystemBrowserFactory factory = (IRemoteFileSystemBrowserFactory) browseFileTransferProtocolMap.get(protocol);
+ ProtocolFactory protocolFactory = null;
+ synchronized (browseFileTransferProtocolMap) {
+ protocolFactory = (ProtocolFactory) browseFileTransferProtocolMap.get(protocol);
+ }
+ if (protocolFactory == null)
+ return null;
+ final IRemoteFileSystemBrowserFactory factory = (IRemoteFileSystemBrowserFactory) protocolFactory.getFactory();
if (factory != null)
return factory.newInstance();
return null;
diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/Messages.java b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/Messages.java
index 541319ea1..16a2be9bf 100644
--- a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/Messages.java
+++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/Messages.java
@@ -43,9 +43,16 @@ public class Messages extends NLS {
public static String AbstractOutgoingFileTransfer_TransferListener_Not_Null;
public static String Activator_EXCEPTION_LOADING_EXTENSION_POINT;
public static String Activator_EXCEPTION_URLConnection_CANNOT_BE_CREATED;
+ public static String Activator_WARNING_RETRIEVE_CONTRIBUTION_PREFIX;
public static String Activator_WARNING_RETRIEVE_PROTOCOL_CONTRIBUTION_WILL_BE_IGNORED;
+ public static String Activator_WARNING_SAME_PRIORITY;
+ public static String Activator_WARNING_SEND_CONTRIBUTION_PREFIX;
public static String Activator_WARNING_SEND_PROTOCOL_CONTRIBUTION_IGNORED;
+ public static String Activator_WARNING_BROWSE_CONTRIBUTION_PREFIX;
public static String Activator_WARNING_BROWSE_PROTOCOL_CONTRIBUTION_IGNORED;
+ public static String Activator_WARNING_EXISTING_HIGHER_PRIORITY;
+ public static String Activator_WARNING_NEW_HIGHER_PRIORITY;
+ public static String Activator_WARNING_PRIORITY_ERROR;
public static String UrlConnectionRetrieveFileTransfer_RESUME_START_ERROR;
public static String UrlConnectionRetrieveFileTransfer_INVALID_SERVER_RESPONSE_TO_PARTIAL_RANGE_REQUEST;
public static String UrlConnectionRetrieveFileTransfer_RESUME_ERROR_END_POSITION_LESS_THAN_START;
diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/messages.properties b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/messages.properties
index 8675b0524..d13ab335a 100644
--- a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/messages.properties
+++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/messages.properties
@@ -66,9 +66,16 @@ SslProtocolSocketFactory_SSLContext_Instance=SSL
SslProtocolSocketFactory_Status_Create_Error=SslProtocolSocketFactory
Activator_EXCEPTION_LOADING_EXTENSION_POINT=Error loading from {0} extension point
Activator_EXCEPTION_URLConnection_CANNOT_BE_CREATED=URLConnection cannot be created for {0}
+Activator_WARNING_RETRIEVE_CONTRIBUTION_PREFIX=File retrieve contribution
Activator_WARNING_RETRIEVE_PROTOCOL_CONTRIBUTION_WILL_BE_IGNORED=Protocol {0} already defined for retrieve file transfer. Contribution from {1} will be ignored.
+Activator_WARNING_SAME_PRIORITY={0} for protocol {1} from {2} will be used in preference to existing handler. Both have same priority={3}.
+Activator_WARNING_SEND_CONTRIBUTION_PREFIX=File send contribution
Activator_WARNING_SEND_PROTOCOL_CONTRIBUTION_IGNORED=Protocol {0} already defined for send file transfer. Contribution from {1} will be ignored.
+Activator_WARNING_BROWSE_CONTRIBUTION_PREFIX=File browse contribution
Activator_WARNING_BROWSE_PROTOCOL_CONTRIBUTION_IGNORED=Protocol {0} already defined for remote file browsing. Contribution from {1} will be ignored.
+Activator_WARNING_EXISTING_HIGHER_PRIORITY={0} for protocol {1} from {2} will be ignored. Existing protocol factory has higher priority.
+Activator_WARNING_NEW_HIGHER_PRIORITY={0} for protocol {1} from {2} will be used in preference to existing handler. New handler has higher priority={3}<{4}.
+Activator_WARNING_PRIORITY_ERROR={0} for {1} from {2} has invalid priority {3}. Priority will be set to {4}
LocalFileOutgoingFileTransfer_EXCEPTION_OPENING_FOR_INPUT=Exception opening file {0} for input.
LocalFileOutgoingFileTransfer_EXCEPTION_OPENING_FOR_OUTPUT=Exception opening {0} for output.
MultiProtocolOutgoingAdapter_EXCEPTION_NO_PROTOCOL_HANDER=No protocol handler for {0}

Back to the top