Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/AbstractChannel.java6
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/IChannel.java1
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/PathMapRuleDialog.java4
3 files changed, 7 insertions, 4 deletions
diff --git a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/AbstractChannel.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/AbstractChannel.java
index 5c39a7d50..959a34907 100644
--- a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/AbstractChannel.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/AbstractChannel.java
@@ -744,11 +744,13 @@ public abstract class AbstractChannel implements IChannel {
}
public <V extends IService> void setServiceProxy(Class<V> service_interface, IService service_proxy) {
+ String name = service_proxy.getName();
+ if (remote_service_by_name.get(name) == null) throw new Error("Service not available");
if (!notifying_channel_opened) throw new Error("setServiceProxe() can be called only from channel open call-back");
- if (!(remote_service_by_name.get(service_proxy.getName()) instanceof GenericProxy)) throw new Error("Proxy already set");
+ if (!(remote_service_by_name.get(name) instanceof GenericProxy)) throw new Error("Proxy already set");
if (remote_service_by_class.get(service_interface) != null) throw new Error("Proxy already set");
remote_service_by_class.put(service_interface, service_proxy);
- remote_service_by_name.put(service_proxy.getName(), service_proxy);
+ remote_service_by_name.put(name, service_proxy);
}
public IService getLocalService(String service_name) {
diff --git a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/IChannel.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/IChannel.java
index 0209772cc..8d3a5d89f 100644
--- a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/IChannel.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/IChannel.java
@@ -282,6 +282,7 @@ public interface IChannel {
* using either Protocol.addChannelOpenListener() or IChannel.addChannelListener().
* It is not allowed to install more then one proxy for a given service interface on
* a particular channel.
+ * See also Protocol.addServiceProvider().
* @param service_interface - service interface class
* @param service_proxy - service proxy object
*/
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/PathMapRuleDialog.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/PathMapRuleDialog.java
index c7d0101ef..334d78aec 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/PathMapRuleDialog.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/PathMapRuleDialog.java
@@ -53,7 +53,7 @@ class PathMapRuleDialog extends TitleAreaDialog {
this.showContextQuery = showContextQuery;
setHelpAvailable(false);
}
-
+
@Override
protected void configureShell(Shell shell) {
super.configureShell(shell);
@@ -72,7 +72,7 @@ class PathMapRuleDialog extends TitleAreaDialog {
protected Control createDialogArea(Composite parent) {
setTitle("Add or edit source and destination path mapping rule"); //$NON-NLS-1$
setMessage("Source and destination are absolute path fragments.\nThe rule is applied if the source path fragment matches or is a prefix of a path to map."); //$NON-NLS-1$
-
+
Composite composite = (Composite)super.createDialogArea(parent);
createFileNameFields(composite);
setData();

Back to the top