Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2095 - in development/laboratory/ide/eclipse/magic/plugin: lib src/net/dpml/ide/eclipse/plugins/magic

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell AT dpml.net
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r2095 - in development/laboratory/ide/eclipse/magic/plugin: lib src/net/dpml/ide/eclipse/plugins/magic
  • Date: Sun, 20 Mar 2005 16:02:31 -0500

Author: mcconnell AT dpml.net
Date: Sun Mar 20 16:02:31 2005
New Revision: 2095

Added:

development/laboratory/ide/eclipse/magic/plugin/lib/dpml-transit-main-SNAPSHOT.jar
(contents, props changed)
Removed:
development/laboratory/ide/eclipse/magic/plugin/lib/dpml-transit-main.jar
Modified:

development/laboratory/ide/eclipse/magic/plugin/src/net/dpml/ide/eclipse/plugins/magic/ArtifactURLHandler.java

development/laboratory/ide/eclipse/magic/plugin/src/net/dpml/ide/eclipse/plugins/magic/MagicPlugin.java
Log:
more work on registering artifact protocol in Eclipse

Added:
development/laboratory/ide/eclipse/magic/plugin/lib/dpml-transit-main-SNAPSHOT.jar
==============================================================================
Binary file. No diff available.

Modified:
development/laboratory/ide/eclipse/magic/plugin/src/net/dpml/ide/eclipse/plugins/magic/ArtifactURLHandler.java
==============================================================================
---
development/laboratory/ide/eclipse/magic/plugin/src/net/dpml/ide/eclipse/plugins/magic/ArtifactURLHandler.java
(original)
+++
development/laboratory/ide/eclipse/magic/plugin/src/net/dpml/ide/eclipse/plugins/magic/ArtifactURLHandler.java
Sun Mar 20 16:02:31 2005
@@ -11,65 +11,89 @@
package net.dpml.ide.eclipse.plugins.magic;

import java.io.IOException;
-import java.lang.reflect.Constructor;
-import java.net.MalformedURLException;
+import java.net.InetAddress;
import java.net.URL;
import java.net.URLConnection;
-import java.util.Hashtable;

-import net.dpml.transit.TransitException;
import net.dpml.transit.artifact.Handler;

-import org.osgi.service.url.AbstractURLStreamHandlerService;
+import org.osgi.service.url.URLStreamHandlerService;
import org.osgi.service.url.URLStreamHandlerSetter;

/**
* URL handler for the "artifact" protocol
*/
-public class ArtifactURLHandler extends AbstractURLStreamHandlerService
+public class ArtifactURLHandler extends Handler implements
URLStreamHandlerService
{
+ public static final String PROTOCOL = "artifact";

- private static Hashtable connectionType = new Hashtable();
+ public ArtifactURLHandler() throws IOException
+ {
+ super();
+ }
+
+ public URLConnection openConnection(URL u) throws IOException {
+ return super.openConnection( u );
+ }
+
+ public void parseURL(URLStreamHandlerSetter realHandler, URL u,
String spec, int start, int limit) {
+ super.parseURL( u, spec, start, limit );
+ }
+
+ /**
+ * @see "java.net.URLStreamHandler.toExternalForm"
+ */
+ public String toExternalForm(URL u )
+ {
+ return super.toExternalForm( u );
+ }
+
+ /**
+ * @see "java.net.URLStreamHandler.equals(URL, URL)"
+ */
+ public boolean equals(URL u1, URL u2)
+ {
+ return super.equals( u1, u2 );
+ }
+
+ /**
+ * @see "java.net.URLStreamHandler.getDefaultPort"
+ */
+ public int getDefaultPort()
+ {
+ return super.getDefaultPort();
+ }
+
+ /**
+ * @see "java.net.URLStreamHandler.getHostAddress"
+ */
+ public InetAddress getHostAddress( URL u )
+ {
+ return super.getHostAddress( u );
+ }
+
+ /**
+ * @see "java.net.URLStreamHandler.hashCode(URL)"
+ */
+ public int hashCode(URL u)
+ {
+ return super.hashCode(u);
+ }
+
+ /**
+ * @see "java.net.URLStreamHandler.hostsEqual"
+ */
+ public boolean hostsEqual(URL u1, URL u2)
+ {
+ return super.hostsEqual(u1, u2);
+ }
+
+ /**
+ * @see "java.net.URLStreamHandler.sameFile"
+ */
+ public boolean sameFile(URL u1, URL u2)
+ {
+ return super.sameFile(u1, u2);
+ }

- // URL protocol designations
- public static final String PROTOCOL = "artifact";
//$NON-NLS-1$
-
- public static final String FILE = "file";
//$NON-NLS-1$
-
- public static final String JAR = "jar";
//$NON-NLS-1$
-
- public static final String BUNDLE = "bundle";
//$NON-NLS-1$
-
- public static final String JAR_SEPARATOR = "!/";
//$NON-NLS-1$
-
- public static final String PROTOCOL_SEPARATOR = ":";
//$NON-NLS-1$
-
- private Handler transitHandler;
-
- public ArtifactURLHandler() throws TransitException
- {
- super();
- transitHandler = new Handler();
- }
-
- public URLConnection openConnection( URL url ) throws IOException
- {
- URLConnection connection = null;
-
- return null;
- }
-
- public static void register( String type, Class connectionClass )
- {
- try
- {
- Constructor c = connectionClass
- .getConstructor( new Class[] { URL.class } );
- connectionType.put( type, c );
- }
- catch ( NoSuchMethodException e )
- {
- // don't register connection classes that don't conform to the
spec
- }
- }
}
\ No newline at end of file

Modified:
development/laboratory/ide/eclipse/magic/plugin/src/net/dpml/ide/eclipse/plugins/magic/MagicPlugin.java
==============================================================================
---
development/laboratory/ide/eclipse/magic/plugin/src/net/dpml/ide/eclipse/plugins/magic/MagicPlugin.java
(original)
+++
development/laboratory/ide/eclipse/magic/plugin/src/net/dpml/ide/eclipse/plugins/magic/MagicPlugin.java
Sun Mar 20 16:02:31 2005
@@ -1,5 +1,6 @@
package net.dpml.ide.eclipse.plugins.magic;

+import java.io.IOException;
import java.util.Hashtable;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
@@ -113,10 +114,12 @@
new String[]{ArtifactURLHandler.PROTOCOL} );
try
{
- context.registerService( URLStreamHandlerService.class.getName(),
- new ArtifactURLHandler(), properties );
+ context.registerService(
URLStreamHandlerService.class.getName(),
+ new ArtifactURLHandler(), properties
);
+
+
}
- catch ( TransitException e )
+ catch ( Exception e )
{
// TODO Auto-generated catch block
e.printStackTrace();



  • svn commit: r2095 - in development/laboratory/ide/eclipse/magic/plugin: lib src/net/dpml/ide/eclipse/plugins/magic, mcconnell, 03/20/2005

Archive powered by MHonArc 2.6.24.

Top of Page