Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-06-07 10:14:51 +0000
committerEike Stepper2012-06-07 10:14:51 +0000
commita25531ae8a5c85586fdb590c0f806be3a807b634 (patch)
tree7849f8065be919611dabd87403f9bf5a1743cee7 /plugins/org.eclipse.net4j.ui/src
parentb48ccc46da60cf75aef219ae635c627fb49d3cf2 (diff)
downloadcdo-a25531ae8a5c85586fdb590c0f806be3a807b634.tar.gz
cdo-a25531ae8a5c85586fdb590c0f806be3a807b634.tar.xz
cdo-a25531ae8a5c85586fdb590c0f806be3a807b634.zip
[381472] Design a repository administration API
https://bugs.eclipse.org/bugs/show_bug.cgi?id=381472
Diffstat (limited to 'plugins/org.eclipse.net4j.ui/src')
-rw-r--r--plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/internal/ui/container/TCPAcceptorWizard.java5
-rw-r--r--plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/internal/ui/container/TCPConnectorWizard.java21
-rw-r--r--plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/ui/FactoryTypeContentProvider.java87
3 files changed, 39 insertions, 74 deletions
diff --git a/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/internal/ui/container/TCPAcceptorWizard.java b/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/internal/ui/container/TCPAcceptorWizard.java
index 6a855cb114..9cbb9a5ead 100644
--- a/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/internal/ui/container/TCPAcceptorWizard.java
+++ b/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/internal/ui/container/TCPAcceptorWizard.java
@@ -11,9 +11,8 @@
*/
package org.eclipse.net4j.internal.ui.container;
-import org.eclipse.net4j.internal.tcp.TCPAcceptorFactory;
-import org.eclipse.net4j.internal.tcp.TCPAcceptorFactory.Data;
import org.eclipse.net4j.internal.ui.bundle.OM;
+import org.eclipse.net4j.tcp.TCPUtil.AcceptorData;
import org.eclipse.net4j.util.factory.ProductCreationException;
import org.eclipse.net4j.util.ui.container.ElementWizard;
import org.eclipse.net4j.util.ui.container.ElementWizardFactory;
@@ -53,7 +52,7 @@ public class TCPAcceptorWizard extends ElementWizard implements ModifyListener
{
try
{
- Data data = new TCPAcceptorFactory.Data(description);
+ AcceptorData data = new AcceptorData(description);
addressText.setText(data.getAddress());
portText.setText(Integer.toString(data.getPort()));
}
diff --git a/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/internal/ui/container/TCPConnectorWizard.java b/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/internal/ui/container/TCPConnectorWizard.java
index ba7ebe7894..63fe7c849a 100644
--- a/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/internal/ui/container/TCPConnectorWizard.java
+++ b/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/internal/ui/container/TCPConnectorWizard.java
@@ -12,6 +12,7 @@
package org.eclipse.net4j.internal.ui.container;
import org.eclipse.net4j.internal.ui.bundle.OM;
+import org.eclipse.net4j.tcp.TCPUtil.ConnectorData;
import org.eclipse.net4j.util.factory.ProductCreationException;
import org.eclipse.net4j.util.ui.container.ElementWizard;
import org.eclipse.net4j.util.ui.container.ElementWizardFactory;
@@ -22,9 +23,6 @@ import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Text;
-import java.net.MalformedURLException;
-import java.net.URL;
-
/**
* @author Eike Stepper
* @author Martin Fluegge
@@ -54,20 +52,13 @@ public class TCPConnectorWizard extends ElementWizard implements ModifyListener
{
try
{
- // TODO Don't use URL
- // Scheme "tcp://" would be rejected!
- URL url = new URL("http://" + description);
- // String userID = url.getUserInfo();
- hostText.setText(url.getHost());
- int port = url.getPort();
- if (port != -1)
- {
- portText.setText(Integer.toString(port));
- }
+ ConnectorData data = new ConnectorData(description);
+ hostText.setText(data.getHost());
+ portText.setText(Integer.toString(data.getPort()));
}
- catch (MalformedURLException ex)
+ catch (NoClassDefFoundError error)
{
- OM.LOG.error(ex);
+ OM.LOG.error(error);
}
}
}
diff --git a/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/ui/FactoryTypeContentProvider.java b/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/ui/FactoryTypeContentProvider.java
index 4f7963fcf0..559d12ef1a 100644
--- a/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/ui/FactoryTypeContentProvider.java
+++ b/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/ui/FactoryTypeContentProvider.java
@@ -1,56 +1,31 @@
-/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.ui;
-
-import org.eclipse.net4j.util.container.IManagedContainer;
-import org.eclipse.net4j.util.factory.IFactoryKey;
-import org.eclipse.net4j.util.ui.StructuredContentProvider;
-
-/**
- * A {@link StructuredContentProvider structured content provider} that shows the {@link IFactoryKey#getType() factory
- * types} of the {@link #getInput() input}.
- *
- * @author Eike Stepper
- * @since 4.0
- */
-public class FactoryTypeContentProvider extends StructuredContentProvider<IManagedContainer>
-{
- private String productGroup;
-
- public FactoryTypeContentProvider(String productGroup)
- {
- this.productGroup = productGroup;
- }
-
- public String getProductGroup()
- {
- return productGroup;
- }
-
- public Object[] getElements(Object inputElement)
- {
- return getInput().getFactoryTypes(productGroup).toArray();
- }
-
- @Override
- protected void connectInput(IManagedContainer input)
- {
- input.addListener(this);
- input.getFactoryRegistry().addListener(this);
- }
-
- @Override
- protected void disconnectInput(IManagedContainer input)
- {
- input.removeListener(this);
- input.getFactoryRegistry().removeListener(this);
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.ui;
+
+import org.eclipse.net4j.util.factory.IFactoryKey;
+import org.eclipse.net4j.util.ui.StructuredContentProvider;
+
+/**
+ * A {@link StructuredContentProvider structured content provider} that shows the {@link IFactoryKey#getType() factory
+ * types} of the {@link #getInput() input}.
+ *
+ * @author Eike Stepper
+ * @since 4.0
+ * @deprecated As of 4.1 use {@link org.eclipse.net4j.util.ui.FactoryTypeContentProvider}
+ */
+@Deprecated
+public class FactoryTypeContentProvider extends org.eclipse.net4j.util.ui.FactoryTypeContentProvider
+{
+ public FactoryTypeContentProvider(String productGroup)
+ {
+ super(productGroup);
+ }
+}

Back to the top