summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-08-06 04:15:04 (EDT)
committerEike Stepper2007-08-06 04:15:04 (EDT)
commitc3bc0eab651bada892704ad94501e25cac550941 (patch)
treeae12ff0cbd2f62f5396fb68b80d96a59297d672b
parentb4590931b7fe4adc5f08f4b9b35641e47edaeb0c (diff)
downloadcdo-c3bc0eab651bada892704ad94501e25cac550941.zip
cdo-c3bc0eab651bada892704ad94501e25cac550941.tar.gz
cdo-c3bc0eab651bada892704ad94501e25cac550941.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RegisterGeneratedPackagesAction.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/SelectPackageDialog.java11
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Connector.java5
3 files changed, 16 insertions, 5 deletions
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RegisterGeneratedPackagesAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RegisterGeneratedPackagesAction.java
index c3f6adc..291220e 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RegisterGeneratedPackagesAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RegisterGeneratedPackagesAction.java
@@ -21,6 +21,7 @@ import org.eclipse.ui.IWorkbenchPage;
import java.util.ArrayList;
import java.util.List;
+import java.util.Set;
/**
* @author Eike Stepper
@@ -45,8 +46,8 @@ public class RegisterGeneratedPackagesAction extends RegisterPackagesAction
if (dialog.open() == SelectPackageDialog.OK)
{
- String[] checkedURIs = dialog.getCheckedURIs();
- List<EPackage> ePackages = new ArrayList(checkedURIs.length);
+ Set<String> checkedURIs = dialog.getCheckedURIs();
+ List<EPackage> ePackages = new ArrayList(checkedURIs.size());
for (String uri : checkedURIs)
{
EPackage ePackage = registry.getEPackage(uri);
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/SelectPackageDialog.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/SelectPackageDialog.java
index 408fcc2..d0aae1c 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/SelectPackageDialog.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/SelectPackageDialog.java
@@ -51,7 +51,7 @@ public class SelectPackageDialog extends BaseDialog<CheckboxTableViewer>
private Set<String> excludedURIs = new HashSet();
- private String[] checkedURIs = {};
+ private Set<String> checkedURIs = new HashSet();
public SelectPackageDialog(Shell shell, String title, String message, Set<String> excludedURIs)
{
@@ -64,7 +64,7 @@ public class SelectPackageDialog extends BaseDialog<CheckboxTableViewer>
this(shell, title, message, NO_URIS);
}
- public String[] getCheckedURIs()
+ public Set<String> getCheckedURIs()
{
return checkedURIs;
}
@@ -106,7 +106,12 @@ public class SelectPackageDialog extends BaseDialog<CheckboxTableViewer>
@Override
protected void okPressed()
{
- checkedURIs = (String[])getCurrentViewer().getCheckedElements();
+ Object[] checkedElements = getCurrentViewer().getCheckedElements();
+ for (Object checkedElement : checkedElements)
+ {
+ checkedURIs.add((String)checkedElement);
+ }
+
super.okPressed();
}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Connector.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Connector.java
index 0aaca97..cffceee 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Connector.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Connector.java
@@ -473,6 +473,11 @@ public abstract class Connector extends Lifecycle implements IConnector
throw new IllegalArgumentException("channel == null");
}
+ if (!isConnected())
+ {
+ return false;
+ }
+
boolean removed = channelsLock.write(new Callable<Boolean>()
{
public Boolean call() throws Exception