Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2008-03-14 21:08:42 +0000
committerslewis2008-03-14 21:08:42 +0000
commit1b9b6bfe8652606c21c3667eda254c5d17cd6af8 (patch)
tree07bd7ff2e6f30b4b11676fe5977dc5a709b0f6cf
parentf063dc36e01f4065ca4bc0dd1884e4ff50f05fea (diff)
downloadorg.eclipse.ecf-1b9b6bfe8652606c21c3667eda254c5d17cd6af8.tar.gz
org.eclipse.ecf-1b9b6bfe8652606c21c3667eda254c5d17cd6af8.tar.xz
org.eclipse.ecf-1b9b6bfe8652606c21c3667eda254c5d17cd6af8.zip
Fix for screen capture dialog image capture, sizing issues, and handling multiple simultaneous senders
-rw-r--r--framework/bundles/org.eclipse.ecf.datashare/src/org/eclipse/ecf/datashare/AbstractShare.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/framework/bundles/org.eclipse.ecf.datashare/src/org/eclipse/ecf/datashare/AbstractShare.java b/framework/bundles/org.eclipse.ecf.datashare/src/org/eclipse/ecf/datashare/AbstractShare.java
index 18f669b4e..270b27c23 100644
--- a/framework/bundles/org.eclipse.ecf.datashare/src/org/eclipse/ecf/datashare/AbstractShare.java
+++ b/framework/bundles/org.eclipse.ecf.datashare/src/org/eclipse/ecf/datashare/AbstractShare.java
@@ -36,9 +36,17 @@ public abstract class AbstractShare {
}
};
+ private void getOrCreateChannel(IChannelContainerAdapter containerAdapter, ID channelID, Map options) throws ECFException {
+ if (channelID == null)
+ channelID = IDFactory.getDefault().createStringID(this.getClass().getName());
+ channel = containerAdapter.getChannel(channelID);
+ if (channel == null)
+ channel = containerAdapter.createChannel(channelID, listener, options);
+ }
+
public AbstractShare(IChannelContainerAdapter adapter) throws ECFException {
Assert.isNotNull(adapter);
- channel = adapter.createChannel(IDFactory.getDefault().createStringID(this.getClass().getName()), listener, null);
+ getOrCreateChannel(adapter, null, null);
}
public AbstractShare(IChannelContainerAdapter adapter, ID channelID) throws ECFException {
@@ -48,7 +56,7 @@ public abstract class AbstractShare {
public AbstractShare(IChannelContainerAdapter adapter, ID channelID, Map options) throws ECFException {
Assert.isNotNull(adapter);
Assert.isNotNull(channelID);
- channel = adapter.createChannel(channelID, listener, options);
+ getOrCreateChannel(adapter, channelID, options);
}
/**

Back to the top