diff options
author | slewis | 2008-03-14 21:08:42 +0000 |
---|---|---|
committer | slewis | 2008-03-14 21:08:42 +0000 |
commit | 1b9b6bfe8652606c21c3667eda254c5d17cd6af8 (patch) | |
tree | 07bd7ff2e6f30b4b11676fe5977dc5a709b0f6cf /framework/bundles/org.eclipse.ecf.datashare | |
parent | f063dc36e01f4065ca4bc0dd1884e4ff50f05fea (diff) | |
download | org.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
Diffstat (limited to 'framework/bundles/org.eclipse.ecf.datashare')
-rw-r--r-- | framework/bundles/org.eclipse.ecf.datashare/src/org/eclipse/ecf/datashare/AbstractShare.java | 12 |
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); } /** |