changeset 105:bbe49769ec18

...
author Frank Benoit <benoit@tionex.de>
date Sun, 08 Nov 2009 12:42:30 +0100
parents 88652073d1c2
children bacf7be144c4
files base/src/java/io/PrintStream.d base/src/java/lang/System.d base/src/java/lang/all.d base/src/java/lang/interfaces.d base/src/java/text/Collator.d base/src/java/util/Collections.d base/src/java/util/ResourceBundle.d base/src/java/util/SortedMap.d base/src/java/util/SortedSet.d base/src/java/util/TreeMap.d base/src/java/util/TreeSet.d org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/IRuntimeConstants.d org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/LocalizationUtils.d org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/PrintStackUtil.d org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/RuntimeLog.d org.eclipse.equinox.common/src/org/eclipse/core/runtime/Assert.d org.eclipse.equinox.common/src/org/eclipse/core/runtime/AssertionFailedException.d org.eclipse.equinox.common/src/org/eclipse/core/runtime/CoreException.d org.eclipse.equinox.common/src/org/eclipse/core/runtime/IAdaptable.d org.eclipse.equinox.common/src/org/eclipse/core/runtime/IAdapterFactory.d org.eclipse.equinox.common/src/org/eclipse/core/runtime/IAdapterManager.d org.eclipse.equinox.common/src/org/eclipse/core/runtime/ILogListener.d org.eclipse.equinox.common/src/org/eclipse/core/runtime/IPath.d org.eclipse.equinox.common/src/org/eclipse/core/runtime/IProgressMonitor.d org.eclipse.equinox.common/src/org/eclipse/core/runtime/IProgressMonitorWithBlocking.d org.eclipse.equinox.common/src/org/eclipse/core/runtime/ISafeRunnable.d org.eclipse.equinox.common/src/org/eclipse/core/runtime/IStatus.d org.eclipse.equinox.common/src/org/eclipse/core/runtime/ListenerList.d org.eclipse.equinox.common/src/org/eclipse/core/runtime/MultiStatus.d org.eclipse.equinox.common/src/org/eclipse/core/runtime/NullProgressMonitor.d org.eclipse.equinox.common/src/org/eclipse/core/runtime/OperationCanceledException.d org.eclipse.equinox.common/src/org/eclipse/core/runtime/Path.d org.eclipse.equinox.common/src/org/eclipse/core/runtime/PlatformObject.d org.eclipse.equinox.common/src/org/eclipse/core/runtime/ProgressMonitorWrapper.d org.eclipse.equinox.common/src/org/eclipse/core/runtime/QualifiedName.d org.eclipse.equinox.common/src/org/eclipse/core/runtime/SafeRunner.d org.eclipse.equinox.common/src/org/eclipse/core/runtime/Status.d org.eclipse.equinox.common/src/org/eclipse/core/runtime/SubMonitor.d org.eclipse.equinox.common/src/org/eclipse/core/runtime/SubProgressMonitor.d org.eclipse.osgi/osgi/src/org/osgi/framework/Bundle.d org.eclipse.osgi/osgi/src/org/osgi/framework/BundleActivator.d org.eclipse.osgi/osgi/src/org/osgi/framework/BundleContext.d org.eclipse.osgi/osgi/src/org/osgi/framework/BundleEvent.d org.eclipse.osgi/osgi/src/org/osgi/framework/BundleListener.d org.eclipse.osgi/osgi/src/org/osgi/framework/Filter.d org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkEvent.d org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkListener.d org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceEvent.d org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceListener.d org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceReference.d org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceRegistration.d org.eclipse.osgi/osgi/src/org/osgi/util/tracker/ServiceTracker.d org.eclipse.osgi/osgi/src/org/osgi/util/tracker/ServiceTrackerCustomizer.d org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/log/FrameworkLog.d org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/log/FrameworkLogEntry.d org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/NLS.d org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/SWT.d rakefile
diffstat 58 files changed, 2431 insertions(+), 2399 deletions(-) [+]
line wrap: on
line diff
--- a/base/src/java/io/PrintStream.d	Sat May 02 11:27:24 2009 +0200
+++ b/base/src/java/io/PrintStream.d	Sun Nov 08 12:42:30 2009 +0100
@@ -1,6 +1,7 @@
 module java.io.PrintStream;
 
 import java.lang.all;
+import java.lang.String;
 import java.io.OutputStream;
 
 class PrintStream{
--- a/base/src/java/lang/System.d	Sat May 02 11:27:24 2009 +0200
+++ b/base/src/java/lang/System.d	Sun Nov 08 12:42:30 2009 +0100
@@ -5,6 +5,7 @@
 
 import java.lang.util;
 import java.lang.exceptions;
+import java.io.PrintStream;
 
 version(Tango){
     static import tango.sys.Environment;
@@ -229,23 +230,17 @@
 
     }
 
-    static class Output {
-        public void println( String str ){
-            implMissing( __FILE__, __LINE__ );
-        }
-    }
-
-    private static Output err__;
-    public static Output err(){
+    private static PrintStream err__;
+    public static PrintStream err(){
         if( err__ is null ){
-            err__ = new Output();
+            err__ = new PrintStream(null);
         }
         return err__;
     }
-    private static Output out__;
-    public static Output out_(){
+    private static PrintStream out__;
+    public static PrintStream out_(){
         if( out__ is null ){
-            out__ = new Output();
+            out__ = new PrintStream(null);
         }
         return out__;
     }
--- a/base/src/java/lang/all.d	Sat May 02 11:27:24 2009 +0200
+++ b/base/src/java/lang/all.d	Sun Nov 08 12:42:30 2009 +0100
@@ -6,6 +6,7 @@
 public import java.lang.Byte;
 public import java.lang.Character;
 public import java.lang.Class;
+public import java.lang.ClassLoader;
 public import java.lang.Double;
 public import java.lang.Float;
 public import java.lang.Integer;
@@ -13,12 +14,14 @@
 public import java.lang.Math;
 public import java.lang.Number;
 public import java.lang.Runnable;
+public import java.lang.SecurityManager;
 public import java.lang.Short;
 public import java.lang.String;
 public import java.lang.StringBuffer;
 public import java.lang.System;
 public import java.lang.Thread;
 public import java.lang.ThreadLocal;
+public import java.lang.ThreadGroup;
 
 public import java.lang.exceptions;
 public import java.lang.interfaces;
--- a/base/src/java/lang/interfaces.d	Sat May 02 11:27:24 2009 +0200
+++ b/base/src/java/lang/interfaces.d	Sun Nov 08 12:42:30 2009 +0100
@@ -8,9 +8,10 @@
 interface Comparable {
     int compareTo(Object o);
 }
-interface Comparator {
-    int compare(Object o1, Object o2);
-}
+// is now in java.util.Comparator
+//interface Comparator {
+//    int compare(Object o1, Object o2);
+//}
 
 interface CharSequence {
     char         charAt(int index);
--- a/base/src/java/text/Collator.d	Sat May 02 11:27:24 2009 +0200
+++ b/base/src/java/text/Collator.d	Sun Nov 08 12:42:30 2009 +0100
@@ -1,6 +1,7 @@
 module java.text.Collator;
 
 import java.lang.all;
+import java.util.Comparator;
 
 class Collator : Comparator {
     public static Collator getInstance(){
--- a/base/src/java/util/Collections.d	Sat May 02 11:27:24 2009 +0200
+++ b/base/src/java/util/Collections.d	Sun Nov 08 12:42:30 2009 +0100
@@ -11,6 +11,7 @@
 import java.util.ListIterator;
 import java.util.Enumeration;
 import java.util.ArrayList;
+import java.util.Comparator;
 
 class Collections {
     private static void unsupported(){
--- a/base/src/java/util/ResourceBundle.d	Sat May 02 11:27:24 2009 +0200
+++ b/base/src/java/util/ResourceBundle.d	Sun Nov 08 12:42:30 2009 +0100
@@ -7,6 +7,7 @@
 import java.lang.Integer;
 import java.lang.exceptions;
 import java.util.MissingResourceException;
+import java.util.Enumeration;
 version(Tango){
     //import tango.text.Util;
     import tango.io.device.File;
@@ -162,7 +163,11 @@
         throw new MissingResourceException( "key not found", this.classinfo.name, key._idup() );
     }
 
-    public String[] getKeys(){
+    public Enumeration getKeys(){
+        implMissing(__FILE__,__LINE__);
+        return null;
+    }
+    public String[] getKeysAsArray(){
         return map.keys;
     }
 
--- a/base/src/java/util/SortedMap.d	Sat May 02 11:27:24 2009 +0200
+++ b/base/src/java/util/SortedMap.d	Sun Nov 08 12:42:30 2009 +0100
@@ -2,6 +2,7 @@
 
 import java.lang.all;
 import java.util.Map;
+import java.util.Comparator;
 
 interface SortedMap : Map {
     Comparator     comparator();
--- a/base/src/java/util/SortedSet.d	Sat May 02 11:27:24 2009 +0200
+++ b/base/src/java/util/SortedSet.d	Sun Nov 08 12:42:30 2009 +0100
@@ -2,6 +2,7 @@
 
 import java.lang.all;
 import java.util.Set;
+import java.util.Comparator;
 
 interface SortedSet : Set {
     Comparator     comparator();
--- a/base/src/java/util/TreeMap.d	Sat May 02 11:27:24 2009 +0200
+++ b/base/src/java/util/TreeMap.d	Sun Nov 08 12:42:30 2009 +0100
@@ -7,6 +7,7 @@
 import java.util.SortedMap;
 import java.util.TreeSet;
 import java.util.ArrayList;
+import java.util.Comparator;
 
 version(Tango){
     static import tango.util.container.SortedMap;
--- a/base/src/java/util/TreeSet.d	Sat May 02 11:27:24 2009 +0200
+++ b/base/src/java/util/TreeSet.d	Sun Nov 08 12:42:30 2009 +0100
@@ -5,6 +5,7 @@
 import java.util.AbstractSet;
 import java.util.Collection;
 import java.util.Iterator;
+import java.util.Comparator;
 
 version(Tango){
     static import tango.util.container.SortedMap;
--- a/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/IRuntimeConstants.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/IRuntimeConstants.d	Sun Nov 08 12:42:30 2009 +0100
@@ -4,38 +4,39 @@
  * 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:
  *     IBM Corporation - initial API and implementation
- * Port to the D programming language:
- *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
-module org.eclipse.core.internal.runtime.IRuntimeConstants;
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
+module org.eclipse.core.internal.runtimeIRuntimeConstants;
 
 import java.lang.all;
 
+
 public interface IRuntimeConstants {
 
     /**
      * The unique identifier constant (value "<code>org.eclipse.core.runtime</code>")
      * of the Core Runtime (pseudo-) plug-in.
      */
-    public static const String PI_RUNTIME = "org.eclipse.core.runtime"; //$NON-NLS-1$
+    public static final String PI_RUNTIME = "org.eclipse.core.runtime"; //$NON-NLS-1$
 
     /**
      * Name of this bundle.
      */
-    public static const String PI_COMMON = "org.eclipse.equinox.common"; //$NON-NLS-1$
+    public static final String PI_COMMON = "org.eclipse.equinox.common"; //$NON-NLS-1$
 
     /**
      * Status code constant (value 2) indicating an error occurred while running a plug-in.
      */
-    public static const int PLUGIN_ERROR = 2;
+    public static final int PLUGIN_ERROR = 2;
 
     /**
      * Status code constant (value 5) indicating the platform could not write
      * some of its metadata.
      */
-    public static const int FAILED_WRITE_METADATA = 5;
+    public static final int FAILED_WRITE_METADATA = 5;
 
 }
--- a/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/LocalizationUtils.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/LocalizationUtils.d	Sun Nov 08 12:42:30 2009 +0100
@@ -7,53 +7,56 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
- * Port to the D programming language:
- *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
-module org.eclipse.core.internal.runtime.LocalizationUtils;
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
+module org.eclipse.core.internal.runtimeLocalizationUtils;
 
 import java.lang.all;
 
+import org.eclipse.core.internal.runtimeCommonMessages; // packageimport
+
+import java.lang.reflect.Field;
+
 /**
  * Helper methods related to string localization.
- *
+ * 
  * @since org.eclipse.equinox.common 3.3
  */
 public class LocalizationUtils {
     /**
-     * This method can be used in the absence of NLS class. The method tries to
+     * This method can be used in the absence of NLS class. The method tries to 
      * use the NLS-based translation routine. If it falls, the method returns the original
      * non-translated key.
-     *
+     * 
      * @param key case-sensitive name of the filed in the translation file representing 
      * the string to be translated
      * @return The localized message or the non-translated key
      */
     static public String safeLocalize(String key) {
-//TODO: LocalizationUtils tries to load module CommonMessages. How to handle this?
-//         try {
-//             Class messageClass = Class.forName("org.eclipse.core.internal.runtime.CommonMessages"); //$NON-NLS-1$
-//             if (messageClass is null)
-//                 return key;
-//             Field field = messageClass.getDeclaredField(key);
-//             if (field is null)
-//                 return key;
-//             Object value = field.get(null);
-//             if (value instanceof String)
-//                 return (String) value;
-//         } catch (ClassNotFoundException e) {
-//             // eat exception and fall through
-//         } catch (NoClassDefFoundError e) {
-//             // eat exception and fall through
-//         } catch (SecurityException e) {
-//             // eat exception and fall through
-//         } catch (NoSuchFieldException e) {
-//             // eat exception and fall through
-//         } catch (IllegalArgumentException e) {
-//             // eat exception and fall through
-//         } catch (IllegalAccessException e) {
-//             // eat exception and fall through
-//         }
+        try {
+            Class messageClass = Class.forName("org.eclipse.core.internal.runtime.CommonMessages"); //$NON-NLS-1$
+            if (messageClass is null)
+                return key;
+            Field field = messageClass.getDeclaredField(key);
+            if (field is null)
+                return key;
+            Object value = field.get(null);
+            if ( null !is cast(String)value )
+                return cast(String) value;
+        } catch (ClassNotFoundException e) {
+            // eat exception and fall through
+        } catch (NoClassDefFoundError e) {
+            // eat exception and fall through
+        } catch (SecurityException e) {
+            // eat exception and fall through
+        } catch (NoSuchFieldException e) {
+            // eat exception and fall through
+        } catch (IllegalArgumentException e) {
+            // eat exception and fall through
+        } catch (IllegalAccessException e) {
+            // eat exception and fall through
+        }
         return key;
     }
 }
--- a/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/PrintStackUtil.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/PrintStackUtil.d	Sun Nov 08 12:42:30 2009 +0100
@@ -4,45 +4,49 @@
  * 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:
  *     IBM Corporation - initial API and implementation
- * Port to the D programming language:
- *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
-module org.eclipse.core.internal.runtime.PrintStackUtil;
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
+module org.eclipse.core.internal.runtimePrintStackUtil;
+
+import java.lang.all;
+
+
+import java.io.PrintStream;
+import java.io.PrintWriter;
 
 import org.eclipse.core.runtime.IStatus;
-import tango.io.stream.Format;
-import java.lang.all;
 
 public class PrintStackUtil {
 
-    static public void printChildren(IStatus status, FormatOutput!(char) output) {
+    static public void printChildren(IStatus status, PrintStream output) {
         IStatus[] children = status.getChildren();
         if (children is null || children.length is 0)
             return;
         for (int i = 0; i < children.length; i++) {
-            output.formatln("Contains: {}", children[i].getMessage()); //$NON-NLS-1$
-            Exception exception = children[i].getException();
+            output.println("Contains: " + children[i].getMessage()); //$NON-NLS-1$
+            Throwable exception = children[i].getException();
             if (exception !is null)
-                ExceptionPrintStackTrace(exception);
+                exception.printStackTrace();
             printChildren(children[i], output);
         }
     }
 
-//     static public void printChildren(IStatus status, FormatOutput!(char) output) {
-//         IStatus[] children = status.getChildren();
-//         if (children is null || children.length is 0)
-//             return;
-//         for (int i = 0; i < children.length; i++) {
-//             output.formatln( "Contains: {}", children[i].getMessage()); //$NON-NLS-1$
-//             output.flush(); // call to synchronize output
-//             Exception exception = children[i].getException();
-//             if (exception !is null)
-//                 ExceptionPrintStackTrace(exception);
-//             printChildren(children[i], output);
-//         }
-//     }
+    static public void printChildren(IStatus status, PrintWriter output) {
+        IStatus[] children = status.getChildren();
+        if (children is null || children.length is 0)
+            return;
+        for (int i = 0; i < children.length; i++) {
+            output.println("Contains: " + children[i].getMessage()); //$NON-NLS-1$
+            output.flush(); // call to synchronize output
+            Throwable exception = children[i].getException();
+            if (exception !is null)
+                exception.printStackTrace();
+            printChildren(children[i], output);
+        }
+    }
 
 }
--- a/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/RuntimeLog.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/RuntimeLog.d	Sun Nov 08 12:42:30 2009 +0100
@@ -4,33 +4,35 @@
  * 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:
  *     IBM Corporation - initial API and implementation
  *     Julian Chen - fix for bug #92572, jclRM
- * Port to the D programming language:
- *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
-module org.eclipse.core.internal.runtime.RuntimeLog;
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
+module org.eclipse.core.internal.runtimeRuntimeLog;
 
 import java.lang.all;
+
+import org.eclipse.core.internal.runtimeIRuntimeConstants; // packageimport
+
 import java.util.ArrayList;
 import java.util.Iterator;
 
 import org.eclipse.core.runtime.ILogListener;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.internal.runtime.IRuntimeConstants;
 
 /**
  * NOT API!!!  This log infrastructure was split from the InternalPlatform.
- *
+ * 
  * @since org.eclipse.equinox.common 3.2
  */
 // XXX this must be removed and replaced with something more reasonable
 public final class RuntimeLog {
 
-    private static ArrayList logListeners;
+    private static ArrayList logListeners = new ArrayList(5);
 
     /**
      * Keep the messages until the first log listener is registered.
@@ -38,12 +40,7 @@
      * all status messages accumulated during the period when no log
      * listener was available.
      */
-    private static ArrayList queuedMessages;
-
-    static this(){
-        logListeners = new ArrayList(5);
-        queuedMessages = new ArrayList(5);
-    }
+    private static ArrayList queuedMessages = new ArrayList(5);
 
     /**
      * See org.eclipse.core.runtime.Platform#addLogListener(ILogListener)
@@ -53,8 +50,8 @@
             bool firstListener = (logListeners.size() is 0);
             // replace if already exists (Set behaviour but we use an array
             // since we want to retain order)
-            logListeners.remove(cast(Object)listener);
-            logListeners.add(cast(Object)listener);
+            logListeners.remove(listener);
+            logListeners.add(listener);
             if (firstListener) {
                 for (Iterator i = queuedMessages.iterator(); i.hasNext();) {
                     try {
@@ -62,9 +59,8 @@
                         listener.logging(recordedMessage, IRuntimeConstants.PI_RUNTIME);
                     } catch (Exception e) {
                         handleException(e);
-// SWT Fixme
-//                     } catch (LinkageError e) {
-//                         handleException(e);
+                    } catch (LinkageError e) {
+                        handleException(e);
                     }
                 }
                 queuedMessages.clear();
@@ -77,7 +73,7 @@
      */
     public static void removeLogListener(ILogListener listener) {
         synchronized (logListeners) {
-            logListeners.remove(cast(Object)listener);
+            logListeners.remove(listener);
         }
     }
 
@@ -86,20 +82,20 @@
      */
     public static bool contains(ILogListener listener) {
         synchronized (logListeners) {
-            return logListeners.contains(cast(Object)listener);
+            return logListeners.contains(listener);
         }
     }
 
     /**
      * Notifies all listeners of the platform log.
      */
-    public static void log(IStatus status) {
+    public static void log(final IStatus status) {
         // create array to avoid concurrent access
         ILogListener[] listeners;
         synchronized (logListeners) {
-            listeners = arraycast!(ILogListener)( logListeners.toArray());
+            listeners = (ILogListener[]) logListeners.toArray(new ILogListener[logListeners.size()]);
             if (listeners.length is 0) {
-                queuedMessages.add(cast(Object)status);
+                queuedMessages.add(status);
                 return;
             }
         }
@@ -108,17 +104,16 @@
                 listeners[i].logging(status, IRuntimeConstants.PI_RUNTIME);
             } catch (Exception e) {
                 handleException(e);
-// SWT Fixme
-//             } catch (LinkageError e) {
-//                 handleException(e);
+            } catch (LinkageError e) {
+                handleException(e);
             }
         }
     }
 
-    private static void handleException(Exception e) {
-        if (!(cast(OperationCanceledException)e )) {
-            // Got a error while logging. Don't try to log again, just put it into stderr
-            ExceptionPrintStackTrace(e);
+    private static void handleException(Throwable e) {
+        if (!( null !is cast(OperationCanceledException)e )) {
+            // Got a error while logging. Don't try to log again, just put it into stderr 
+            e.printStackTrace();
         }
     }
 
--- a/org.eclipse.equinox.common/src/org/eclipse/core/runtime/Assert.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.equinox.common/src/org/eclipse/core/runtime/Assert.d	Sun Nov 08 12:42:30 2009 +0100
@@ -4,18 +4,18 @@
  * 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:
  *     IBM Corporation - initial API and implementation
- * Port to the D programming language:
- *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
-module org.eclipse.core.runtime.Assert;
-
-import org.eclipse.core.runtime.AssertionFailedException;
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
+module org.eclipse.core.runtimeAssert;
 
 import java.lang.all;
 
+import org.eclipse.core.runtimeAssertionFailedException; // packageimport
+
 /**
  * <code>Assert</code> is useful for for embedding runtime sanity checks
  * in code. The predicate methods all test a condition and throw some
@@ -73,18 +73,12 @@
 
     /** Asserts that the given object is not <code>null</code>. If this
      * is not the case, some kind of unchecked exception is thrown.
-     *
+     * 
      * @param object the value to test
      */
     public static void isNotNull(Object object) {
         isNotNull(object, ""); //$NON-NLS-1$
     }
-    public static void isNotNull(String str) {
-        isTrue(str.ptr !is null); //$NON-NLS-1$
-    }
-    public static void isNotNull(void* ptr) {
-        isTrue(ptr !is null); //$NON-NLS-1$
-    }
 
     /** Asserts that the given object is not <code>null</code>. If this
      * is not the case, some kind of unchecked exception is thrown.
@@ -95,13 +89,7 @@
      */
     public static void isNotNull(Object object, String message) {
         if (object is null)
-            throw new AssertionFailedException("null argument:" ~ message); //$NON-NLS-1$
-    }
-    public static void isNotNull(String str, String message) {
-        isTrue(str.ptr !is null, message ); //$NON-NLS-1$
-    }
-    public static void isNotNull(void* ptr, String message) {
-        isTrue(ptr !is null, message ); //$NON-NLS-1$
+            throw new AssertionFailedException("null argument:" + message); //$NON-NLS-1$
     }
 
     /** Asserts that the given bool is <code>true</code>. If this
@@ -126,7 +114,7 @@
      */
     public static bool isTrue(bool expression, String message) {
         if (!expression)
-            throw new AssertionFailedException("assertion failed: " ~ message); //$NON-NLS-1$
+            throw new AssertionFailedException("assertion failed: " + message); //$NON-NLS-1$
         return expression;
     }
 }
--- a/org.eclipse.equinox.common/src/org/eclipse/core/runtime/AssertionFailedException.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.equinox.common/src/org/eclipse/core/runtime/AssertionFailedException.d	Sun Nov 08 12:42:30 2009 +0100
@@ -4,16 +4,16 @@
  * 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:
  *     IBM Corporation - initial API and implementation
- * Port to the D programming language:
- *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
-module org.eclipse.core.runtime.AssertionFailedException;
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
+module org.eclipse.core.runtimeAssertionFailedException;
 
 import java.lang.all;
-version(JIVE) import jive.stacktrace;
+
 
 /**
  * <code>AssertionFailedException</code> is a runtime exception thrown
@@ -35,9 +35,9 @@
      */
     private static final long serialVersionUID = 1L;
 
-    /**
+    /** 
      * Constructs a new exception with the given message.
-     *
+     * 
      * @param detail the message
      */
     public this(String detail) {
--- a/org.eclipse.equinox.common/src/org/eclipse/core/runtime/CoreException.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.equinox.common/src/org/eclipse/core/runtime/CoreException.d	Sun Nov 08 12:42:30 2009 +0100
@@ -1,28 +1,31 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation 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:
  *     IBM Corporation - initial API and implementation
- * Port to the D programming language:
- *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
-module org.eclipse.core.runtime.CoreException;
-
-import org.eclipse.core.runtime.IStatus;
-
-// import java.io.PrintStream;
-// import java.io.PrintWriter;
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
+module org.eclipse.core.runtimeCoreException;
 
 import java.lang.all;
 
+import org.eclipse.core.runtimeStatus; // packageimport
+import org.eclipse.core.runtimeIStatus; // packageimport
+
+import java.io.PrintStream;
+import java.io.PrintWriter;
+
+import org.eclipse.core.internal.runtime.PrintStackUtil;
+
 /**
  * A checked exception representing a failure.
  * <p>
- * Core exceptions contain a status object describing the
+ * Core exceptions contain a status object describing the 
  * cause of the exception.
  * </p><p>
  * This class can be used without OSGi running.
@@ -34,7 +37,7 @@
     /**
      * All serializable objects should have a stable serialVersionUID
      */
-    private static const long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
     /** Status object. */
     private IStatus status;
@@ -52,11 +55,11 @@
 
     /**
       * Returns the cause of this exception, or <code>null</code> if none.
-      *
+      * 
       * @return the cause for this exception
       * @since 3.4
       */
-    public Exception getCause() {
+    public Throwable getCause() {
         return status.getException();
     }
 
@@ -83,55 +86,34 @@
      * its Status object.
      */
     public void printStackTrace() {
-//         printStackTrace(System.err);
-        getDwtLogger.error( __FILE__, __LINE__, "Exception in File {}({}): {}", this.file, this.line, this.msg );
-        foreach( msg; this.info ){
-            getDwtLogger.error( __FILE__, __LINE__, "    trc: {}", msg );
-        }
-        if (status.getException() !is null) {
-            getDwtLogger.error( __FILE__, __LINE__, "{}[{}]: ", this.classinfo.name, status.getCode() ); //$NON-NLS-1$ //$NON-NLS-2$
-//             status.getException().printStackTrace();
-                auto e = status.getException();
-                getDwtLogger.error( __FILE__, __LINE__, "Exception in File {}({}): {}", e.file, e.line, e.msg );
-                foreach( msg; e.info ){
-                    getDwtLogger.error( __FILE__, __LINE__, "    trc: {}", msg );
-                }
+        printStackTrace(System.err);
+    }
+
+    /**
+     * Prints a stack trace out for the exception, and
+     * any nested exception that it may have embedded in
+     * its Status object.
+     * 
+     * @param output the stream to write to
+     */
+    public void printStackTrace(PrintStream output) {
+        synchronized (output) {
+            super.printStackTrace(output);
+            PrintStackUtil.printChildren(status, output);
         }
     }
 
-//FIXME
-//     /**
-//      * Prints a stack trace out for the exception, and
-//      * any nested exception that it may have embedded in
-//      * its Status object.
-//      *
-//      * @param output the stream to write to
-//      */
-//     public void printStackTrace(PrintStream output) {
-//         synchronized (output) {
-//             super.printStackTrace(output);
-//             if (status.getException() !is null) {
-//                 output.print(getClass().getName() + "[" + status.getCode() + "]: "); //$NON-NLS-1$ //$NON-NLS-2$
-//                 status.getException().printStackTrace(output);
-//             }
-//         }
-//     }
-//
-//     /**
-//      * Prints a stack trace out for the exception, and
-//      * any nested exception that it may have embedded in
-//      * its Status object.
-//      *
-//      * @param output the stream to write to
-//      */
-//     public void printStackTrace(PrintWriter output) {
-//         synchronized (output) {
-//             super.printStackTrace(output);
-//             if (status.getException() !is null) {
-//                 output.print(getClass().getName() + "[" + status.getCode() + "]: "); //$NON-NLS-1$ //$NON-NLS-2$
-//                 status.getException().printStackTrace(output);
-//             }
-//         }
-//     }
-
+    /**
+     * Prints a stack trace out for the exception, and
+     * any nested exception that it may have embedded in
+     * its Status object.
+     * 
+     * @param output the stream to write to
+     */
+    public void printStackTrace(PrintWriter output) {
+        synchronized (output) {
+            super.printStackTrace(output);
+            PrintStackUtil.printChildren(status, output);
+        }
+    }
 }
--- a/org.eclipse.equinox.common/src/org/eclipse/core/runtime/IAdaptable.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.equinox.common/src/org/eclipse/core/runtime/IAdaptable.d	Sun Nov 08 12:42:30 2009 +0100
@@ -4,28 +4,29 @@
  * 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:
  *     IBM Corporation - initial API and implementation
- * Port to the D programming language:
- *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
-module org.eclipse.core.runtime.IAdaptable;
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
+module org.eclipse.core.runtimeIAdaptable;
 
 import java.lang.all;
 
+
 /**
  * An interface for an adaptable object.
  * <p>
- * Adaptable objects can be dynamically extended to provide different
- * interfaces (or "adapters").  Adapters are created by adapter
+ * Adaptable objects can be dynamically extended to provide different 
+ * interfaces (or "adapters").  Adapters are created by adapter 
  * factories, which are in turn managed by type by adapter managers.
  * </p>
  * For example,
  * <pre>
  *     IAdaptable a = [some adaptable];
  *     IFoo x = (IFoo)a.getAdapter(IFoo.class);
- *     if (x !is null)
+ *     if (x != null)
  *         [do IFoo things with x]
  * </pre>
  * <p>
@@ -45,9 +46,9 @@
      * no such object can be found.
      *
      * @param adapter the adapter class to look up
-     * @return a object castable to the given class,
+     * @return a object castable to the given class, 
      *    or <code>null</code> if this object does not
      *    have an adapter for the given class
      */
-    public Object getAdapter(ClassInfo adapter);
+    public Object getAdapter(Class adapter);
 }
--- a/org.eclipse.equinox.common/src/org/eclipse/core/runtime/IAdapterFactory.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.equinox.common/src/org/eclipse/core/runtime/IAdapterFactory.d	Sun Nov 08 12:42:30 2009 +0100
@@ -4,16 +4,17 @@
  * 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:
  *     IBM Corporation - initial API and implementation
- * Port to the D programming language:
- *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
-module org.eclipse.core.runtime.IAdapterFactory;
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
+module org.eclipse.core.runtimeIAdapterFactory;
 
 import java.lang.all;
 
+
 /**
  * An adapter factory defines behavioral extensions for
  * one or more classes that implements the <code>IAdaptable</code>
@@ -36,12 +37,12 @@
      * @param adaptableObject the adaptable object being queried
      *   (usually an instance of <code>IAdaptable</code>)
      * @param adapterType the type of adapter to look up
-     * @return a object castable to the given adapter type,
-     *    or <code>null</code> if this adapter factory
+     * @return a object castable to the given adapter type, 
+     *    or <code>null</code> if this adapter factory 
      *    does not have an adapter of the given type for the
      *    given object
      */
-    public Object getAdapter(Object adaptableObject, ClassInfo adapterType);
+    public Object getAdapter(Object adaptableObject, Class adapterType);
 
     /**
      * Returns the collection of adapter types handled by this
@@ -54,5 +55,5 @@
      *
      * @return the collection of adapter types
      */
-    public ClassInfo[] getAdapterList();
+    public Class[] getAdapterList();
 }
--- a/org.eclipse.equinox.common/src/org/eclipse/core/runtime/IAdapterManager.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.equinox.common/src/org/eclipse/core/runtime/IAdapterManager.d	Sun Nov 08 12:42:30 2009 +0100
@@ -4,18 +4,18 @@
  * 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:
  *     IBM Corporation - initial API and implementation
- * Port to the D programming language:
- *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
-module org.eclipse.core.runtime.IAdapterManager;
-
-import org.eclipse.core.runtime.IAdapterFactory;
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
+module org.eclipse.core.runtimeIAdapterManager;
 
 import java.lang.all;
 
+import org.eclipse.core.runtimeIAdapterFactory; // packageimport
+
 /**
  * An adapter manager maintains a registry of adapter factories. Clients
  * directly invoke methods on an adapter manager to register and unregister
@@ -26,7 +26,7 @@
  * method on one of the registered adapter factories.
  * <p>
  * Adapter factories can be registered programmatically using the <code>registerAdapters</code>
- * method.  Alternatively, they can be registered declaratively using the
+ * method.  Alternatively, they can be registered declaratively using the 
  * <code>org.eclipse.core.runtime.adapters</code> extension point.  Factories registered
  * with this extension point will not be able to provide adapters until their
  * corresponding plugin has been activated.
@@ -34,30 +34,30 @@
  * The following code snippet shows how one might register an adapter of type
  * <code>com.example.acme.Sticky</code> on resources in the workspace.
  * <p>
- *
+ * 
  * <pre>
  *  IAdapterFactory pr = new IAdapterFactory() {
- *      public Class[] getAdapterList() {
- *          return new Class[] { com.example.acme.Sticky.class };
- *      }
- *      public Object getAdapter(Object adaptableObject, Class adapterType) {
- *          IResource res = (IResource) adaptableObject;
- *          QualifiedName key = new QualifiedName(&quot;com.example.acme&quot;, &quot;sticky-note&quot;);
- *          try {
- *              com.example.acme.Sticky v = (com.example.acme.Sticky) res.getSessionProperty(key);
- *              if (v is null) {
- *                  v = new com.example.acme.Sticky();
- *                  res.setSessionProperty(key, v);
- *              }
- *          } catch (CoreException e) {
- *              // unable to access session property - ignore
- *          }
- *          return v;
- *      }
+ *  	public Class[] getAdapterList() {
+ *  		return new Class[] { com.example.acme.Sticky.class };
+ *  	}
+ *  	public Object getAdapter(Object adaptableObject, Class adapterType) {
+ *  		IResource res = (IResource) adaptableObject;
+ *  		QualifiedName key = new QualifiedName(&quot;com.example.acme&quot;, &quot;sticky-note&quot;);
+ *  		try {
+ *  			com.example.acme.Sticky v = (com.example.acme.Sticky) res.getSessionProperty(key);
+ *  			if (v == null) {
+ *  				v = new com.example.acme.Sticky();
+ *  				res.setSessionProperty(key, v);
+ *  			}
+ *  		} catch (CoreException e) {
+ *  			// unable to access session property - ignore
+ *  		}
+ *  		return v;
+ *  	}
  *  }
  *  Platform.getAdapterManager().registerAdapters(pr, IResource.class);
  *   </pre>
- *
+ * 
  * </p><p>
  * This interface can be used without OSGi running.
  * </p><p>
@@ -71,27 +71,27 @@
 public interface IAdapterManager {
 
     /**
-     * This value can be returned to indicate that no applicable adapter factory
-     * was found.
+     * This value can be returned to indicate that no applicable adapter factory 
+     * was found. 
      * @since org.eclipse.equinox.common 3.3
      */
-    public static const int NONE = 0;
+    public static final int NONE = 0;
 
     /**
-     * This value can be returned to indicate that an adapter factory was found,
+     * This value can be returned to indicate that an adapter factory was found, 
      * but has not been loaded.
      * @since org.eclipse.equinox.common 3.3
      */
-    public static const int NOT_LOADED = 1;
+    public static final int NOT_LOADED = 1;
 
     /**
      * This value can be returned to indicate that an adapter factory is loaded.
      * @since org.eclipse.equinox.common 3.3
      */
-    public static const int LOADED = 2;
+    public static final int LOADED = 2;
 
     /**
-     * Returns the types that can be obtained by converting <code>adaptableClass</code>
+     * Returns the types that can be obtained by converting <code>adaptableClass</code> 
      * via this manager. Converting means that subsequent calls to <code>getAdapter()</code>
      * or <code>loadAdapter()</code> could result in an adapted object.
      * <p>
@@ -101,18 +101,18 @@
      * loaded, or if the factory itself returns <code>null</code>, then
      * <code>getAdapter</code> will still return <code>null</code>.
      * </p>
-     * @param adaptableClass the adaptable class being queried
-     * @return an array of type names that can be obtained by converting
-     * <code>adaptableClass</code> via this manager. An empty array
+     * @param adaptableClass the adaptable class being queried	
+     * @return an array of type names that can be obtained by converting 
+     * <code>adaptableClass</code> via this manager. An empty array 
      * is returned if there are none.
      * @since 3.1
      */
-    public String[] computeAdapterTypes(ClassInfo adaptableClass);
+    public String[] computeAdapterTypes(Class adaptableClass);
 
     /**
-     * Returns the class search order for a given class. The search order from a
+     * Returns the class search order for a given class. The search order from a 
      * class with the definition <br>
-     * <code>class X extends Y implements A, B</code><br>
+     * <code>class X : Y , A, B</code><br>
      * is as follows:
      * <ul>
      * <li>the target's class: X
@@ -121,13 +121,13 @@
      * order returned by <code>getInterfaces</code> (in the example, A and its
      * superinterfaces then B and its superinterfaces) </li>
      * </ul>
-     *
-     * @param clazz the class for which to return the class order.
+     * 
+     * @param clazz the class for which to return the class order. 
      * @return the class search order for the given class. The returned
      * search order will minimally  contain the target class.
      * @since 3.1
      */
-    public ClassInfo[] computeClassOrder(ClassInfo clazz);
+    public Class[] computeClassOrder(Class clazz);
 
     /**
      * Returns an object which is an instance of the given class associated
@@ -136,7 +136,7 @@
      * <p>
      * Note that this method will never cause plug-ins to be loaded. If the
      * only suitable factory is not yet loaded, this method will return <code>null</code>.
-     *
+     * 
      * @param adaptable the adaptable object being queried (usually an instance
      * of <code>IAdaptable</code>)
      * @param adapterType the type of adapter to look up
@@ -144,7 +144,7 @@
      * if the given adaptable object does not have an available adapter of the
      * given type
      */
-    public Object getAdapter(Object adaptable, ClassInfo adapterType);
+    public Object getAdapter(Object adaptable, Class adapterType);
 
     /**
      * Returns an object which is an instance of the given class name associated
@@ -155,7 +155,7 @@
      * only suitable factory is not yet loaded, this method will return <code>null</code>.
      * If activation of the plug-in providing the factory is required, use the
      * <code>loadAdapter</code> method instead.
-     *
+     * 
      * @param adaptable the adaptable object being queried (usually an instance
      * of <code>IAdaptable</code>)
      * @param adapterTypeName the fully qualified name of the type of adapter to look up
@@ -175,7 +175,7 @@
      * will return a non-null result. If the factory's plug-in has not yet been
      * loaded, or if the factory itself returns <code>null</code>, then
      * <code>getAdapter</code> will still return <code>null</code>.
-     *
+     * 
      * @param adaptable the adaptable object being queried (usually an instance
      * of <code>IAdaptable</code>)
      * @param adapterTypeName the fully qualified class name of an adapter to
@@ -200,7 +200,7 @@
      * of <code>IAdaptable</code>)
      * @param adapterTypeName the fully qualified class name of an adapter to
      * look up
-     * @return a status of the adapter
+     * @return a status of the adapter 
      * @since org.eclipse.equinox.common 3.3
      */
     public int queryAdapter(Object adaptable, String adapterTypeName);
@@ -215,7 +215,7 @@
      * if necessary. As such, this method should be used judiciously, in order
      * to avoid unnecessary plug-in activations. Most clients should avoid
      * activation by using <code>getAdapter</code> instead.
-     *
+     * 
      * @param adaptable the adaptable object being queried (usually an instance
      * of <code>IAdaptable</code>)
      * @param adapterTypeName the fully qualified name of the type of adapter to look up
@@ -235,20 +235,20 @@
      * an interface, the adapters are available to all classes that directly or
      * indirectly implement that interface.
      * </p>
-     *
+     * 
      * @param factory the adapter factory
      * @param adaptable the type being extended
      * @see #unregisterAdapters(IAdapterFactory)
      * @see #unregisterAdapters(IAdapterFactory, Class)
      */
-    public void registerAdapters(IAdapterFactory factory, ClassInfo adaptable);
+    public void registerAdapters(IAdapterFactory factory, Class adaptable);
 
     /**
      * Removes the given adapter factory completely from the list of registered
      * factories. Equivalent to calling <code>unregisterAdapters(IAdapterFactory,Class)</code>
      * on all classes against which it had been explicitly registered. Does
      * nothing if the given factory is not currently registered.
-     *
+     * 
      * @param factory the adapter factory to remove
      * @see #registerAdapters(IAdapterFactory, Class)
      */
@@ -258,11 +258,11 @@
      * Removes the given adapter factory from the list of factories registered
      * as extending the given class. Does nothing if the given factory and type
      * combination is not registered.
-     *
+     * 
      * @param factory the adapter factory to remove
      * @param adaptable one of the types against which the given factory is
      * registered
      * @see #registerAdapters(IAdapterFactory, Class)
      */
-    public void unregisterAdapters(IAdapterFactory factory, ClassInfo adaptable);
+    public void unregisterAdapters(IAdapterFactory factory, Class adaptable);
 }
--- a/org.eclipse.equinox.common/src/org/eclipse/core/runtime/ILogListener.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.equinox.common/src/org/eclipse/core/runtime/ILogListener.d	Sun Nov 08 12:42:30 2009 +0100
@@ -4,17 +4,18 @@
  * 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:
  *     IBM Corporation - initial API and implementation
- * Port to the D programming language:
- *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
-module org.eclipse.core.runtime.ILogListener;
-
-import org.eclipse.core.runtime.IStatus;
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
+module org.eclipse.core.runtimeILogListener;
 
 import java.lang.all;
+
+import org.eclipse.core.runtimeIStatus; // packageimport
+
 import java.util.EventListener;
 
 /**
@@ -29,7 +30,7 @@
     /**
      * Notifies this listener that given status has been logged by
      * a plug-in.  The listener is free to retain or ignore this status.
-     *
+     * 
      * @param status the status being logged
      * @param plugin the plugin of the log which generated this event
      */
--- a/org.eclipse.equinox.common/src/org/eclipse/core/runtime/IPath.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.equinox.common/src/org/eclipse/core/runtime/IPath.d	Sun Nov 08 12:42:30 2009 +0100
@@ -4,32 +4,32 @@
  * 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:
  *     IBM Corporation - initial API and implementation
- * Port to the D programming language:
- *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
-module org.eclipse.core.runtime.IPath;
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
+module org.eclipse.core.runtimeIPath;
 
 import java.lang.all;
-import tango.io.FilePath;
+
 
 /**
  * A path is an ordered collection of string segments,
  * separated by a standard separator character, "/".
  * A path may also have a leading and/or a trailing separator.
  * Paths may also be prefixed by an optional device id, which includes
- * the character(s) which separate the device id from the rest
+ * the character(s) which separate the device id from the rest 
  * of the path. For example, "C:" and "Server/Volume:" are typical
  * device ids.
  * A device independent path has <code>null</code> for a device id.
  * <p>
- * Note that paths are value objects; all operations on paths
+ * Note that paths are value objects; all operations on paths 
  * return a new path; the path that is operated on is unscathed.
  * </p>
  * <p>
- * UNC paths are denoted by leading double-slashes such
+ * UNC paths are denoted by leading double-slashes such 
  * as <code>//Server/Volume/My/Path</code>. When a new path
  * is constructed all double-slashes are removed except those
  * appearing at the beginning of the path.
@@ -48,16 +48,16 @@
     /**
      * Path separator character constant "/" used in paths.
      */
-    public static const char SEPARATOR = '/';
+    public static final char SEPARATOR = '/';
 
-    /**
+    /** 
      * Device separator character constant ":" used in paths.
      */
-    public static const char DEVICE_SEPARATOR = ':';
+    public static final char DEVICE_SEPARATOR = ':';
 
     /**
      * Returns a new path which is the same as this path but with
-     * the given file extension added.  If this path is empty, root or has a
+     * the given file extension added.  If this path is empty, root or has a 
      * trailing separator, this path is returned.  If this path already
      * has an extension, the existing extension is left and the given
      * extension simply appended.  Clients wishing to replace
@@ -93,13 +93,13 @@
      * Returns the canonicalized path obtained from the
      * concatenation of the given string path to the
      * end of this path. The given string path must be a valid
-     * path. If it has a trailing separator,
+     * path. If it has a trailing separator, 
      * the result will have a trailing separator.
      * The device id of this path is preserved (the one
      * of the given string is ignored). Duplicate slashes
      * are removed from the path except at the beginning
      * where the path is considered to be UNC.
-     *
+     * 
      * @param path the string path to concatenate
      * @return the new path
      * @see #isValidPath(String)
@@ -107,7 +107,7 @@
     public IPath append(String path);
 
     /**
-     * Returns the canonicalized path obtained from the
+     * Returns the canonicalized path obtained from the 
      * concatenation of the given path's segments to the
      * end of this path.  If the given path has a trailing
      * separator, the result will have a trailing separator.
@@ -141,7 +141,7 @@
      * @return <code>true</code> if the paths are equivalent,
      *    and <code>false</code> if they are not
      */
-    public int opEquals(Object obj);
+    public override equals_t opEquals(Object obj);
 
     /**
      * Returns the device id for this path, or <code>null</code> if this
@@ -153,7 +153,7 @@
     public String getDevice();
 
     /**
-     * Returns the file extension portion of this path,
+     * Returns the file extension portion of this path, 
      * or <code>null</code> if there is none.
      * <p>
      * The file extension portion is defined as the string
@@ -186,7 +186,7 @@
      * any device id).
      * <p>
      * Absolute paths start with a path separator.
-     * A root path, like <code>/</code> or <code>C:/</code>,
+     * A root path, like <code>/</code> or <code>C:/</code>, 
      * is considered absolute.  UNC paths are always absolute.
      * </p>
      *
@@ -210,7 +210,7 @@
      * appear in the argument path in the same order,
      * and their device ids must match.
      * <p>
-     * An empty path is a prefix of all paths with the same device; a root path is a prefix of
+     * An empty path is a prefix of all paths with the same device; a root path is a prefix of 
      * all absolute paths with the same device.
      * </p>
      * @param anotherPath the other path
@@ -222,7 +222,7 @@
     /**
      * Returns whether this path is a root path.
      * <p>
-     * The root path is the absolute non-UNC path with zero segments;
+     * The root path is the absolute non-UNC path with zero segments; 
      * e.g., <code>/</code> or <code>C:/</code>.
      * The separator is considered a leading separator, not a trailing one.
      * </p>
@@ -233,23 +233,23 @@
     public bool isRoot();
 
     /**
-     * Returns a bool value indicating whether or not this path
+     * Returns a boolean value indicating whether or not this path
      * is considered to be in UNC form. Return false if this path
      * has a device set or if the first 2 characters of the path string
      * are not <code>Path.SEPARATOR</code>.
-     *
-     * @return bool indicating if this path is UNC
+     * 
+     * @return boolean indicating if this path is UNC
      */
     public bool isUNC();
 
     /**
      * Returns whether the given string is syntactically correct as
      * a path.  The device id is the prefix up to and including the device
-     * separator for the local file system; the path proper is everything to
-     * the right of it, or the entire string if there is no device separator.
+     * separator for the local file system; the path proper is everything to 
+     * the right of it, or the entire string if there is no device separator. 
      * When the platform location is a file system with no meaningful device
      * separator, the entire string is treated as the path proper.
-     * The device id is not checked for validity; the path proper is correct
+     * The device id is not checked for validity; the path proper is correct 
      * if each of the segments in its canonicalized form is valid.
      *
      * @param path the path to check
@@ -260,7 +260,7 @@
     public bool isValidPath(String path);
 
     /**
-     * Returns whether the given string is valid as a segment in
+     * Returns whether the given string is valid as a segment in 
      * a path. The rules for valid segments are as follows:
      * <ul>
      * <li> the empty string is not valid
@@ -280,13 +280,13 @@
      * Returns the last segment of this path, or
      * <code>null</code> if it does not have any segments.
      *
-     * @return the last segment of this path, or <code>null</code>
+     * @return the last segment of this path, or <code>null</code> 
      */
     public String lastSegment();
 
     /**
      * Returns an absolute path with the segments and device id of this path.
-     * Absolute paths start with a path separator. If this path is absolute,
+     * Absolute paths start with a path separator. If this path is absolute, 
      * it is simply returned.
      *
      * @return the new path
@@ -295,7 +295,7 @@
 
     /**
      * Returns a relative path with the segments and device id of this path.
-     * Absolute paths start with a path separator and relative paths do not.
+     * Absolute paths start with a path separator and relative paths do not. 
      * If this path is relative, it is simply returned.
      *
      * @return the new path
@@ -304,13 +304,13 @@
 
     /**
      * Return a new path which is the equivalent of this path converted to UNC
-     * form (if the given bool is true) or this path not as a UNC path (if the given
-     * bool is false). If UNC, the returned path will not have a device and the
+     * form (if the given boolean is true) or this path not as a UNC path (if the given
+     * boolean is false). If UNC, the returned path will not have a device and the 
      * first 2 characters of the path string will be <code>Path.SEPARATOR</code>. If not UNC, the
-     *  first 2 characters of the returned path string will not be <code>Path.SEPARATOR</code>.
-     *
+     * 	first 2 characters of the returned path string will not be <code>Path.SEPARATOR</code>.
+     * 
      * @param toUNC true if converting to UNC, false otherwise
-     * @return the new path, either in UNC form or not depending on the bool parameter
+     * @return the new path, either in UNC form or not depending on the boolean parameter
      */
     public IPath makeUNC(bool toUNC);
 
@@ -326,7 +326,7 @@
 
     /**
      * Returns a new path which is the same as this path but with
-     * the file extension removed.  If this path does not have an
+     * the file extension removed.  If this path does not have an 
      * extension, this path is returned.
      * <p>
      * The file extension portion is defined as the string
@@ -342,7 +342,7 @@
 
     /**
      * Returns a copy of this path with the given number of segments
-     * removed from the beginning. The device id is preserved.
+     * removed from the beginning. The device id is preserved. 
      * The number must be greater or equal zero.
      * If the count is zero, this path is returned.
      * The resulting path will always be a relative path with respect
@@ -395,13 +395,13 @@
      * <code>null</code> if the path does not have such a segment.
      *
      * @param index the 0-based segment index
-     * @return the specified segment, or <code>null</code>
+     * @return the specified segment, or <code>null</code> 
      */
     public String segment(int index);
 
     /**
      * Returns the number of segments in this path.
-     * <p>
+     * <p> 
      * Note that both root and empty paths have 0 segments.
      * </p>
      *
@@ -417,7 +417,7 @@
     public String[] segments();
 
     /**
-     * Returns a new path which is the same as this path but with
+     * Returns a new path which is the same as this path but with 
      * the given device id.  The device id must end with a ":".
      * A device independent path is obtained by passing <code>null</code>.
      * <p>
@@ -435,7 +435,7 @@
      *
      * @return the file corresponding to this path
      */
-    public tango.io.FilePath.FilePath toFile();
+    public java.io.File toFile();
 
     /**
      * Returns a string representation of this path which uses the
@@ -451,9 +451,9 @@
     public String toOSString();
 
     /**
-     * Returns a platform-neutral string representation of this path. The
-     * format is not specified, except that the resulting string can be
-     * passed back to the <code>Path#fromPortableString(String)</code>
+     * Returns a platform-neutral string representation of this path. The 
+     * format is not specified, except that the resulting string can be 
+     * passed back to the <code>Path#fromPortableString(String)</code> 
      * constructor to produce the exact same path on any platform.
      * <p>
      * This string is suitable for passing to <code>Path#fromPortableString(String)</code>.
--- a/org.eclipse.equinox.common/src/org/eclipse/core/runtime/IProgressMonitor.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.equinox.common/src/org/eclipse/core/runtime/IProgressMonitor.d	Sun Nov 08 12:42:30 2009 +0100
@@ -4,16 +4,16 @@
  * 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:
  *     IBM Corporation - initial API and implementation
- * Port to the D programming language:
- *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
-module org.eclipse.core.runtime.IProgressMonitor;
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
+module org.eclipse.core.runtimeIProgressMonitor;
 
 import java.lang.all;
-import java.lang.String;
+
 
 /**
  * The <code>IProgressMonitor</code> interface is implemented
@@ -22,25 +22,25 @@
  * <p>
  * All activity is broken down into a linear sequence of tasks against
  * which progress is reported. When a task begins, a <code>beginTask(String, int)
- * </code> notification is reported, followed by any number and mixture of
- * progress reports (<code>worked()</code>) and subtask notifications
- * (<code>subTask(String)</code>).  When the task is eventually completed, a
+ * </code> notification is reported, followed by any number and mixture of 
+ * progress reports (<code>worked()</code>) and subtask notifications 
+ * (<code>subTask(String)</code>).  When the task is eventually completed, a 
  * <code>done()</code> notification is reported.  After the <code>done()</code>
  * notification, the progress monitor cannot be reused;  i.e., <code>
- * beginTask(String, int)</code> cannot be called again after the call to
+ * beginTask(String, int)</code> cannot be called again after the call to 
  * <code>done()</code>.
  * </p>
  * <p>
- * A request to cancel an operation can be signaled using the
+ * A request to cancel an operation can be signaled using the 
  * <code>setCanceled</code> method.  Operations taking a progress
  * monitor are expected to poll the monitor (using <code>isCanceled</code>)
- * periodically and abort at their earliest convenience.  Operation can however
+ * periodically and abort at their earliest convenience.  Operation can however 
  * choose to ignore cancelation requests.
  * </p>
  * <p>
- * Since notification is synchronous with the activity itself, the listener should
- * provide a fast and robust implementation. If the handling of notifications would
- * involve blocking operations, or operations which might throw uncaught exceptions,
+ * Since notification is synchronous with the activity itself, the listener should 
+ * provide a fast and robust implementation. If the handling of notifications would 
+ * involve blocking operations, or operations which might throw uncaught exceptions, 
  * the notifications should be queued, and the actual processing deferred (or perhaps
  * delegated to a separate thread).
  * </p><p>
@@ -53,32 +53,32 @@
 
     /** Constant indicating an unknown amount of work.
      */
-    public static const int UNKNOWN = -1;
+    public final static int UNKNOWN = -1;
 
     /**
      * Notifies that the main task is beginning.  This must only be called once
      * on a given progress monitor instance.
-     *
+     * 
      * @param name the name (or description) of the main task
      * @param totalWork the total number of work units into which
-     *  the main task is been subdivided. If the value is <code>UNKNOWN</code>
-     *  the implementation is free to indicate progress in a way which
+     *  the main task is been subdivided. If the value is <code>UNKNOWN</code> 
+     *  the implementation is free to indicate progress in a way which 
      *  doesn't require the total number of work units in advance.
      */
     public void beginTask(String name, int totalWork);
 
     /**
-     * Notifies that the work is done; that is, either the main task is completed
-     * or the user canceled it. This method may be called more than once
+     * Notifies that the work is done; that is, either the main task is completed 
+     * or the user canceled it. This method may be called more than once 
      * (implementations should be prepared to handle this case).
      */
     public void done();
 
     /**
      * Internal method to handle scaling correctly. This method
-     * must not be called by a client. Clients should
+     * must not be called by a client. Clients should 
      * always use the method </code>worked(int)</code>.
-     *
+     * 
      * @param work the amount of work done
      */
     public void internalWorked(double work);
@@ -90,13 +90,13 @@
      *
      * @return <code>true</code> if cancellation has been requested,
      *    and <code>false</code> otherwise
-     * @see #setCanceled(bool)
+     * @see #setCanceled(boolean)
      */
     public bool isCanceled();
 
     /**
      * Sets the cancel state to the given value.
-     *
+     * 
      * @param value <code>true</code> indicates that cancelation has
      *     been requested (but not necessarily acknowledged);
      *     <code>false</code> clears this flag
@@ -105,8 +105,8 @@
     public void setCanceled(bool value);
 
     /**
-     * Sets the task name to the given value. This method is used to
-     * restore the task label after a nested operation was executed.
+     * Sets the task name to the given value. This method is used to 
+     * restore the task label after a nested operation was executed. 
      * Normally there is no need for clients to call this method.
      *
      * @param name the name (or description) of the main task
--- a/org.eclipse.equinox.common/src/org/eclipse/core/runtime/IProgressMonitorWithBlocking.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.equinox.common/src/org/eclipse/core/runtime/IProgressMonitorWithBlocking.d	Sun Nov 08 12:42:30 2009 +0100
@@ -4,19 +4,19 @@
  * 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:
  *     IBM - Initial API and implementation
- * Port to the D programming language:
- *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
-module org.eclipse.core.runtime.IProgressMonitorWithBlocking;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
+module org.eclipse.core.runtimeIProgressMonitorWithBlocking;
 
 import java.lang.all;
 
+import org.eclipse.core.runtimeIProgressMonitor; // packageimport
+import org.eclipse.core.runtimeIStatus; // packageimport
+
 /**
  * An extension to the IProgressMonitor interface for monitors that want to
  * support feedback when an activity is blocked due to concurrent activity in
@@ -48,7 +48,7 @@
      * the caller. If this blocking job is not known, this method will return a plain
      * informational <code>IStatus</code> object.
      * </p>
-     *
+     * 
      * @param reason an optional status object whose message describes the
      * reason why this operation is blocked, or <code>null</code> if this
      * information is not available.
@@ -60,7 +60,7 @@
      * Clears the blocked state of the running operation. If a running
      * operation ever calls <code>setBlocked</code>, it must eventually call
      * <code>clearBlocked</code> before the operation completes.
-     *
+     * 
      * @see #setBlocked(IStatus)
      */
     public void clearBlocked();
--- a/org.eclipse.equinox.common/src/org/eclipse/core/runtime/ISafeRunnable.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.equinox.common/src/org/eclipse/core/runtime/ISafeRunnable.d	Sun Nov 08 12:42:30 2009 +0100
@@ -4,16 +4,17 @@
  * 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:
  *     IBM Corporation - initial API and implementation
- * Port to the D programming language:
- *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
-module org.eclipse.core.runtime.ISafeRunnable;
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
+module org.eclipse.core.runtimeISafeRunnable;
 
-// import org.eclipse.swt.internal.Platform;
 import java.lang.all;
+
+
 /**
  * Safe runnables represent blocks of code and associated exception
  * handlers.  They are typically used when a plug-in needs to call some
@@ -35,10 +36,10 @@
      * Platform's run mechanism.
      *
      * @param exception an exception which occurred during processing
-     *      the body of this runnable (i.e., in <code>run()</code>)
+     *		the body of this runnable (i.e., in <code>run()</code>)
      * @see SafeRunner#run(ISafeRunnable)
      */
-    public void handleException(Exception exception);
+    public void handleException(Throwable exception);
 
     /**
      * Runs this runnable.  Any exceptions thrown from this method will
@@ -46,8 +47,8 @@
      * method.
      *
      * @exception Exception if a problem occurred while running this method.
-     *      The exception will be processed by <code>handleException</code>
+     *		The exception will be processed by <code>handleException</code>
      * @see SafeRunner#run(ISafeRunnable)
      */
-    public void run();
+    public void run() ;
 }
--- a/org.eclipse.equinox.common/src/org/eclipse/core/runtime/IStatus.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.equinox.common/src/org/eclipse/core/runtime/IStatus.d	Sun Nov 08 12:42:30 2009 +0100
@@ -4,20 +4,22 @@
  * 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:
  *     IBM Corporation - initial API and implementation
- * Port to the D programming language:
- *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
-module org.eclipse.core.runtime.IStatus;
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
+module org.eclipse.core.runtimeIStatus;
 
 import java.lang.all;
 
+import org.eclipse.core.runtimeStatus; // packageimport
+
 /**
  * A status object represents the outcome of an operation.
- * All <code>CoreException</code>s carry a status object to indicate
- * what went wrong. Status objects are also returned by methods needing
+ * All <code>CoreException</code>s carry a status object to indicate 
+ * what went wrong. Status objects are also returned by methods needing 
  * to provide details of failures (e.g., validation methods).
  * <p>
  * A status carries the following information:
@@ -29,7 +31,7 @@
  * <li> exception (optional) - for problems stemming from a failure at
  *    a lower level</li>
  * </ul>
- * Some status objects, known as multi-statuses, have other status objects
+ * Some status objects, known as multi-statuses, have other status objects 
  * as children.
  * </p>
  * <p>
@@ -49,25 +51,25 @@
      * @see #getSeverity()
      * @see #isOK()
      */
-    public static const int OK = 0;
+    public static final int OK = 0;
 
     /** Status type severity (bit mask, value 1) indicating this status is informational only.
      * @see #getSeverity()
      * @see #matches(int)
      */
-    public static const int INFO = 0x01;
+    public static final int INFO = 0x01;
 
     /** Status type severity (bit mask, value 2) indicating this status represents a warning.
      * @see #getSeverity()
      * @see #matches(int)
      */
-    public static const int WARNING = 0x02;
+    public static final int WARNING = 0x02;
 
     /** Status type severity (bit mask, value 4) indicating this status represents an error.
      * @see #getSeverity()
      * @see #matches(int)
      */
-    public static const int ERROR = 0x04;
+    public static final int ERROR = 0x04;
 
     /** Status type severity (bit mask, value 8) indicating this status represents a
      * cancelation
@@ -75,7 +77,7 @@
      * @see #matches(int)
      * @since 3.0
      */
-    public static const int CANCEL = 0x08;
+    public static final int CANCEL = 0x08;
 
     /**
      * Returns a list of status object immediately contained in this
@@ -94,14 +96,14 @@
     public int getCode();
 
     /**
-     * Returns the relevant low-level exception, or <code>null</code> if none.
+     * Returns the relevant low-level exception, or <code>null</code> if none. 
      * For example, when an operation fails because of a network communications
      * failure, this might return the <code>java.io.IOException</code>
      * describing the exact nature of that failure.
      *
      * @return the relevant low-level exception, or <code>null</code> if none
      */
-    public Exception getException();
+    public Throwable getException();
 
     /**
      * Returns the message describing the outcome.
@@ -135,7 +137,7 @@
      * no children.
      * </p>
      *
-     * @return the severity: one of <code>OK</code>, <code>ERROR</code>,
+     * @return the severity: one of <code>OK</code>, <code>ERROR</code>, 
      * <code>INFO</code>, <code>WARNING</code>,  or <code>CANCEL</code>
      * @see #matches(int)
      */
@@ -154,7 +156,7 @@
      * multi-status objects in a multi-status unaware way.
      * </p>
      *
-     * @return <code>true</code> for a multi-status,
+     * @return <code>true</code> for a multi-status, 
      *    <code>false</code> otherwise
      * @see #getChildren()
      */
@@ -178,7 +180,7 @@
      * @param severityMask a mask formed by bitwise or'ing severity mask
      *    constants (<code>ERROR</code>, <code>WARNING</code>,
      *    <code>INFO</code>, <code>CANCEL</code>)
-     * @return <code>true</code> if there is at least one match,
+     * @return <code>true</code> if there is at least one match, 
      *    <code>false</code> if there are no matches
      * @see #getSeverity()
      * @see #CANCEL
--- a/org.eclipse.equinox.common/src/org/eclipse/core/runtime/ListenerList.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.equinox.common/src/org/eclipse/core/runtime/ListenerList.d	Sun Nov 08 12:42:30 2009 +0100
@@ -4,41 +4,42 @@
  * 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:
  *     IBM Corporation - initial API and implementation
- * Port to the D programming language:
- *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
-module org.eclipse.core.runtime.ListenerList;
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
+module org.eclipse.core.runtimeListenerList;
 
 import java.lang.all;
 
+
 /**
  * This class is a thread safe list that is designed for storing lists of listeners.
- * The implementation is optimized for minimal memory footprint, frequent reads
+ * The implementation is optimized for minimal memory footprint, frequent reads 
  * and infrequent writes.  Modification of the list is synchronized and relatively
- * expensive, while accessing the listeners is very fast.  Readers are given access
- * to the underlying array data structure for reading, with the trust that they will
+ * expensive, while accessing the listeners is very fast.  Readers are given access 
+ * to the underlying array data structure for reading, with the trust that they will 
  * not modify the underlying array.
  * <p>
- * <a name="same">A listener list handles the <i>same</i> listener being added
+ * <a name="same">A listener list handles the <i>same</i> listener being added 
  * multiple times, and tolerates removal of listeners that are the same as other
- * listeners in the list.  For this purpose, listeners can be compared with each other
+ * listeners in the list.  For this purpose, listeners can be compared with each other 
  * using either equality or identity, as specified in the list constructor.
  * </p>
  * <p>
  * Use the <code>getListeners</code> method when notifying listeners. The recommended
  * code sequence for notifying all registered listeners of say,
  * <code>FooListener.eventHappened</code>, is:
- *
+ * 
  * <pre>
  * Object[] listeners = myListenerList.getListeners();
  * for (int i = 0; i &lt; listeners.length; ++i) {
- *  ((FooListener) listeners[i]).eventHappened(event);
+ * 	((FooListener) listeners[i]).eventHappened(event);
  * }
  * </pre>
- *
+ * 
  * </p><p>
  * This class can be used without OSGi running.
  * </p>
@@ -49,19 +50,19 @@
     /**
      * The empty array singleton instance.
      */
-    private static const Object[] EmptyArray;
+    private static final Object[] EmptyArray = new Object[0];
 
     /**
      * Mode constant (value 0) indicating that listeners should be considered
      * the <a href="#same">same</a> if they are equal.
      */
-    public static const int EQUALITY = 0;
+    public static final int EQUALITY = 0;
 
     /**
      * Mode constant (value 1) indicating that listeners should be considered
      * the <a href="#same">same</a> if they are identical.
      */
-    public static const int IDENTITY = 1;
+    public static final int IDENTITY = 1;
 
     /**
      * Indicates the comparison mode used to determine if two
@@ -72,40 +73,40 @@
     /**
      * The list of listeners.  Initially empty but initialized
      * to an array of size capacity the first time a listener is added.
-     * Maintains invariant: listeners !is null
+     * Maintains invariant: listeners != null
      */
-    private Object[] listeners;
+    private /+volatile+/ Object[] listeners = EmptyArray;
 
     /**
      * Creates a listener list in which listeners are compared using equality.
      */
     public this() {
-        this(EQUALITY);
+        thiscast(EQUALITY);
     }
 
     /**
      * Creates a listener list using the provided comparison mode.
-     *
+     * 
      * @param mode The mode used to determine if listeners are the <a href="#same">same</a>.
      */
     public this(int mode) {
         if (mode !is EQUALITY && mode !is IDENTITY)
-            throw new IllegalArgumentException( null );
+            throw new IllegalArgumentException();
         this.identity = mode is IDENTITY;
     }
 
     /**
      * Adds a listener to this list. This method has no effect if the <a href="#same">same</a>
      * listener is already registered.
-     *
+     * 
      * @param listener the non-<code>null</code> listener to add
      */
     public synchronized void add(Object listener) {
-        // This method is synchronized to protect against multiple threads adding
+        // This method is synchronized to protect against multiple threads adding 
         // or removing listeners concurrently. This does not block concurrent readers.
         if (listener is null)
-            throw new IllegalArgumentException( null );
-        // check for duplicates
+            throw new IllegalArgumentException();
+        // check for duplicates 
         final int oldSize = listeners.length;
         for (int i = 0; i < oldSize; ++i) {
             Object listener2 = listeners[i];
@@ -125,10 +126,10 @@
      * The resulting array is unaffected by subsequent adds or removes.
      * If there are no listeners registered, the result is an empty array.
      * Use this method when notifying listeners, so that any modifications
-     * to the listener list during the notification will have no effect on
+     * to the listener list during the notification will have no effect on 
      * the notification itself.
      * <p>
-     * Note: Callers of this method <b>must not</b> modify the returned array.
+     * Note: Callers of this method <b>must not</b> modify the returned array. 
      *
      * @return the list of registered listeners
      */
@@ -147,16 +148,16 @@
     }
 
     /**
-     * Removes a listener from this list. Has no effect if the <a href="#same">same</a>
+     * Removes a listener from this list. Has no effect if the <a href="#same">same</a> 
      * listener was not already registered.
      *
      * @param listener the non-<code>null</code> listener to remove
      */
     public synchronized void remove(Object listener) {
-        // This method is synchronized to protect against multiple threads adding
+        // This method is synchronized to protect against multiple threads adding 
         // or removing listeners concurrently. This does not block concurrent readers.
         if (listener is null)
-            throw new IllegalArgumentException( null );
+            throw new IllegalArgumentException();
         int oldSize = listeners.length;
         for (int i = 0; i < oldSize; ++i) {
             Object listener2 = listeners[i];
@@ -184,7 +185,7 @@
     public int size() {
         return listeners.length;
     }
-
+    
     /**
      * Removes all listeners from this list.
      */
--- a/org.eclipse.equinox.common/src/org/eclipse/core/runtime/MultiStatus.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.equinox.common/src/org/eclipse/core/runtime/MultiStatus.d	Sun Nov 08 12:42:30 2009 +0100
@@ -4,23 +4,22 @@
  * 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:
  *     IBM Corporation - initial API and implementation
- * Port to the D programming language:
- *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
-module org.eclipse.core.runtime.MultiStatus;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.IStatus;
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
+module org.eclipse.core.runtimeMultiStatus;
 
 import java.lang.all;
-static import tango.text.Text;
+
+import org.eclipse.core.runtimeStatus; // packageimport
+import org.eclipse.core.runtimeAssert; // packageimport
+import org.eclipse.core.runtimeIStatus; // packageimport
 
 /**
- * A concrete multi-status implementation,
+ * A concrete multi-status implementation, 
  * suitable either for instantiating or subclassing.
  * <p>
  * This class can be used without OSGi running.
@@ -41,9 +40,9 @@
      * @param message a human-readable message, localized to the
      *    current locale
      * @param exception a low-level exception, or <code>null</code> if not
-     *    applicable
+     *    applicable 
      */
-    public this(String pluginId, int code, IStatus[] newChildren, String message, Exception exception) {
+    public this(String pluginId, int code, IStatus[] newChildren, String message, Throwable exception) {
         this(pluginId, code, message, exception);
         Assert.isLegal(newChildren !is null);
         int maxSeverity = getSeverity();
@@ -55,7 +54,7 @@
         }
         this.children = new IStatus[newChildren.length];
         setSeverity(maxSeverity);
-        SimpleType!(IStatus).arraycopy(newChildren, 0, this.children, 0, newChildren.length);
+        System.arraycopy(newChildren, 0, this.children, 0, newChildren.length);
     }
 
     /**
@@ -66,9 +65,9 @@
      * @param message a human-readable message, localized to the
      *    current locale
      * @param exception a low-level exception, or <code>null</code> if not
-     *    applicable
+     *    applicable 
      */
-    public this(String pluginId, int code, String message, Exception exception) {
+    public this(String pluginId, int code, String message, Throwable exception) {
         super(OK, pluginId, code, message, exception);
         children = new IStatus[0];
     }
@@ -81,7 +80,7 @@
     public void add(IStatus status) {
         Assert.isLegal(status !is null);
         IStatus[] result = new IStatus[children.length + 1];
-        SimpleType!(IStatus).arraycopy(children, 0, result, 0, children.length);
+        System.arraycopy(children, 0, result, 0, children.length);
         result[result.length - 1] = status;
         children = result;
         int newSev = status.getSeverity();
@@ -108,23 +107,23 @@
     /* (Intentionally not javadoc'd)
      * Implements the corresponding method on <code>IStatus</code>.
      */
-    public override IStatus[] getChildren() {
+    public IStatus[] getChildren() {
         return children;
     }
 
     /* (Intentionally not javadoc'd)
      * Implements the corresponding method on <code>IStatus</code>.
      */
-    public override bool isMultiStatus() {
+    public bool isMultiStatus() {
         return true;
     }
 
     /**
      * Merges the given status into this multi-status.
      * Equivalent to <code>add(status)</code> if the
-     * given status is not a multi-status.
+     * given status is not a multi-status. 
      * Equivalent to <code>addAll(status)</code> if the
-     * given status is a multi-status.
+     * given status is a multi-status. 
      *
      * @param status the status to merge into this one
      * @see #add(IStatus)
@@ -140,18 +139,17 @@
     }
 
     /**
-     * Returns a string representation of the status, suitable
+     * Returns a string representation of the status, suitable 
      * for debugging purposes only.
      */
-    public override String toString() {
-        tango.text.Text.Text!(char) buf = new tango.text.Text.Text!(char);
-        buf.append(super.toString());
+    public String toString() {
+        StringBuffer buf = new StringBuffer(super.toString());
         buf.append(" children=["); //$NON-NLS-1$
         for (int i = 0; i < children.length; i++) {
             if (i !is 0) {
                 buf.append(" "); //$NON-NLS-1$
             }
-            buf.append( (cast(Object)children[i]).toString());
+            buf.append(children[i].toString());
         }
         buf.append("]"); //$NON-NLS-1$
         return buf.toString();
--- a/org.eclipse.equinox.common/src/org/eclipse/core/runtime/NullProgressMonitor.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.equinox.common/src/org/eclipse/core/runtime/NullProgressMonitor.d	Sun Nov 08 12:42:30 2009 +0100
@@ -4,18 +4,18 @@
  * 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:
  *     IBM Corporation - initial API and implementation
- * Port to the D programming language:
- *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
-module org.eclipse.core.runtime.NullProgressMonitor;
-
-import org.eclipse.core.runtime.IProgressMonitor;
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
+module org.eclipse.core.runtimeNullProgressMonitor;
 
 import java.lang.all;
 
+import org.eclipse.core.runtimeIProgressMonitor; // packageimport
+
 /**
  * A default progress monitor implementation suitable for
  * subclassing.
@@ -37,13 +37,14 @@
      * Constructs a new progress monitor.
      */
     public this() {
+        super();
     }
 
     /**
-     * This implementation does nothing.
+     * This implementation does nothing. 
      * Subclasses may override this method to do interesting
      * processing when a task begins.
-     *
+     * 
      * @see IProgressMonitor#beginTask(String, int)
      */
     public void beginTask(String name, int totalWork) {
@@ -54,7 +55,7 @@
      * This implementation does nothing.
      * Subclasses may override this method to do interesting
      * processing when a task is done.
-     *
+     * 
      * @see IProgressMonitor#done()
      */
     public void done() {
@@ -64,7 +65,7 @@
     /**
      * This implementation does nothing.
      * Subclasses may override this method.
-     *
+     * 
      * @see IProgressMonitor#internalWorked(double)
      */
     public void internalWorked(double work) {
@@ -72,13 +73,13 @@
     }
 
     /**
-     * This implementation returns the value of the internal
+     * This implementation returns the value of the internal 
      * state variable set by <code>setCanceled</code>.
      * Subclasses which override this method should
      * override <code>setCanceled</code> as well.
      *
      * @see IProgressMonitor#isCanceled()
-     * @see IProgressMonitor#setCanceled(bool)
+     * @see IProgressMonitor#setCanceled(boolean)
      */
     public bool isCanceled() {
         return cancelled;
@@ -86,11 +87,11 @@
 
     /**
      * This implementation sets the value of an internal state variable.
-     * Subclasses which override this method should override
+     * Subclasses which override this method should override 
      * <code>isCanceled</code> as well.
      *
      * @see IProgressMonitor#isCanceled()
-     * @see IProgressMonitor#setCanceled(bool)
+     * @see IProgressMonitor#setCanceled(boolean)
      */
     public void setCanceled(bool cancelled) {
         this.cancelled = cancelled;
@@ -100,7 +101,7 @@
      * This implementation does nothing.
      * Subclasses may override this method to do something
      * with the name of the task.
-     *
+     * 
      * @see IProgressMonitor#setTaskName(String)
      */
     public void setTaskName(String name) {
@@ -111,7 +112,7 @@
      * This implementation does nothing.
      * Subclasses may override this method to do interesting
      * processing when a subtask begins.
-     *
+     * 
      * @see IProgressMonitor#subTask(String)
      */
     public void subTask(String name) {
@@ -122,7 +123,7 @@
      * This implementation does nothing.
      * Subclasses may override this method to do interesting
      * processing when some work has been completed.
-     *
+     * 
      * @see IProgressMonitor#worked(int)
      */
     public void worked(int work) {
--- a/org.eclipse.equinox.common/src/org/eclipse/core/runtime/OperationCanceledException.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.equinox.common/src/org/eclipse/core/runtime/OperationCanceledException.d	Sun Nov 08 12:42:30 2009 +0100
@@ -4,18 +4,19 @@
  * 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:
  *     IBM Corporation - initial API and implementation
- * Port to the D programming language:
- *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
-module org.eclipse.core.runtime.OperationCanceledException;
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
+module org.eclipse.core.runtimeOperationCanceledException;
 
 import java.lang.all;
 
+
 /**
- * This exception is thrown to blow out of a long-running method
+ * This exception is thrown to blow out of a long-running method 
  * when the user cancels it.
  * <p>
  * This class can be used without OSGi running.
@@ -29,7 +30,7 @@
     /**
      * All serializable objects should have a stable serialVersionUID
      */
-    private static const long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
     /**
      * Creates a new exception.
@@ -40,7 +41,7 @@
 
     /**
      * Creates a new exception with the given message.
-     *
+     * 
      * @param message the message for the exception
      */
     public this(String message) {
--- a/org.eclipse.equinox.common/src/org/eclipse/core/runtime/Path.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.equinox.common/src/org/eclipse/core/runtime/Path.d	Sun Nov 08 12:42:30 2009 +0100
@@ -4,29 +4,27 @@
  * 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:
  *     IBM Corporation - initial API and implementation
- * Port to the D programming language:
- *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
-module org.eclipse.core.runtime.Path;
-
-import tango.io.FilePath;
-static import tango.io.Path;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Assert;
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
+module org.eclipse.core.runtimePath;
 
 import java.lang.all;
 
-import tango.io.model.IFile;
+import org.eclipse.core.runtimeIPath; // packageimport
+import org.eclipse.core.runtimeAssert; // packageimport
 
-/**
+import java.io.File;
+
+/** 
  * The standard implementation of the <code>IPath</code> interface.
  * Paths are always maintained in canonicalized form.  That is, parent
- * references (i.e., <code>../../</code>) and duplicate separators are
+ * references (i.e., <code>../../</code>) and duplicate separators are 
  * resolved.  For example,
- * <pre>     new Path("/a/b").append("../foo/bar")</pre>
+ * <pre>     (new Path("/a/b")).append("../foo/bar")</pre>
  * will yield the path
  * <pre>     /a/foo/bar</pre>
  * <p>
@@ -40,60 +38,50 @@
  */
 public class Path : IPath, Cloneable {
     /** masks for separator values */
-    private static const int HAS_LEADING = 1;
-    private static const int IS_UNC = 2;
-    private static const int HAS_TRAILING = 4;
+    private static final int HAS_LEADING = 1;
+    private static final int IS_UNC = 2;
+    private static final int HAS_TRAILING = 4;
 
-    private static const int ALL_SEPARATORS = HAS_LEADING | IS_UNC | HAS_TRAILING;
+    private static final int ALL_SEPARATORS = HAS_LEADING | IS_UNC | HAS_TRAILING;
 
     /** Constant empty string value. */
-    private static const String EMPTY_STRING = ""; //$NON-NLS-1$
+    private static final String EMPTY_STRING = ""; //$NON-NLS-1$
 
     /** Constant value indicating no segments */
-    private static const String[] NO_SEGMENTS = null;
+    private static final String[] NO_SEGMENTS = new String[0];
 
     /** Constant value containing the empty path with no device. */
-    public static const Path EMPTY;
+    public static final Path EMPTY = new Pathcast(EMPTY_STRING);
 
     /** Mask for all bits that are involved in the hash code */
-    private static const int HASH_MASK = ~HAS_TRAILING;
+    private static final int HASH_MASK = ~HAS_TRAILING;
 
     /** Constant root path string (<code>"/"</code>). */
-    private static const String ROOT_STRING = "/"; //$NON-NLS-1$
+    private static final String ROOT_STRING = "/"; //$NON-NLS-1$
 
     /** Constant value containing the root path with no device. */
-    public static const Path ROOT;
+    public static final Path ROOT = new Pathcast(ROOT_STRING);
 
     /** Constant value indicating if the current platform is Windows */
-    version(Windows){
-        private static const bool WINDOWS = true;
-    }
-    else {
-        private static const bool WINDOWS = false;
-    }
-
-    static this(){
-        EMPTY = new Path(EMPTY_STRING);
-        ROOT = new Path(ROOT_STRING);
-    }
+    private static final bool WINDOWS = java.io.File.separatorChar is '\\';
 
     /** The device id string. May be null if there is no device. */
     private String device = null;
 
-    //Private implementation note: the segments and separators
-    //arrays are never modified, so that they can be shared between
+    //Private implementation note: the segments and separators 
+    //arrays are never modified, so that they can be shared between 
     //path instances
 
     /** The path segments */
-    private String[] segments_;
+    private String[] segments;
 
     /** flags indicating separators (has leading, is UNC, has trailing) */
     private int separators;
 
-    /**
+    /** 
      * Constructs a new path from the given string path.
      * The string path must represent a valid file system path
-     * on the local file system.
+     * on the local file system. 
      * The path is canonicalized and double slashes are removed
      * except at the beginning. (to handle UNC paths). All forward
      * slashes ('/') are treated as segment delimiters, and any
@@ -108,7 +96,7 @@
         return new Path(pathString);
     }
 
-    /**
+    /** 
      * Constructs a new path from the given path string.
      * The path string must have been produced by a previous
      * call to <code>IPath.toPortableString</code>.
@@ -118,22 +106,22 @@
      * @since 3.1
      */
     public static IPath fromPortableString(String pathString) {
-        int firstMatch = pathString.indexOf(DEVICE_SEPARATOR) + 1;
+        int firstMatch = pathString.indexOfcast(DEVICE_SEPARATOR) + 1;
         //no extra work required if no device characters
         if (firstMatch <= 0)
             return (new Path()).initialize(null, pathString);
         //if we find a single colon, then the path has a device
         String devicePart = null;
-        int pathLength = pathString.length;
+        int pathLength = pathString.length();
         if (firstMatch is pathLength || pathString.charAt(firstMatch) !is DEVICE_SEPARATOR) {
             devicePart = pathString.substring(0, firstMatch);
             pathString = pathString.substring(firstMatch, pathLength);
         }
         //optimize for no colon literals
-        if (pathString.indexOf(DEVICE_SEPARATOR) is -1)
+        if (pathString.indexOfcast(DEVICE_SEPARATOR) is -1)
             return (new Path()).initialize(devicePart, pathString);
         //contract colon literals
-        char[] chars = pathString/+.toCharArray()+/;
+        char[] chars = pathString.toCharArray();
         int readOffset = 0, writeOffset = 0, length = chars.length;
         while (readOffset < length) {
             if (chars[readOffset] is DEVICE_SEPARATOR)
@@ -141,7 +129,7 @@
                     break;
             chars[writeOffset++] = chars[readOffset++];
         }
-        return (new Path()).initialize(devicePart, chars[ 0 .. writeOffset] );
+        return (new Path()).initialize(devicePart, new String(chars, 0, writeOffset));
     }
 
     /* (Intentionally not included in javadoc)
@@ -151,10 +139,10 @@
         // not allowed
     }
 
-    /**
+    /** 
      * Constructs a new path from the given string path.
      * The string path must represent a valid file system path
-     * on the local file system.
+     * on the local file system. 
      * The path is canonicalized and double slashes are removed
      * except at the beginning. (to handle UNC paths). All forward
      * slashes ('/') are treated as segment delimiters, and any
@@ -170,18 +158,18 @@
             //convert backslash to forward slash
             fullPath = fullPath.indexOf('\\') is -1 ? fullPath : fullPath.replace('\\', SEPARATOR);
             //extract device
-            int i = fullPath.indexOf(DEVICE_SEPARATOR);
+            int i = fullPath.indexOfcast(DEVICE_SEPARATOR);
             if (i !is -1) {
                 //remove leading slash from device part to handle output of URL.getFile()
                 int start = fullPath.charAt(0) is SEPARATOR ? 1 : 0;
                 devicePart = fullPath.substring(start, i + 1);
-                fullPath = fullPath.substring(i + 1, fullPath.length);
+                fullPath = fullPath.substring(i + 1, fullPath.length());
             }
         }
         initialize(devicePart, fullPath);
     }
 
-    /**
+    /** 
      * Constructs a new path from the given device id and string path.
      * The given string path must be valid.
      * The path is canonicalized and double slashes are removed except
@@ -206,9 +194,9 @@
     /* (Intentionally not included in javadoc)
      * Private constructor.
      */
-    private this(String device, String[] segments_, int _separators) {
-        // no segment validations are done for performance reasons
-        this.segments_ = segments_;
+    private this(String device, String[] segments, int _separators) {
+        // no segment validations are done for performance reasons	
+        this.segments = segments;
         this.device = device;
         //hash code is cached in all but the bottom three bits of the separators field
         this.separators = (computeHashCode() << 3) | (_separators & ALL_SEPARATORS);
@@ -220,10 +208,10 @@
     public IPath addFileExtension(String extension) {
         if (isRoot() || isEmpty() || hasTrailingSeparator())
             return this;
-        int len = segments_.length;
+        int len = segments.length;
         String[] newSegments = new String[len];
-        System.arraycopy(segments_, 0, newSegments, 0, len - 1);
-        newSegments[len - 1] = segments_[len - 1] ~ '.' ~ extension;
+        System.arraycopy(segments, 0, newSegments, 0, len - 1);
+        newSegments[len - 1] = segments[len - 1] + '.' + extension;
         return new Path(device, newSegments, separators);
     }
 
@@ -236,9 +224,9 @@
         }
         //XXX workaround, see 1GIGQ9V
         if (isEmpty()) {
-            return new Path(device, segments_, HAS_LEADING);
+            return new Path(device, segments, HAS_LEADING);
         }
-        return new Path(device, segments_, separators | HAS_TRAILING);
+        return new Path(device, segments, separators | HAS_TRAILING);
     }
 
     /* (Intentionally not included in javadoc)
@@ -255,17 +243,17 @@
             return tail.setDevice(device).makeAbsolute().makeUNC(isUNC());
 
         //concatenate the two segment arrays
-        int myLen = segments_.length;
+        int myLen = segments.length;
         int tailLen = tail.segmentCount();
         String[] newSegments = new String[myLen + tailLen];
-        System.arraycopy(segments_, 0, newSegments, 0, myLen);
+        System.arraycopy(segments, 0, newSegments, 0, myLen);
         for (int i = 0; i < tailLen; i++) {
             newSegments[myLen + i] = tail.segment(i);
         }
         //use my leading separators and the tail's trailing separator
         Path result = new Path(device, newSegments, (separators & (HAS_LEADING | IS_UNC)) | (tail.hasTrailingSeparator() ? HAS_TRAILING : 0));
         String tailFirstSegment = newSegments[myLen];
-        if (tailFirstSegment.equals("..") || tailFirstSegment.equals(".")) { //$NON-NLS-1$ //$NON-NLS-2$
+        if (tailFirstSegment.opEquals("..") || tailFirstSegment.opEquals(".")) { //$NON-NLS-1$ //$NON-NLS-2$
             result.canonicalize();
         }
         return result;
@@ -276,20 +264,20 @@
      */
     public IPath append(String tail) {
         //optimize addition of a single segment
-        if (tail.indexOf(SEPARATOR) is -1 && tail.indexOf("\\") is -1 && tail.indexOf(DEVICE_SEPARATOR) is -1) { //$NON-NLS-1$
-            int tailLength = tail.length;
+        if (tail.indexOfcast(SEPARATOR) is -1 && tail.indexOf("\\") is -1 && tail.indexOfcast(DEVICE_SEPARATOR) is -1) { //$NON-NLS-1$
+            int tailLength = tail.length();
             if (tailLength < 3) {
                 //some special cases
-                if (tailLength is 0 || ".".equals(tail)) { //$NON-NLS-1$
+                if (tailLength is 0 || ".".opEquals(tail)) { //$NON-NLS-1$
                     return this;
                 }
-                if ("..".equals(tail)) //$NON-NLS-1$
+                if ("..".opEquals(tail)) //$NON-NLS-1$
                     return removeLastSegments(1);
             }
             //just add the segment
-            int myLen = segments_.length;
+            int myLen = segments.length;
             String[] newSegments = new String[myLen + 1];
-            System.arraycopy(segments_, 0, newSegments, 0, myLen);
+            System.arraycopy(segments, 0, newSegments, 0, myLen);
             newSegments[myLen] = tail;
             return new Path(device, newSegments, separators & ~HAS_TRAILING);
         }
@@ -308,13 +296,13 @@
      */
     private bool canonicalize() {
         //look for segments that need canonicalizing
-        for (int i = 0, max = segments_.length; i < max; i++) {
-            String segment = segments_[i];
-            if (segment.charAt(0) is '.' && (segment.equals("..") || segment.equals("."))) { //$NON-NLS-1$ //$NON-NLS-2$
+        for (int i = 0, max = segments.length; i < max; i++) {
+            String segment = segments[i];
+            if (segment.charAt(0) is '.' && (segment.opEquals("..") || segment.opEquals("."))) { //$NON-NLS-1$ //$NON-NLS-2$
                 //path needs to be canonicalized
                 collapseParentReferences();
                 //paths of length 0 have no trailing separator
-                if (segments_.length is 0)
+                if (segments.length is 0)
                     separators &= (HAS_LEADING | IS_UNC);
                 //recompute hash because canonicalize affects hash
                 separators = (separators & ALL_SEPARATORS) | (computeHashCode() << 3);
@@ -327,22 +315,26 @@
     /* (Intentionally not included in javadoc)
      * Clones this object.
      */
-    public Path clone() {
-        return new Path(device, segments_, separators);
+    public Object clone() {
+        try {
+            return super.clone();
+        } catch (CloneNotSupportedException e) {
+            return null;
+        }
     }
 
     /**
      * Destructively removes all occurrences of ".." segments from this path.
      */
     private void collapseParentReferences() {
-        int segmentCount = segments_.length;
+        int segmentCount = segments.length;
         String[] stack = new String[segmentCount];
         int stackPointer = 0;
         for (int i = 0; i < segmentCount; i++) {
-            String segment = segments_[i];
-            if (segment.equals("..")) { //$NON-NLS-1$
+            String segment = segments[i];
+            if (segment.opEquals("..")) { //$NON-NLS-1$
                 if (stackPointer is 0) {
-                    // if the stack is empty we are going out of our scope
+                    // if the stack is empty we are going out of our scope 
                     // so we need to accumulate segments.  But only if the original
                     // path is relative.  If it is absolute then we can't go any higher than
                     // root so simply toss the .. references.
@@ -350,14 +342,14 @@
                         stack[stackPointer++] = segment; //stack push
                 } else {
                     // if the top is '..' then we are accumulating segments so don't pop
-                    if ("..".equals(stack[stackPointer - 1])) //$NON-NLS-1$
+                    if ("..".opEquals(stack[stackPointer - 1])) //$NON-NLS-1$
                         stack[stackPointer++] = ".."; //$NON-NLS-1$
                     else
                         stackPointer--;
                     //stack pop
                 }
                 //collapse current references
-            } else if (!segment.equals(".") || segmentCount is 1) //$NON-NLS-1$
+            } else if (!segment.opEquals(".") || segmentCount is 1) //$NON-NLS-1$
                 stack[stackPointer++] = segment; //stack push
         }
         //if the number of segments hasn't changed, then no modification needed
@@ -366,7 +358,7 @@
         //build the new segment array backwards by popping the stack
         String[] newSegments = new String[stackPointer];
         System.arraycopy(stack, 0, newSegments, 0, stackPointer);
-        this.segments_ = newSegments;
+        this.segments = newSegments;
     }
 
     /**
@@ -374,7 +366,7 @@
      * of leading double slash which represents a UNC path.
      */
     private String collapseSlashes(String path) {
-        int length = path.length;
+        int length = path.length();
         // if the path is only 0, 1 or 2 chars long then it could not possibly have illegal
         // duplicate slashes.
         if (length < 3)
@@ -384,10 +376,10 @@
         if (path.indexOf("//", 1) is -1) //$NON-NLS-1$
             return path;
         // We found an occurrence of // in the path so do the slow collapse.
-        char[] result = new char[path.length];
+        char[] result = new char[path.length()];
         int count = 0;
         bool hasPrevious = false;
-        char[] characters = path/+.toCharArray()+/;
+        char[] characters = path.toCharArray();
         for (int index = 0; index < characters.length; index++) {
             char c = characters[index];
             if (c is SEPARATOR) {
@@ -409,18 +401,18 @@
                 count++;
             }
         }
-        return result[ 0 .. count];
+        return new String(result, 0, count);
     }
 
     /* (Intentionally not included in javadoc)
      * Computes the hash code for this object.
      */
     private int computeHashCode() {
-        int hash = device.length is 0 ? 17 : java.lang.all.toHash(device);
-        int segmentCount = segments_.length;
+        int hash = device is null ? 17 : device.toHash();
+        int segmentCount = segments.length;
         for (int i = 0; i < segmentCount; i++) {
             //this function tends to given a fairly even distribution
-            hash = hash * 37 + java.lang.all.toHash(segments_[i]);
+            hash = hash * 37 + segments[i].toHash();
         }
         return hash;
     }
@@ -431,16 +423,16 @@
     private int computeLength() {
         int length = 0;
         if (device !is null)
-            length += device.length;
+            length += device.length();
         if ((separators & HAS_LEADING) !is 0)
             length++;
         if ((separators & IS_UNC) !is 0)
             length++;
         //add the segment lengths
-        int max = segments_.length;
+        int max = segments.length;
         if (max > 0) {
             for (int i = 0; i < max; i++) {
-                length += segments_[i].length;
+                length += segments[i].length();
             }
             //add the separator lengths
             length += max - 1;
@@ -454,7 +446,7 @@
      * Returns the number of segments in the given path
      */
     private int computeSegmentCount(String path) {
-        int len = path.length;
+        int len = path.length();
         if (len is 0 || (len is 1 && path.charAt(0) is SEPARATOR)) {
             return 0;
         }
@@ -482,14 +474,14 @@
         if (segmentCount is 0)
             return NO_SEGMENTS;
         String[] newSegments = new String[segmentCount];
-        int len = path.length;
+        int len = path.length();
         // check for initial slash
         int firstPosition = (path.charAt(0) is SEPARATOR) ? 1 : 0;
         // check for UNC
         if (firstPosition is 1 && len > 1 && (path.charAt(1) is SEPARATOR))
             firstPosition = 2;
         int lastPosition = (path.charAt(len - 1) !is SEPARATOR) ? len - 1 : len - 2;
-        // for non-empty paths, the number of segments is
+        // for non-empty paths, the number of segments is 
         // the number of slashes plus 1, ignoring any leading
         // and trailing slashes
         int next = firstPosition;
@@ -511,38 +503,38 @@
      * the given string buffer. This escapes literal colon characters with double colons.
      */
     private void encodeSegment(String string, StringBuffer buf) {
-        int len = string.length;
+        int len = string.length();
         for (int i = 0; i < len; i++) {
             char c = string.charAt(i);
             buf.append(c);
             if (c is DEVICE_SEPARATOR)
-                buf.append(DEVICE_SEPARATOR);
+                buf.appendcast(DEVICE_SEPARATOR);
         }
     }
 
     /* (Intentionally not included in javadoc)
      * Compares objects for equality.
      */
-    public override int opEquals(Object obj) {
+    public override equals_t opEquals(Object obj) {
         if (this is obj)
             return true;
-        if (!(cast(Path)obj))
+        if (!( null !is cast(Path)obj ))
             return false;
         Path target = cast(Path) obj;
         //check leading separators and hash code
         if ((separators & HASH_MASK) !is (target.separators & HASH_MASK))
             return false;
-        String[] targetSegments = target.segments_;
-        int i = segments_.length;
+        String[] targetSegments = target.segments;
+        int i = segments.length;
         //check segment count
         if (i !is targetSegments.length)
             return false;
         //check segments in reverse order - later segments more likely to differ
         while (--i >= 0)
-            if (!segments_[i].equals(targetSegments[i]))
+            if (!segments[i].opEquals(targetSegments[i]))
                 return false;
         //check device last (least likely to differ)
-        return device is target.device || (device !is null && device.equals(target.device));
+        return device is target.device || (device !is null && device.opEquals(target.device));
     }
 
     /* (Intentionally not included in javadoc)
@@ -588,11 +580,11 @@
      * Initialize the current path with the given string.
      */
     private IPath initialize(String deviceString, String path) {
-        //Assert.isNotNull(path); // allow for SWT
+        Assert.isNotNull(path);
         this.device = deviceString;
 
         path = collapseSlashes(path);
-        int len = path.length;
+        int len = path.length();
 
         //compute the separators array
         if (len < 2) {
@@ -613,7 +605,7 @@
                 separators |= HAS_TRAILING;
         }
         //compute segments and ensure canonical form
-        segments_ = computeSegments(path);
+        segments = computeSegments(path);
         if (!canonicalize()) {
             //compute hash now because canonicalize didn't need to do it
             separators = (separators & ALL_SEPARATORS) | (computeHashCode() << 3);
@@ -634,7 +626,7 @@
      */
     public bool isEmpty() {
         //true if no segments and no leading prefix
-        return segments_.length is 0 && ((separators & ALL_SEPARATORS) !is HAS_LEADING);
+        return segments.length is 0 && ((separators & ALL_SEPARATORS) !is HAS_LEADING);
 
     }
 
@@ -654,12 +646,12 @@
         if (isEmpty() || (isRoot() && anotherPath.isAbsolute())) {
             return true;
         }
-        int len = segments_.length;
+        int len = segments.length;
         if (len > anotherPath.segmentCount()) {
             return false;
         }
         for (int i = 0; i < len; i++) {
-            if (!segments_[i].equals(anotherPath.segment(i)))
+            if (!segments[i].opEquals(anotherPath.segment(i)))
                 return false;
         }
         return true;
@@ -670,7 +662,7 @@
      */
     public bool isRoot() {
         //must have no segments, a leading separator, and not be a UNC path.
-        return this is ROOT || (segments_.length is 0 && ((separators & ALL_SEPARATORS) is HAS_LEADING));
+        return this is ROOT || (segments.length is 0 && ((separators & ALL_SEPARATORS) is HAS_LEADING));
     }
 
     /* (Intentionally not included in javadoc)
@@ -697,7 +689,7 @@
      * @see IPath#isValidSegment(String)
      */
     public bool isValidSegment(String segment) {
-        int size = segment.length;
+        int size = segment.length();
         if (size is 0)
             return false;
         for (int i = 0; i < size; i++) {
@@ -714,8 +706,8 @@
      * @see IPath#lastSegment()
      */
     public String lastSegment() {
-        int len = segments_.length;
-        return len is 0 ? null : segments_[len - 1];
+        int len = segments.length;
+        return len is 0 ? null : segments[len - 1];
     }
 
     /* (Intentionally not included in javadoc)
@@ -725,11 +717,11 @@
         if (isAbsolute()) {
             return this;
         }
-        Path result = new Path(device, segments_, separators | HAS_LEADING);
+        Path result = new Path(device, segments, separators | HAS_LEADING);
         //may need canonicalizing if it has leading ".." or "." segments
         if (result.segmentCount() > 0) {
             String first = result.segment(0);
-            if (first.equals("..") || first.equals(".")) { //$NON-NLS-1$ //$NON-NLS-2$
+            if (first.opEquals("..") || first.opEquals(".")) { //$NON-NLS-1$ //$NON-NLS-2$
                 result.canonicalize();
             }
         }
@@ -743,11 +735,11 @@
         if (!isAbsolute()) {
             return this;
         }
-        return new Path(device, segments_, separators & HAS_TRAILING);
+        return new Path(device, segments, separators & HAS_TRAILING);
     }
 
     /* (Intentionally not included in javadoc)
-     * @see IPath#makeUNC(bool)
+     * @see IPath#makeUNC(boolean)
      */
     public IPath makeUNC(bool toUNC) {
         // if we are already in the right form then just return
@@ -761,19 +753,19 @@
             //mask out the UNC bit
             newSeparators &= HAS_LEADING | HAS_TRAILING;
         }
-        return new Path(toUNC ? null : device, segments_, newSeparators);
+        return new Path(toUNC ? null : device, segments, newSeparators);
     }
 
     /* (Intentionally not included in javadoc)
      * @see IPath#matchingFirstSegments(IPath)
      */
     public int matchingFirstSegments(IPath anotherPath) {
-        Assert.isNotNull( cast(Object) anotherPath);
+        Assert.isNotNull(anotherPath);
         int anotherPathLen = anotherPath.segmentCount();
-        int max = Math.min(segments_.length, anotherPathLen);
+        int max = Math.min(segments.length, anotherPathLen);
         int count = 0;
         for (int i = 0; i < max; i++) {
-            if (!segments_[i].equals(anotherPath.segment(i))) {
+            if (!segments[i].opEquals(anotherPath.segment(i))) {
                 return count;
             }
             count++;
@@ -786,7 +778,7 @@
      */
     public IPath removeFileExtension() {
         String extension = getFileExtension();
-        if (extension is null || extension.equals("")) { //$NON-NLS-1$
+        if (extension is null || extension.opEquals("")) { //$NON-NLS-1$
             return this;
         }
         String lastSegment = lastSegment();
@@ -800,13 +792,13 @@
     public IPath removeFirstSegments(int count) {
         if (count is 0)
             return this;
-        if (count >= segments_.length) {
+        if (count >= segments.length) {
             return new Path(device, NO_SEGMENTS, 0);
         }
         Assert.isLegal(count > 0);
-        int newSize = segments_.length - count;
+        int newSize = segments.length - count;
         String[] newSegments = new String[newSize];
-        System.arraycopy(this.segments_, count, newSegments, 0, newSize);
+        System.arraycopy(this.segments, count, newSegments, 0, newSize);
 
         //result is always a relative path
         return new Path(device, newSegments, separators & HAS_TRAILING);
@@ -818,14 +810,14 @@
     public IPath removeLastSegments(int count) {
         if (count is 0)
             return this;
-        if (count >= segments_.length) {
+        if (count >= segments.length) {
             //result will have no trailing separator
             return new Path(device, NO_SEGMENTS, separators & (HAS_LEADING | IS_UNC));
         }
         Assert.isLegal(count > 0);
-        int newSize = segments_.length - count;
+        int newSize = segments.length - count;
         String[] newSegments = new String[newSize];
-        System.arraycopy(this.segments_, 0, newSegments, 0, newSize);
+        System.arraycopy(this.segments, 0, newSegments, 0, newSize);
         return new Path(device, newSegments, separators);
     }
 
@@ -836,31 +828,31 @@
         if (!hasTrailingSeparator()) {
             return this;
         }
-        return new Path(device, segments_, separators & (HAS_LEADING | IS_UNC));
+        return new Path(device, segments, separators & (HAS_LEADING | IS_UNC));
     }
 
     /* (Intentionally not included in javadoc)
      * @see IPath#segment(int)
      */
     public String segment(int index) {
-        if (index >= segments_.length)
+        if (index >= segments.length)
             return null;
-        return segments_[index];
+        return segments[index];
     }
 
     /* (Intentionally not included in javadoc)
      * @see IPath#segmentCount()
      */
     public int segmentCount() {
-        return segments_.length;
+        return segments.length;
     }
 
     /* (Intentionally not included in javadoc)
      * @see IPath#segments()
      */
     public String[] segments() {
-        String[] segmentCopy = new String[](segments_.length);
-        System.arraycopy(segments_, 0, segmentCopy, 0, segments_.length);
+        String[] segmentCopy = new String[segments.length];
+        System.arraycopy(segments, 0, segmentCopy, 0, segments.length);
         return segmentCopy;
     }
 
@@ -869,20 +861,20 @@
      */
     public IPath setDevice(String value) {
         if (value !is null) {
-            Assert.isTrue(value.indexOf(IPath.DEVICE_SEPARATOR) is (value.length - 1), "Last character should be the device separator"); //$NON-NLS-1$
+            Assert.isTrue(value.indexOfcast(IPath.DEVICE_SEPARATOR) is (value.length() - 1), "Last character should be the device separator"); //$NON-NLS-1$
         }
         //return the receiver if the device is the same
-        if (value is device || (value !is null && value.equals(device)))
+        if (value is device || (value !is null && value.opEquals(device)))
             return this;
 
-        return new Path(value, segments_, separators);
+        return new Path(value, segments, separators);
     }
 
     /* (Intentionally not included in javadoc)
      * @see IPath#toFile()
      */
-    public FilePath toFile() {
-        return new FilePath(tango.io.Path.standard(toOSString()));
+    public File toFile() {
+        return new File(toOSString());
     }
 
     /* (Intentionally not included in javadoc)
@@ -894,11 +886,11 @@
         int resultSize = computeLength();
         if (resultSize <= 0)
             return EMPTY_STRING;
-        char FILE_SEPARATOR = FileConst.PathSeparatorChar;
+        char FILE_SEPARATOR = File.separatorChar;
         char[] result = new char[resultSize];
         int offset = 0;
         if (device !is null) {
-            int size = device.length;
+            int size = device.length();
             device.getChars(0, size, result, offset);
             offset += size;
         }
@@ -906,23 +898,23 @@
             result[offset++] = FILE_SEPARATOR;
         if ((separators & IS_UNC) !is 0)
             result[offset++] = FILE_SEPARATOR;
-        int len = segments_.length - 1;
+        int len = segments.length - 1;
         if (len >= 0) {
             //append all but the last segment, with separators
             for (int i = 0; i < len; i++) {
-                int size = segments_[i].length;
-                segments_[i].getChars(0, size, result, offset);
+                int size = segments[i].length();
+                segments[i].getChars(0, size, result, offset);
                 offset += size;
                 result[offset++] = FILE_SEPARATOR;
             }
             //append the last segment
-            int size = segments_[len].length;
-            segments_[len].getChars(0, size, result, offset);
+            int size = segments[len].length();
+            segments[len].getChars(0, size, result, offset);
             offset += size;
         }
         if ((separators & HAS_TRAILING) !is 0)
             result[offset++] = FILE_SEPARATOR;
-        return result;
+        return new String(result);
     }
 
     /* (Intentionally not included in javadoc)
@@ -936,18 +928,18 @@
         if (device !is null)
             result.append(device);
         if ((separators & HAS_LEADING) !is 0)
-            result.append(SEPARATOR);
+            result.appendcast(SEPARATOR);
         if ((separators & IS_UNC) !is 0)
-            result.append(SEPARATOR);
-        int len = segments_.length;
+            result.appendcast(SEPARATOR);
+        int len = segments.length;
         //append all segments with separators
         for (int i = 0; i < len; i++) {
-            if (segments_[i].indexOf(DEVICE_SEPARATOR) >= 0)
-                encodeSegment(segments_[i], result);
+            if (segments[i].indexOfcast(DEVICE_SEPARATOR) >= 0)
+                encodeSegment(segments[i], result);
             else
-                result.append(segments_[i]);
+                result.append(segments[i]);
             if (i < len - 1 || (separators & HAS_TRAILING) !is 0)
-                result.append(SEPARATOR);
+                result.appendcast(SEPARATOR);
         }
         return result.toString();
     }
@@ -955,14 +947,14 @@
     /* (Intentionally not included in javadoc)
      * @see IPath#toString()
      */
-    public override String toString() {
+    public String toString() {
         int resultSize = computeLength();
         if (resultSize <= 0)
             return EMPTY_STRING;
         char[] result = new char[resultSize];
         int offset = 0;
         if (device !is null) {
-            int size = device.length;
+            int size = device.length();
             device.getChars(0, size, result, offset);
             offset += size;
         }
@@ -970,23 +962,23 @@
             result[offset++] = SEPARATOR;
         if ((separators & IS_UNC) !is 0)
             result[offset++] = SEPARATOR;
-        int len = segments_.length - 1;
+        int len = segments.length - 1;
         if (len >= 0) {
             //append all but the last segment, with separators
             for (int i = 0; i < len; i++) {
-                int size = segments_[i].length;
-                segments_[i].getChars(0, size, result, offset);
+                int size = segments[i].length();
+                segments[i].getChars(0, size, result, offset);
                 offset += size;
                 result[offset++] = SEPARATOR;
             }
             //append the last segment
-            int size = segments_[len].length;
-            segments_[len].getChars(0, size, result, offset);
+            int size = segments[len].length();
+            segments[len].getChars(0, size, result, offset);
             offset += size;
         }
         if ((separators & HAS_TRAILING) !is 0)
             result[offset++] = SEPARATOR;
-        return result;
+        return new String(result);
     }
 
     /* (Intentionally not included in javadoc)
@@ -995,11 +987,11 @@
     public IPath uptoSegment(int count) {
         if (count is 0)
             return new Path(device, NO_SEGMENTS, separators & (HAS_LEADING | IS_UNC));
-        if (count >= segments_.length)
+        if (count >= segments.length)
             return this;
         Assert.isTrue(count > 0, "Invalid parameter to Path.uptoSegment"); //$NON-NLS-1$
         String[] newSegments = new String[count];
-        System.arraycopy(segments_, 0, newSegments, 0, count);
+        System.arraycopy(segments, 0, newSegments, 0, count);
         return new Path(device, newSegments, separators);
     }
-}
+}
\ No newline at end of file
--- a/org.eclipse.equinox.common/src/org/eclipse/core/runtime/PlatformObject.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.equinox.common/src/org/eclipse/core/runtime/PlatformObject.d	Sun Nov 08 12:42:30 2009 +0100
@@ -4,18 +4,19 @@
  * 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:
  *     IBM Corporation - initial API and implementation
- * Port to the D programming language:
- *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
-module org.eclipse.core.runtime.PlatformObject;
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
+module org.eclipse.core.runtimePlatformObject;
 
 import java.lang.all;
 
-import org.eclipse.core.runtime.IAdaptable;
-// import org.eclipse.core.internal.runtime.AdapterManager;
+import org.eclipse.core.runtimeIAdaptable; // packageimport
+
+import org.eclipse.core.internal.runtime.AdapterManager;
 
 /**
  * An abstract superclass implementing the <code>IAdaptable</code>
@@ -29,7 +30,7 @@
  * of the {@link IAdapterManager} service. The method would look like:
  * <pre>
  *     public Object getAdapter(Class adapter) {
- *         IAdapterManager manager = ...;//lookup the IAdapterManager service
+ *         IAdapterManager manager = ...;//lookup the IAdapterManager service         
  *         return manager.getAdapter(this, adapter);
  *     }
  * </pre>
@@ -47,7 +48,7 @@
      * Constructs a new platform object.
      */
     public this() {
-//         super();
+        super();
     }
 
     /**
@@ -67,9 +68,7 @@
      * @return the adapted object or <code>null</code>
      * @see IAdaptable#getAdapter(Class)
      */
-    public Object getAdapter(ClassInfo adapter) {
-        implMissing( __FILE__, __LINE__ );
-        return null;
-//         return AdapterManager.getDefault().getAdapter(this, adapter);
+    public Object getAdapter(Class adapter) {
+        return AdapterManager.getDefault().getAdapter(this, adapter);
     }
 }
--- a/org.eclipse.equinox.common/src/org/eclipse/core/runtime/ProgressMonitorWrapper.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.equinox.common/src/org/eclipse/core/runtime/ProgressMonitorWrapper.d	Sun Nov 08 12:42:30 2009 +0100
@@ -4,21 +4,21 @@
  * 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:
  *     IBM Corporation - initial API and implementation
- * Port to the D programming language:
- *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
-module org.eclipse.core.runtime.ProgressMonitorWrapper;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IProgressMonitorWithBlocking;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Assert;
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
+module org.eclipse.core.runtimeProgressMonitorWrapper;
 
 import java.lang.all;
 
+import org.eclipse.core.runtimeIProgressMonitorWithBlocking; // packageimport
+import org.eclipse.core.runtimeAssert; // packageimport
+import org.eclipse.core.runtimeIProgressMonitor; // packageimport
+import org.eclipse.core.runtimeIStatus; // packageimport
+
 /**
  * An abstract wrapper around a progress monitor which,
  * unless overridden, forwards <code>IProgressMonitor</code>
@@ -34,17 +34,17 @@
     /** The wrapped progress monitor. */
     private IProgressMonitor progressMonitor;
 
-    /**
+    /** 
      * Creates a new wrapper around the given monitor.
      *
      * @param monitor the progress monitor to forward to
      */
     protected this(IProgressMonitor monitor) {
-        Assert.isNotNull(cast(Object)monitor);
+        Assert.isNotNull(monitor);
         progressMonitor = monitor;
     }
 
-    /**
+    /** 
      * This implementation of a <code>IProgressMonitor</code>
      * method forwards to the wrapped progress monitor.
      * Clients may override this method to do additional
@@ -66,8 +66,8 @@
      * @since 3.0
      */
     public void clearBlocked() {
-        if ( auto mon = cast(IProgressMonitorWithBlocking)progressMonitor )
-            mon.clearBlocked();
+        if ( null !is cast(IProgressMonitorWithBlocking)progressMonitor )
+            (cast(IProgressMonitorWithBlocking) progressMonitor).clearBlocked();
     }
 
     /**
@@ -125,8 +125,8 @@
      * @since 3.0
      */
     public void setBlocked(IStatus reason) {
-        if ( auto mon = cast(IProgressMonitorWithBlocking)progressMonitor)
-            mon.setBlocked(reason);
+        if ( null !is cast(IProgressMonitorWithBlocking)progressMonitor )
+            (cast(IProgressMonitorWithBlocking) progressMonitor).setBlocked(reason);
     }
 
     /**
@@ -135,7 +135,7 @@
      * Clients may override this method to do additional
      * processing.
      *
-     * @see IProgressMonitor#setCanceled(bool)
+     * @see IProgressMonitor#setCanceled(boolean)
      */
     public void setCanceled(bool b) {
         progressMonitor.setCanceled(b);
--- a/org.eclipse.equinox.common/src/org/eclipse/core/runtime/QualifiedName.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.equinox.common/src/org/eclipse/core/runtime/QualifiedName.d	Sun Nov 08 12:42:30 2009 +0100
@@ -4,23 +4,23 @@
  * 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:
  *     IBM Corporation - initial API and implementation
- * Port to the D programming language:
- *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
-module org.eclipse.core.runtime.QualifiedName;
-
-import org.eclipse.core.runtime.Assert;
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
+module org.eclipse.core.runtimeQualifiedName;
 
 import java.lang.all;
 
+import org.eclipse.core.runtimeAssert; // packageimport
+
 /**
  * Qualified names are two-part names: qualifier and local name.
- * The qualifier must be in URI form (see RFC2396).
+ * The qualifier must be in URI form (see RFC2396).  
  * Note however that the qualifier may be <code>null</code> if
- * the default name space is being used.  The empty string is not
+ * the default name space is being used.  The empty string is not 
  * a valid local name.
  * <p>
  * This class can be used without OSGi running.
@@ -50,7 +50,7 @@
      * @param localName the local name string
      */
     public this(String qualifier, String localName) {
-        Assert.isLegal(localName !is null && localName.length !is 0);
+        Assert.isLegal(localName !is null && localName.length() !is 0);
         this.qualifier = qualifier;
         this.localName = localName;
     }
@@ -67,11 +67,11 @@
      * @return <code>true</code> if these are equivalent qualified
      *    names, and <code>false</code> otherwise
      */
-    public override int opEquals(Object obj) {
+    public override equals_t opEquals(Object obj) {
         if (obj is this) {
             return true;
         }
-        if (!(cast(QualifiedName)obj )) {
+        if (!( null !is cast(QualifiedName)obj )) {
             return false;
         }
         QualifiedName qName = cast(QualifiedName) obj;
@@ -79,10 +79,10 @@
         if (qualifier is null && qName.getQualifier() !is null) {
             return false;
         }
-        if (qualifier !is null && !qualifier.equals(qName.getQualifier())) {
+        if (qualifier !is null && !qualifier.opEquals(qName.getQualifier())) {
             return false;
         }
-        return localName.equals(qName.getLocalName());
+        return localName.opEquals(qName.getLocalName());
     }
 
     /**
@@ -106,18 +106,18 @@
 
     /* (Intentionally omitted from javadoc)
      * Implements the method <code>Object.hashCode</code>.
-     *
+     * 
      * Returns the hash code for this qualified name.
      */
     public override hash_t toHash() {
-        return (qualifier is null ? 0 : .toHash(qualifier)) + .toHash(localName);
+        return (qualifier is null ? 0 : qualifier.toHash()) + localName.toHash();
     }
 
     /**
-     * Converts this qualified name into a string, suitable for
+     * Converts this qualified name into a string, suitable for 
      * debug purposes only.
      */
-    public override String toString() {
-        return (getQualifier() is null ? "" : getQualifier() ~ ':') ~ getLocalName(); //$NON-NLS-1$
+    public String toString() {
+        return (getQualifier() is null ? "" : getQualifier() + ':') + getLocalName(); //$NON-NLS-1$
     }
 }
--- a/org.eclipse.equinox.common/src/org/eclipse/core/runtime/SafeRunner.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.equinox.common/src/org/eclipse/core/runtime/SafeRunner.d	Sun Nov 08 12:42:30 2009 +0100
@@ -4,27 +4,30 @@
  * 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:
  *     IBM Corporation - initial API and implementation
- * Port to the D programming language:
- *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
-module org.eclipse.core.runtime.SafeRunner;
-
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.CoreException;
-
-import org.eclipse.core.internal.runtime.IRuntimeConstants;
-
-import org.eclipse.core.runtime.ISafeRunnable;
-import org.eclipse.core.runtime.Assert;
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
+module org.eclipse.core.runtimeSafeRunner;
 
 import java.lang.all;
 
+import org.eclipse.core.runtimeStatus; // packageimport
+import org.eclipse.core.runtimeMultiStatus; // packageimport
+import org.eclipse.core.runtimeAssert; // packageimport
+import org.eclipse.core.runtimeISafeRunnable; // packageimport
+import org.eclipse.core.runtimeOperationCanceledException; // packageimport
+import org.eclipse.core.runtimeIStatus; // packageimport
+import org.eclipse.core.runtimeCoreException; // packageimport
+
+import org.eclipse.core.internal.runtime.Activator;
+import org.eclipse.core.internal.runtime.CommonMessages;
+import org.eclipse.core.internal.runtime.IRuntimeConstants;
+import org.eclipse.core.internal.runtime.RuntimeLog;
+import org.eclipse.osgi.util.NLS;
+
 /**
  * Runs the given ISafeRunnable in a protected mode: exceptions
  * thrown in the runnable are logged and passed to the runnable's
@@ -44,44 +47,39 @@
      * @param code the runnable to run
      */
     public static void run(ISafeRunnable code) {
-        Assert.isNotNull(cast(Object)code);
+        Assert.isNotNull(code);
         try {
             code.run();
         } catch (Exception e) {
             handleException(code, e);
-// SWT not in D
-//         } catch (LinkageError e) {
-//             handleException(code, e);
+        } catch (LinkageError e) {
+            handleException(code, e);
         }
     }
 
-    private static void handleException(ISafeRunnable code, Exception e) {
-        if( null is cast(OperationCanceledException) e ){
-
-            // try to obtain the correct plug-in id for the bundle providing the safe runnable
-//          Activator activator = Activator.getDefault();
+    private static void handleException(ISafeRunnable code, Throwable e) {
+        if (!( null !is cast(OperationCanceledException)e )) {
+            // try to obtain the correct plug-in id for the bundle providing the safe runnable 
+            Activator activator = Activator.getDefault();
             String pluginId = null;
-//          if (activator !is null)
-//              pluginId = activator.getBundleId(code);
+            if (activator !is null)
+                pluginId = activator.getBundleId(code);
             if (pluginId is null)
                 pluginId = IRuntimeConstants.PI_COMMON;
-
-            String message = null;
-//          String message = NLS.bind(CommonMessages.meta_pluginProblems, pluginId);
+            String message = NLS.bind(CommonMessages.meta_pluginProblems, pluginId);
             IStatus status;
-            if ( auto ce = cast(CoreException) e ) {
+            if ( null !is cast(CoreException)e ) {
                 status = new MultiStatus(pluginId, IRuntimeConstants.PLUGIN_ERROR, message, e);
-                (cast(MultiStatus) status).merge( ce.getStatus());
+                (cast(MultiStatus) status).merge((cast(CoreException) e).getStatus());
             } else {
                 status = new Status(IStatus.ERROR, pluginId, IRuntimeConstants.PLUGIN_ERROR, message, e);
             }
-            // Make sure user sees the exception: if the log is empty, log the exceptions on stderr
-            //if (!RuntimeLog.isEmpty())
-            //    RuntimeLog.log(status);
-            //else
-            ExceptionPrintStackTrace(e);
+            // Make sure user sees the exception: if the log is empty, log the exceptions on stderr 
+            if (!RuntimeLog.isEmpty())
+                RuntimeLog.log(status);
+            else
+                e.printStackTrace();
         }
-
         code.handleException(e);
     }
 }
--- a/org.eclipse.equinox.common/src/org/eclipse/core/runtime/Status.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.equinox.common/src/org/eclipse/core/runtime/Status.d	Sun Nov 08 12:42:30 2009 +0100
@@ -4,23 +4,24 @@
  * 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:
  *     IBM Corporation - initial API and implementation
- * Port to the D programming language:
- *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
-module org.eclipse.core.runtime.Status;
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
+module org.eclipse.core.runtimeStatus;
+
+import java.lang.all;
+
+import org.eclipse.core.runtimeAssert; // packageimport
+import org.eclipse.core.runtimeIStatus; // packageimport
 
 import org.eclipse.core.internal.runtime.IRuntimeConstants;
 import org.eclipse.core.internal.runtime.LocalizationUtils;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Assert;
-
-import java.lang.all;
 
 /**
- * A concrete status implementation, suitable either for
+ * A concrete status implementation, suitable either for 
  * instantiating or subclassing.
  * <p>
  * This class can be used without OSGi running.
@@ -33,19 +34,13 @@
      *
      * @since 3.0
      */
-    public static const IStatus OK_STATUS;
+    public static final IStatus OK_STATUS = new Status(OK, IRuntimeConstants.PI_RUNTIME, OK, LocalizationUtils.safeLocalize("ok"), null); //$NON-NLS-1$
     /**
      * A standard CANCEL status with no message.
-     *
+     * 
      * @since 3.0
      */
-    public static const IStatus CANCEL_STATUS;
-
-    static this(){
-        OK_STATUS = new Status(OK, IRuntimeConstants.PI_RUNTIME, OK, LocalizationUtils.safeLocalize("ok"), null); //$NON-NLS-1$
-        CANCEL_STATUS = new Status(CANCEL, IRuntimeConstants.PI_RUNTIME, 1, "", null); //$NON-NLS-1$
-    }
-
+    public static final IStatus CANCEL_STATUS = new Status(CANCEL, IRuntimeConstants.PI_RUNTIME, 1, "", null); //$NON-NLS-1$
     /**
      * The severity. One of
      * <ul>
@@ -72,25 +67,25 @@
 
     /** Wrapped exception, or <code>null</code> if none.
      */
-    private Exception exception = null;
+    private Throwable exception = null;
 
     /** Constant to avoid generating garbage.
      */
-    private static const IStatus[] theEmptyStatusArray = null;
+    private static final IStatus[] theEmptyStatusArray = new IStatus[0];
 
     /**
      * Creates a new status object.  The created status has no children.
      *
-     * @param severity the severity; one of <code>OK</code>, <code>ERROR</code>,
+     * @param severity the severity; one of <code>OK</code>, <code>ERROR</code>, 
      * <code>INFO</code>, <code>WARNING</code>,  or <code>CANCEL</code>
      * @param pluginId the unique identifier of the relevant plug-in
      * @param code the plug-in-specific status code, or <code>OK</code>
      * @param message a human-readable message, localized to the
      *    current locale
      * @param exception a low-level exception, or <code>null</code> if not
-     *    applicable
+     *    applicable 
      */
-    public this(int severity, String pluginId, int code, String message, Exception exception) {
+    public this(int severity, String pluginId, int code, String message, Throwable exception) {
         setSeverity(severity);
         setPlugin(pluginId);
         setCode(code);
@@ -102,41 +97,41 @@
      * Simplified constructor of a new status object; assumes that code is <code>OK</code>.
      * The created status has no children.
      *
-     * @param severity the severity; one of <code>OK</code>, <code>ERROR</code>,
+     * @param severity the severity; one of <code>OK</code>, <code>ERROR</code>, 
      * <code>INFO</code>, <code>WARNING</code>,  or <code>CANCEL</code>
      * @param pluginId the unique identifier of the relevant plug-in
      * @param message a human-readable message, localized to the
      *    current locale
      * @param exception a low-level exception, or <code>null</code> if not
      *    applicable
-     *
+     *     
      * @since org.eclipse.equinox.common 3.3
      */
-    public this(int severity, String pluginId, String message, Exception exception) {
+    public this(int severity, String pluginId, String message, Throwable exception) {
         setSeverity(severity);
         setPlugin(pluginId);
         setMessage(message);
         setException(exception);
-        setCode(OK);
+        setCodecast(OK);
     }
 
     /**
      * Simplified constructor of a new status object; assumes that code is <code>OK</code> and
      * exception is <code>null</code>. The created status has no children.
      *
-     * @param severity the severity; one of <code>OK</code>, <code>ERROR</code>,
+     * @param severity the severity; one of <code>OK</code>, <code>ERROR</code>, 
      * <code>INFO</code>, <code>WARNING</code>,  or <code>CANCEL</code>
      * @param pluginId the unique identifier of the relevant plug-in
      * @param message a human-readable message, localized to the
      *    current locale
-     *
+     *    
      * @since org.eclipse.equinox.common 3.3
      */
     public this(int severity, String pluginId, String message) {
         setSeverity(severity);
         setPlugin(pluginId);
         setMessage(message);
-        setCode(OK);
+        setCodecast(OK);
         setException(null);
     }
 
@@ -157,7 +152,7 @@
     /* (Intentionally not javadoc'd)
      * Implements the corresponding method on <code>IStatus</code>.
      */
-    public Exception getException() {
+    public Throwable getException() {
         return exception;
     }
 
@@ -216,9 +211,9 @@
      * Sets the exception.
      *
      * @param exception a low-level exception, or <code>null</code> if not
-     *    applicable
+     *    applicable 
      */
-    protected void setException(Exception exception) {
+    protected void setException(Throwable exception) {
         this.exception = exception;
     }
 
@@ -242,14 +237,14 @@
      * @param pluginId the unique identifier of the relevant plug-in
      */
     protected void setPlugin(String pluginId) {
-        Assert.isLegal(pluginId !is null && pluginId.length > 0);
+        Assert.isLegal(pluginId !is null && pluginId.length() > 0);
         this.pluginId = pluginId;
     }
 
     /**
      * Sets the severity.
      *
-     * @param severity the severity; one of <code>OK</code>, <code>ERROR</code>,
+     * @param severity the severity; one of <code>OK</code>, <code>ERROR</code>, 
      * <code>INFO</code>, <code>WARNING</code>,  or <code>CANCEL</code>
      */
     protected void setSeverity(int severity) {
@@ -258,24 +253,34 @@
     }
 
     /**
-     * Returns a string representation of the status, suitable
+     * Returns a string representation of the status, suitable 
      * for debugging purposes only.
      */
-    public override String toString() {
-        String sev;
+    public String toString() {
+        StringBuffer buf = new StringBuffer();
+        buf.append("Status "); //$NON-NLS-1$
         if (severity is OK) {
-            sev="OK"; //$NON-NLS-1$
+            buf.append("OK"); //$NON-NLS-1$
         } else if (severity is ERROR) {
-            sev="ERROR"; //$NON-NLS-1$
+            buf.append("ERROR"); //$NON-NLS-1$
         } else if (severity is WARNING) {
-            sev="WARNING"; //$NON-NLS-1$
+            buf.append("WARNING"); //$NON-NLS-1$
         } else if (severity is INFO) {
-            sev="INFO"; //$NON-NLS-1$
+            buf.append("INFO"); //$NON-NLS-1$
         } else if (severity is CANCEL) {
-            sev="CANCEL"; //$NON-NLS-1$
+            buf.append("CANCEL"); //$NON-NLS-1$
         } else {
-            sev=Format( "severity={}", severity);
+            buf.append("severity="); //$NON-NLS-1$
+            buf.append(severity);
         }
-        return Format("Status {}: {} code={} {} {}", sev, pluginId, code, message, exception.toString );
+        buf.append(": "); //$NON-NLS-1$
+        buf.append(pluginId);
+        buf.append(" code="); //$NON-NLS-1$
+        buf.append(code);
+        buf.append(' ');
+        buf.append(message);
+        buf.append(' ');
+        buf.append(exception);
+        return buf.toString();
     }
 }
--- a/org.eclipse.equinox.common/src/org/eclipse/core/runtime/SubMonitor.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.equinox.common/src/org/eclipse/core/runtime/SubMonitor.d	Sun Nov 08 12:42:30 2009 +0100
@@ -4,52 +4,52 @@
  * 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:
  *     Stefan Xenos - initial API and implementation
- *     Stefan Xenos - bug 174539 - add a 1-argument convert(...) method
+ *     Stefan Xenos - bug 174539 - add a 1-argument convert(...) method     
  *     Stefan Xenos - bug 174040 - SubMonitor#convert doesn't always set task name
  *     Stefan Xenos - bug 206942 - updated javadoc to recommend better constants for infinite progress
- * Port to the D programming language:
- *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
-module org.eclipse.core.runtime.SubMonitor;
-
-import org.eclipse.core.runtime.IProgressMonitorWithBlocking;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
+module org.eclipse.core.runtimeSubMonitor;
 
 import java.lang.all;
 
+import org.eclipse.core.runtimeIProgressMonitorWithBlocking; // packageimport
+import org.eclipse.core.runtimeIProgressMonitor; // packageimport
+import org.eclipse.core.runtimeIStatus; // packageimport
+import org.eclipse.core.runtimeNullProgressMonitor; // packageimport
+
 /**
- * <p>A progress monitor that uses a given amount of work ticks from a parent monitor. This is intended as a
- * safer, easier-to-use alternative to SubProgressMonitor. The main benefits of SubMonitor over
+ * <p>A progress monitor that uses a given amount of work ticks from a parent monitor. This is intended as a 
+ * safer, easier-to-use alternative to SubProgressMonitor. The main benefits of SubMonitor over 
  * SubProgressMonitor are:</p>
  * <ul>
  * <li>It is not necessary to call beginTask() or done() on an instance of SubMonitor.</li>
  * <li>SubMonitor has a simpler syntax for creating nested monitors.</li>
- * <li>SubMonitor is more efficient for deep recursion chains.</li>
- * <li>SubMonitor has a setWorkRemining method that allows the remaining space on the monitor to be
+ * <li>SubMonitor is more efficient for deep recursion chains.</li>      
+ * <li>SubMonitor has a setWorkRemining method that allows the remaining space on the monitor to be 
  * redistributed without reporting any work.</li>
- * <li>SubMonitor protects the caller from common progress reporting bugs in a called method. For example,
- * if a called method fails to call done() on the given monitor or fails to consume all the ticks on
- * the given monitor, the parent will correct the problem after the method returns.</li>
+ * <li>SubMonitor protects the caller from common progress reporting bugs in a called method. For example, 
+ * if a called method fails to call done() on the given monitor or fails to consume all the ticks on 
+ * the given monitor, the parent will correct the problem after the method returns.</li>  
  * </ul>
  * <p></p>
  * <p><b>USAGE:</b></p>
- *
+ * 
  * <p>When implementing a method that accepts an IProgressMonitor:</p>
  * <ul>
- * <li>At the start of your method, use <code>SubMonitor.convert(...).</code> to convert the IProgressMonitor
+ * <li>At the start of your method, use <code>SubMonitor.convert(...).</code> to convert the IProgressMonitor 
  * into a SubMonitor. </li>
- * <li>Use <code>SubMonitor.newChild(...)</code> whenever you need to call another method that
+ * <li>Use <code>SubMonitor.newChild(...)</code> whenever you need to call another method that 
  * accepts an IProgressMonitor.</li>
  * </ul>
  * <p></p>
  * <p><b>DEFAULT BEHAVIOR:</b></p>
- *
- * <p>When writing JavaDoc for a method that accepts an IProgressMonitor, you should assume the
+ * 
+ * <p>When writing JavaDoc for a method that accepts an IProgressMonitor, you should assume the 
  * following default behavior unless the method's JavaDoc says otherwise:</p>
  * <ul>
  * <li>It WILL call beginTask on the IProgressMonitor.</li>
@@ -58,7 +58,7 @@
  * </ul>
  * <p></p>
  * <p><b>BEST PRACTISES:</b></p>
- *
+ * 
  * <p>We recommend that newly-written methods follow the given contract:</p>
  * <ul>
  * <li>It WILL call beginTask on the IProgressMonitor.</li>
@@ -66,7 +66,7 @@
  * <li>It WILL NOT call done on the IProgressMonitor, leaving this responsibility up to the caller.</li>
  * </ul>
  * <p>If you wish to follow these conventions, you may copy and paste the following text into your method's JavaDoc:</p>
- *
+ * 
  * <pre>@param monitor the progress monitor to use for reporting progress to the user. It is the caller's responsibility
  *        to call done() on the given monitor. Accepts <code>null</code>, indicating that no progress should be
  *        reported and that the operation cannot be cancelled.</pre>
@@ -76,121 +76,121 @@
  *
  * <p>This example demonstrates how the recommended usage of <code>SubMonitor</code> makes it unnecessary to call
  * IProgressMonitor.done() in most situations.</p>
- *
- * <p>It is never necessary to call done() on a monitor obtained from <code>convert</code> or <code>progress.newChild()</code>.
- * In this example, there is no guarantee that <code>monitor</code> is an instance of <code>SubMonitor</code>, making it
- * necessary to call <code>monitor.done()</code>. The JavaDoc contract makes this the responsibility of the caller.</p>
- *
+ * 
+ * <p>It is never necessary to call done() on a monitor obtained from <code>convert</code> or <code>progress.newChild()</code>. 
+ * In this example, there is no guarantee that <code>monitor</code> is an instance of <code>SubMonitor</code>, making it 
+ * necessary to call <code>monitor.done()</code>. The JavaDoc contract makes this the responsibility of the caller.</p> 
+ * 
  * <pre>
  *      // param monitor the progress monitor to use for reporting progress to the user. It is the caller's responsibility
  *      //        to call done() on the given monitor. Accepts <code>null</code>, indicating that no progress should be
  *      //        reported and that the operation cannot be cancelled.
  *      //
  *      void doSomething(IProgressMonitor monitor) {
- *          // Convert the given monitor into a progress instance
+ *      	// Convert the given monitor into a progress instance 
  *          SubMonitor progress = SubMonitor.convert(monitor, 100);
- *
+ *              
  *          // Use 30% of the progress to do some work
  *          doSomeWork(progress.newChild(30));
- *
+ *          
  *          // Advance the monitor by another 30%
  *          progress.worked(30);
- *
+ *          
  *          // Use the remaining 40% of the progress to do some more work
- *          doSomeWork(progress.newChild(40));
+ *          doSomeWork(progress.newChild(40)); 
  *      }
  * </pre>
  *
  *
  * <p></p>
  * <p><b>Example: Default usage</b></p>
- *
+ * 
  * <p>You will often need to implement a method that does not explicitly stipulate that calling done() is the responsibility
  * of the caller. In this case, you should use the following pattern:</p>
- *
+ * 
  * <pre>
  *      // param monitor the progress monitor to use for reporting progress to the user, or <code>null</code> indicating
  *      //        that no progress should be reported and the operation cannot be cancelled.
  *      //
  *      void doSomething(IProgressMonitor monitor) {
- *          // Convert the given monitor into a progress instance
+ *          // Convert the given monitor into a progress instance 
  *          SubMonitor progress = SubMonitor.convert(monitor, 100);
  *          try {
  *              // Use 30% of the progress to do some work
  *              doSomeWork(progress.newChild(30));
- *
+ *          
  *              // Advance the monitor by another 30%
  *              progress.worked(30);
- *
+ *          
  *              // Use the remaining 40% of the progress to do some more work
  *              doSomeWork(progress.newChild(40));
- *
+ *                            
  *          } finally {
- *              if (monitor !is null) {
- *                  monitor.done();
+ *              if (monitor != null) {
+ *              	monitor.done();
  *              }
- *          }
+ *          } 
  *      }
  * </pre>
- *
+ * 
  * <p></p>
  * <p><b>Example: Branches</b></p>
  *
  * <p>This example demonstrates how to smoothly report progress in situations where some of the work is optional.</p>
- *
+ * 
  * <pre>
  *      void doSomething(IProgressMonitor monitor) {
  *          SubMonitor progress = SubMonitor.convert(monitor, 100);
- *
+ *           
  *          if (condition) {
  *              // Use 50% of the progress to do some work
- *              doSomeWork(progress.newChild(50));
+ *          	doSomeWork(progress.newChild(50));
  *          }
- *
+ *          
  *          // Don't report any work, but ensure that we have 50 ticks remaining on the progress monitor.
  *          // If we already consumed 50 ticks in the above branch, this is a no-op. Otherwise, the remaining
  *          // space in the monitor is redistributed into 50 ticks.
- *
+ *          
  *          progress.setWorkRemaining(50);
- *
+ *          
  *          // Use the remainder of the progress monitor to do the rest of the work
- *          doSomeWork(progress.newChild(50));
+ *          doSomeWork(progress.newChild(50)); 
  *      }
  * </pre>
- *
+ * 
  * <p>Please beware of the following anti-pattern:</p>
  *
  * <pre>
  *          if (condition) {
  *              // Use 50% of the progress to do some work
- *              doSomeWork(progress.newChild(50));
+ *          	doSomeWork(progress.newChild(50));
  *          } else {
  *              // Bad: Causes the progress monitor to appear to start at 50%, wasting half of the
  *              // space in the monitor.
  *              progress.worked(50);
  *          }
  * </pre>
- *
- *
+ * 
+ * 
  * <p></p>
  * <p><b>Example: Loops</b></p>
  *
- * <p>This example demonstrates how to report progress in a loop.</p>
- *
+ * <p>This example demonstrates how to report progress in a loop.</p> 
+ * 
  * <pre>
  *      void doSomething(IProgressMonitor monitor, Collection someCollection) {
  *          SubMonitor progress = SubMonitor.convert(monitor, 100);
  *
  *          // Create a new progress monitor that uses 70% of the total progress and will allocate one tick
- *          // for each element of the given collection.
+ *          // for each element of the given collection. 
  *          SubMonitor loopProgress = progress.newChild(70).setWorkRemaining(someCollection.size());
- *
+ *          
  *          for (Iterator iter = someCollection.iterator(); iter.hasNext();) {
- *              Object next = iter.next();
- *
+ *          	Object next = iter.next();
+ *              
  *              doWorkOnElement(next, loopProgress.newChild(1));
  *          }
- *
+ *          
  *          // Use the remaining 30% of the progress monitor to do some work outside the loop
  *          doSomeWork(progress.newChild(30));
  *      }
@@ -199,30 +199,30 @@
  *
  * <p></p>
  * <p><b>Example: Infinite progress</b></p>
- *
+ * 
  * <p>This example demonstrates how to report logarithmic progress in situations where the number of ticks
  * cannot be easily computed in advance.</p>
- *
+ * 
  * <pre>
  *      void doSomething(IProgressMonitor monitor, LinkedListNode node) {
  *          SubMonitor progress = SubMonitor.convert(monitor);
  *
- *          while (node !is null) {
+ *			while (node !is null) {
  *              // Regardless of the amount of progress reported so far,
  *              // use 0.01% of the space remaining in the monitor to process the next node.
  *              progress.setWorkRemaining(10000);
- *
- *              doWorkOnElement(node, progress.newChild(1));
+ *              
+ *				doWorkOnElement(node, progress.newChild(1));
  *
  *              node = node.next;
  *          }
  *      }
- * </pre>
- *
+ * </pre>  
+ * 
  * <p>
  * This class can be used without OSGi running.
  * </p>
- *
+ * 
  * @since org.eclipse.equinox.common 3.3
  */
 public final class SubMonitor : IProgressMonitorWithBlocking {
@@ -251,12 +251,12 @@
          * Remembers the last subtask name. Prevents the SubMonitor from setting the same
          * subtask string more than once in a row.
          */
-        private String subTask_ = null;
+        private String subTask = null;
 
         /**
-         * Creates a RootInfo struct that delegates to the given progress
-         * monitor.
-         *
+         * Creates a RootInfo struct that delegates to the given progress 
+         * monitor. 
+         * 
          * @param root progress monitor to delegate to
          */
         public this(IProgressMonitor root) {
@@ -280,11 +280,11 @@
         }
 
         public void subTask(String name) {
-            if (eq(subTask_, name)) {
+            if (eq(subTask, name)) {
                 return;
             }
 
-            this.subTask_ = name;
+            this.subTask = name;
             root.subTask(name);
         }
 
@@ -293,13 +293,13 @@
         }
 
         public void clearBlocked() {
-            if ( auto mon = cast(IProgressMonitorWithBlocking)root )
-                mon.clearBlocked();
+            if ( null !is cast(IProgressMonitorWithBlocking)root )
+                (cast(IProgressMonitorWithBlocking) root).clearBlocked();
         }
 
         public void setBlocked(IStatus reason) {
-            if ( auto mon = cast(IProgressMonitorWithBlocking)root )
-                mon.setBlocked(reason);
+            if ( null !is cast(IProgressMonitorWithBlocking)root )
+                (cast(IProgressMonitorWithBlocking) root).setBlocked(reason);
         }
 
     }
@@ -322,13 +322,13 @@
 
     /**
      * Number of ticks allocated for this instance's children. This is the total number
-     * of ticks that may be passed into worked(int) or newChild(int).
+     * of ticks that may be passed into worked(int) or newChild(int). 
      */
     private int totalForChildren;
 
     /**
      * Children created by newChild will be completed automatically the next time
-     * the parent progress monitor is touched. This points to the last incomplete child
+     * the parent progress monitor is touched. This points to the last incomplete child 
      * created with newChild.
      */
     private IProgressMonitor lastSubMonitor = null;
@@ -336,12 +336,12 @@
     /**
      * Used to communicate with the root of this progress monitor tree
      */
-    private const RootInfo root;
+    private final RootInfo root;
 
     /**
      * A bitwise combination of the SUPPRESS_* flags.
      */
-    private const int flags;
+    private final int flags;
 
     /**
      * May be passed as a flag to newChild. Indicates that the calls
@@ -349,38 +349,38 @@
      * calling subTask on the child will result in a call to subTask
      * on its parent.
      */
-    public static const int SUPPRESS_SUBTASK = 0x0001;
+    public static final int SUPPRESS_SUBTASK = 0x0001;
 
     /**
      * May be passed as a flag to newChild. Indicates that strings
      * passed into beginTask should be ignored. If this flag is
-     * specified, then the progress monitor instance will accept null
-     * as the first argument to beginTask. Without this flag, any
+     * specified, then the progress monitor instance will accept null 
+     * as the first argument to beginTask. Without this flag, any 
      * string passed to beginTask will result in a call to
      * setTaskName on the parent.
      */
-    public static const int SUPPRESS_BEGINTASK = 0x0002;
+    public static final int SUPPRESS_BEGINTASK = 0x0002;
 
     /**
      * May be passed as a flag to newChild. Indicates that strings
      * passed into setTaskName should be ignored. If this string
-     * is omitted, then a call to setTaskName on the child will
+     * is omitted, then a call to setTaskName on the child will 
      * result in a call to setTaskName on the parent.
      */
-    public static const int SUPPRESS_SETTASKNAME = 0x0004;
+    public static final int SUPPRESS_SETTASKNAME = 0x0004;
 
     /**
      * May be passed as a flag to newChild. Indicates that strings
      * passed to setTaskName, subTask, and beginTask should all be ignored.
      */
-    public static const int SUPPRESS_ALL_LABELS = SUPPRESS_SETTASKNAME | SUPPRESS_BEGINTASK | SUPPRESS_SUBTASK;
+    public static final int SUPPRESS_ALL_LABELS = SUPPRESS_SETTASKNAME | SUPPRESS_BEGINTASK | SUPPRESS_SUBTASK;
 
     /**
      * May be passed as a flag to newChild. Indicates that strings
      * passed to setTaskName, subTask, and beginTask should all be propogated
      * to the parent.
      */
-    public static const int SUPPRESS_NONE = 0;
+    public static final int SUPPRESS_NONE = 0;
 
     /**
      * Creates a new SubMonitor that will report its progress via
@@ -398,13 +398,13 @@
     }
 
     /**
-     * <p>Converts an unknown (possibly null) IProgressMonitor into a SubMonitor. It is
-     * not necessary to call done() on the result, but the caller is responsible for calling
+     * <p>Converts an unknown (possibly null) IProgressMonitor into a SubMonitor. It is 
+     * not necessary to call done() on the result, but the caller is responsible for calling 
      * done() on the argument. Calls beginTask on the argument.</p>
-     *
+     * 
      * <p>This method should generally be called at the beginning of a method that accepts
-     * an IProgressMonitor in order to convert the IProgressMonitor into a SubMonitor.</p>
-     *
+     * an IProgressMonitor in order to convert the IProgressMonitor into a SubMonitor.</p> 
+     * 
      * @param monitor monitor to convert to a SubMonitor instance or null. Treats null
      * as a new instance of <code>NullProgressMonitor</code>.
      * @return a SubMonitor instance that adapts the argument
@@ -418,10 +418,10 @@
      * with the given number of ticks. It is not necessary to call done() on the result,
      * but the caller is responsible for calling done() on the argument. Calls beginTask
      * on the argument.</p>
-     *
+     * 
      * <p>This method should generally be called at the beginning of a method that accepts
-     * an IProgressMonitor in order to convert the IProgressMonitor into a SubMonitor.</p>
-     *
+     * an IProgressMonitor in order to convert the IProgressMonitor into a SubMonitor.</p> 
+     * 
      * @param monitor monitor to convert to a SubMonitor instance or null. Treats null
      * as a new instance of <code>NullProgressMonitor</code>.
      * @param work number of ticks that will be available in the resulting monitor
@@ -436,13 +436,13 @@
      * with the given number of ticks. It is not necessary to call done() on the result,
      * but the caller is responsible for calling done() on the argument. Calls beginTask
      * on the argument.</p>
-     *
+     * 
      * <p>This method should generally be called at the beginning of a method that accepts
-     * an IProgressMonitor in order to convert the IProgressMonitor into a SubMonitor.</p>
-     *
+     * an IProgressMonitor in order to convert the IProgressMonitor into a SubMonitor.</p> 
+     *  
      * @param monitor to convert into a SubMonitor instance or null. If given a null argument,
      * the resulting SubMonitor will not report its progress anywhere.
-     * @param taskName user readable name to pass to monitor.beginTask. Never null.
+     * @param taskName user readable name to pass to monitor.beginTask. Never null. 
      * @param work initial number of ticks to allocate for children of the SubMonitor
      * @return a new SubMonitor instance that is a child of the given monitor
      */
@@ -451,7 +451,7 @@
             monitor = new NullProgressMonitor();
 
         // Optimization: if the given monitor already a SubMonitor, no conversion is necessary
-        if ( cast(SubMonitor) monitor ) {
+        if ( null !is cast(SubMonitor)monitor ) {
             monitor.beginTask(taskName, work);
             return cast(SubMonitor) monitor;
         }
@@ -463,14 +463,14 @@
     /**
      * <p>Sets the work remaining for this SubMonitor instance. This is the total number
      * of ticks that may be reported by all subsequent calls to worked(int), newChild(int), etc.
-     * This may be called many times for the same SubMonitor instance. When this method
-     * is called, the remaining space on the progress monitor is redistributed into the given
+     * This may be called many times for the same SubMonitor instance. When this method 
+     * is called, the remaining space on the progress monitor is redistributed into the given 
      * number of ticks.</p>
-     *
+     * 
      * <p>It doesn't matter how much progress has already been reported with this SubMonitor
-     * instance. If you call setWorkRemaining(100), you will be able to report 100 more ticks of
+     * instance. If you call setWorkRemaining(100), you will be able to report 100 more ticks of 
      * work before the progress meter reaches 100%.</p>
-     *
+     * 
      * @param workRemaining total number of remaining ticks
      * @return the receiver
      */
@@ -481,10 +481,10 @@
         // Ensure we don't cause division by zero
         if (totalForChildren > 0 && totalParent > usedForParent) {
             // Note: We want the following value to remain invariant after this method returns
-            double remainForParent = totalParent * (1.0 - (usedForChildren / totalForChildren));
-            usedForChildren = (workRemaining * (1.0 - remainForParent / (totalParent - usedForParent)));
+            double remainForParent = totalParent * (1.0d - (usedForChildren / totalForChildren));
+            usedForChildren = (workRemaining * (1.0d - remainForParent / (totalParent - usedForParent)));
         } else
-            usedForChildren = 0.0;
+            usedForChildren = 0.0d;
 
         totalParent = totalParent - usedForParent;
         usedForParent = 0;
@@ -493,9 +493,9 @@
     }
 
     /**
-     * Consumes the given number of child ticks, given as a double. Must only
+     * Consumes the given number of child ticks, given as a double. Must only 
      * be called if the monitor is in floating-point mode.
-     *
+     *  
      * @param ticks the number of ticks to consume
      * @return ticks the number of ticks to be consumed from parent
      */
@@ -535,15 +535,15 @@
     /**
      * Starts a new main task. The string argument is ignored
      * if and only if the SUPPRESS_BEGINTASK flag has been set on this SubMonitor
-     * instance.
-     *
-     * <p>This method is equivalent calling setWorkRemaining(...) on the reciever. Unless
-     * the SUPPRESS_BEGINTASK flag is set, this will also be equivalent to calling
+     * instance. 
+     * 
+     * <p>This method is equivalent calling setWorkRemaining(...) on the reciever. Unless 
+     * the SUPPRESS_BEGINTASK flag is set, this will also be equivalent to calling 
      * setTaskName(...) on the parent.</p>
-     *
+     * 
      * @param name new main task name
      * @param totalWork number of ticks to allocate
-     *
+     * 
      * @see org.eclipse.core.runtime.IProgressMonitor#beginTask(java.lang.String, int)
      */
     public void beginTask(String name, int totalWork) {
@@ -564,7 +564,7 @@
         totalParent = 0;
         usedForParent = 0;
         totalForChildren = 0;
-        usedForChildren = 0.0;
+        usedForChildren = 0.0d;
     }
 
     /* (non-Javadoc)
@@ -573,7 +573,7 @@
     public void internalWorked(double work) {
         cleanupActiveChild();
 
-        int delta = consume((work > 0.0) ? work : 0.0);
+        int delta = consume((work > 0.0d) ? work : 0.0d);
         if (delta !is 0)
             root.worked(delta);
     }
@@ -594,69 +594,69 @@
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.core.runtime.IProgressMonitor#setCanceled(bool)
+     * @see org.eclipse.core.runtime.IProgressMonitor#setCanceled(boolean)
      */
     public void setCanceled(bool b) {
         root.setCanceled(b);
     }
 
     /**
-     * <p>Creates a sub progress monitor that will consume the given number of ticks from the
+     * <p>Creates a sub progress monitor that will consume the given number of ticks from the 
      * receiver. It is not necessary to call <code>beginTask</code> or <code>done</code> on the
-     * result. However, the resulting progress monitor will not report any work after the first
+     * result. However, the resulting progress monitor will not report any work after the first 
      * call to done() or before ticks are allocated. Ticks may be allocated by calling beginTask
      * or setWorkRemaining.</p>
-     *
+     * 
      * <p>Each SubMonitor only has one active child at a time. Each time newChild() is called, the
      * result becomes the new active child and any unused progress from the previously-active child is
      * consumed.</p>
-     *
+     * 
      * <p>This is property makes it unnecessary to call done() on a SubMonitor instance, since child
-     * monitors are automatically cleaned up the next time the parent is touched.</p>
-     *
-     * <code><pre>
+     * monitors are automatically cleaned up the next time the parent is touched.</p> 
+     * 
+     * <code><pre> 
      *      ////////////////////////////////////////////////////////////////////////////
      *      // Example 1: Typical usage of newChild
      *      void myMethod(IProgressMonitor parent) {
-     *          SubMonitor progress = SubMonitor.convert(parent, 100);
+     *          SubMonitor progress = SubMonitor.convert(parent, 100); 
      *          doSomething(progress.newChild(50));
      *          doSomethingElse(progress.newChild(50));
      *      }
-     *
+     *      
      *      ////////////////////////////////////////////////////////////////////////////
      *      // Example 2: Demonstrates the function of active children. Creating children
      *      // is sufficient to smoothly report progress, even if worked(...) and done()
      *      // are never called.
      *      void myMethod(IProgressMonitor parent) {
      *          SubMonitor progress = SubMonitor.convert(parent, 100);
-     *
+     *          
      *          for (int i = 0; i < 100; i++) {
      *              // Creating the next child monitor will clean up the previous one,
      *              // causing progress to be reported smoothly even if we don't do anything
      *              // with the monitors we create
-     *              progress.newChild(1);
+     *          	progress.newChild(1);
      *          }
      *      }
-     *
+     *      
      *      ////////////////////////////////////////////////////////////////////////////
      *      // Example 3: Demonstrates a common anti-pattern
      *      void wrongMethod(IProgressMonitor parent) {
      *          SubMonitor progress = SubMonitor.convert(parent, 100);
-     *
+     *          
      *          // WRONG WAY: Won't have the intended effect, as only one of these progress
      *          // monitors may be active at a time and the other will report no progress.
      *          callMethod(progress.newChild(50), computeValue(progress.newChild(50)));
      *      }
-     *
+     *      
      *      void rightMethod(IProgressMonitor parent) {
      *          SubMonitor progress = SubMonitor.convert(parent, 100);
-     *
+     *          
      *          // RIGHT WAY: Break up method calls so that only one SubMonitor is in use at a time.
      *          Object someValue = computeValue(progress.newChild(50));
      *          callMethod(progress.newChild(50), someValue);
      *      }
      * </pre></code>
-     *
+     * 
      * @param totalWork number of ticks to consume from the reciever
      * @return new sub progress monitor that may be used in place of a new SubMonitor
      */
@@ -665,75 +665,75 @@
     }
 
     /**
-     * <p>Creates a sub progress monitor that will consume the given number of ticks from the
+     * <p>Creates a sub progress monitor that will consume the given number of ticks from the 
      * receiver. It is not necessary to call <code>beginTask</code> or <code>done</code> on the
-     * result. However, the resulting progress monitor will not report any work after the first
+     * result. However, the resulting progress monitor will not report any work after the first 
      * call to done() or before ticks are allocated. Ticks may be allocated by calling beginTask
      * or setWorkRemaining.</p>
-     *
+     * 
      * <p>Each SubMonitor only has one active child at a time. Each time newChild() is called, the
      * result becomes the new active child and any unused progress from the previously-active child is
      * consumed.</p>
-     *
+     * 
      * <p>This is property makes it unnecessary to call done() on a SubMonitor instance, since child
-     * monitors are automatically cleaned up the next time the parent is touched.</p>
-     *
-     * <code><pre>
+     * monitors are automatically cleaned up the next time the parent is touched.</p> 
+     * 
+     * <code><pre> 
      *      ////////////////////////////////////////////////////////////////////////////
      *      // Example 1: Typical usage of newChild
      *      void myMethod(IProgressMonitor parent) {
-     *          SubMonitor progress = SubMonitor.convert(parent, 100);
+     *          SubMonitor progress = SubMonitor.convert(parent, 100); 
      *          doSomething(progress.newChild(50));
      *          doSomethingElse(progress.newChild(50));
      *      }
-     *
+     *      
      *      ////////////////////////////////////////////////////////////////////////////
      *      // Example 2: Demonstrates the function of active children. Creating children
      *      // is sufficient to smoothly report progress, even if worked(...) and done()
      *      // are never called.
      *      void myMethod(IProgressMonitor parent) {
      *          SubMonitor progress = SubMonitor.convert(parent, 100);
-     *
+     *          
      *          for (int i = 0; i < 100; i++) {
      *              // Creating the next child monitor will clean up the previous one,
      *              // causing progress to be reported smoothly even if we don't do anything
      *              // with the monitors we create
-     *              progress.newChild(1);
+     *          	progress.newChild(1);
      *          }
      *      }
-     *
+     *      
      *      ////////////////////////////////////////////////////////////////////////////
      *      // Example 3: Demonstrates a common anti-pattern
      *      void wrongMethod(IProgressMonitor parent) {
      *          SubMonitor progress = SubMonitor.convert(parent, 100);
-     *
+     *          
      *          // WRONG WAY: Won't have the intended effect, as only one of these progress
      *          // monitors may be active at a time and the other will report no progress.
      *          callMethod(progress.newChild(50), computeValue(progress.newChild(50)));
      *      }
-     *
+     *      
      *      void rightMethod(IProgressMonitor parent) {
      *          SubMonitor progress = SubMonitor.convert(parent, 100);
-     *
+     *          
      *          // RIGHT WAY: Break up method calls so that only one SubMonitor is in use at a time.
      *          Object someValue = computeValue(progress.newChild(50));
      *          callMethod(progress.newChild(50), someValue);
      *      }
      * </pre></code>
-     *
+     * 
      * @param totalWork number of ticks to consume from the reciever
      * @return new sub progress monitor that may be used in place of a new SubMonitor
      */
     public SubMonitor newChild(int totalWork, int suppressFlags) {
-        double totalWorkDouble = (totalWork > 0) ? totalWork : 0.0;
+        double totalWorkDouble = (totalWork > 0) ? totalWork : 0.0d;
         totalWorkDouble = Math.min(totalWorkDouble, totalForChildren - usedForChildren);
         cleanupActiveChild();
 
         // Compute the flags for the child. We want the net effect to be as though the child is
         // delegating to its parent, even though it is actually talking directly to the root.
-        // This means that we need to compute the flags such that - even if a label isn't
+        // This means that we need to compute the flags such that - even if a label isn't 
         // suppressed by the child - if that same label would have been suppressed when the
-        // child delegated to its parent, the child must explicitly suppress the label.
+        // child delegated to its parent, the child must explicitly suppress the label. 
         int childFlags = SUPPRESS_NONE;
 
         if ((flags & SUPPRESS_SETTASKNAME) !is 0) {
@@ -780,11 +780,11 @@
         root.setBlocked(reason);
     }
 
-    protected static bool eq(String o1, String o2) {
-        if (o1.length is 0)
-            return (o2.length is 0);
-        if (o2.length is 0)
+    protected static bool eq(Object o1, Object o2) {
+        if (o1 is null)
+            return (o2 is null);
+        if (o2 is null)
             return false;
-        return o1.equals(o2);
+        return o1.opEquals(o2);
     }
 }
--- a/org.eclipse.equinox.common/src/org/eclipse/core/runtime/SubProgressMonitor.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.equinox.common/src/org/eclipse/core/runtime/SubProgressMonitor.d	Sun Nov 08 12:42:30 2009 +0100
@@ -4,22 +4,22 @@
  * 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:
  *     IBM Corporation - initial API and implementation
- * Port to the D programming language:
- *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
-module org.eclipse.core.runtime.SubProgressMonitor;
-
-import org.eclipse.core.runtime.ProgressMonitorWrapper;
-import org.eclipse.core.runtime.IProgressMonitor;
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
+module org.eclipse.core.runtimeSubProgressMonitor;
 
 import java.lang.all;
 
+import org.eclipse.core.runtimeIProgressMonitor; // packageimport
+import org.eclipse.core.runtimeProgressMonitorWrapper; // packageimport
+
 /**
  * For new implementations consider using {@link SubMonitor}.
- *
+ * 
  * A progress monitor that uses a given amount of work ticks
  * from a parent monitor. It can be used as follows:
  * <pre>
@@ -43,7 +43,7 @@
  * </p><p>
  * This class may be instantiated or subclassed by clients.
  * </p>
- *
+ * 
  * @see SubMonitor
  */
 public class SubProgressMonitor : ProgressMonitorWrapper {
@@ -54,14 +54,14 @@
      *
      * @see #SubProgressMonitor(IProgressMonitor,int,int)
      */
-    public static const int SUPPRESS_SUBTASK_LABEL = 1 << 1;
+    public static final int SUPPRESS_SUBTASK_LABEL = 1 << 1;
     /**
-     * Style constant indicating that the main task label
+     * Style constant indicating that the main task label 
      * should be prepended to the subtask label.
      *
      * @see #SubProgressMonitor(IProgressMonitor,int,int)
      */
-    public static const int PREPEND_MAIN_LABEL_TO_SUBTASK = 1 << 2;
+    public static final int PREPEND_MAIN_LABEL_TO_SUBTASK = 1 << 2;
 
     private int parentTicks = 0;
     private double sentToParent = 0.0;
@@ -73,8 +73,8 @@
     private String mainTaskLabel;
 
     /**
-     * Creates a new sub-progress monitor for the given monitor. The sub
-     * progress monitor uses the given number of work ticks from its
+     * Creates a new sub-progress monitor for the given monitor. The sub 
+     * progress monitor uses the given number of work ticks from its 
      * parent monitor.
      *
      * @param monitor the parent progress monitor
@@ -86,8 +86,8 @@
     }
 
     /**
-     * Creates a new sub-progress monitor for the given monitor. The sub
-     * progress monitor uses the given number of work ticks from its
+     * Creates a new sub-progress monitor for the given monitor. The sub 
+     * progress monitor uses the given number of work ticks from its 
      * parent monitor.
      *
      * @param monitor the parent progress monitor
@@ -112,20 +112,20 @@
      *
      * Starts a new main task. Since this progress monitor is a sub
      * progress monitor, the given name will NOT be used to update
-     * the progress bar's main task label. That means the given
+     * the progress bar's main task label. That means the given 
      * string will be ignored. If style <code>PREPEND_MAIN_LABEL_TO_SUBTASK
      * <code> is specified, then the given string will be prepended to
      * every string passed to <code>subTask(String)</code>.
      */
-    public override void beginTask(String name, int totalWork) {
+    public void beginTask(String name, int totalWork) {
         nestedBeginTasks++;
         // Ignore nested begin task calls.
         if (nestedBeginTasks > 1) {
             return;
         }
-        // be safe:  if the argument would cause math errors (zero or
+        // be safe:  if the argument would cause math errors (zero or 
         // negative), just use 0 as the scale.  This disables progress for
-        // this submonitor.
+        // this submonitor. 
         scale = totalWork <= 0 ? 0 : cast(double) parentTicks / cast(double) totalWork;
         if ((style & PREPEND_MAIN_LABEL_TO_SUBTASK) !is 0) {
             mainTaskLabel = name;
@@ -135,7 +135,7 @@
     /* (Intentionally not javadoc'd)
      * Implements the method <code>IProgressMonitor.done</code>.
      */
-    public override void done() {
+    public void done() {
         // Ignore if more done calls than beginTask calls or if we are still
         // in some nested beginTasks
         if (nestedBeginTasks is 0 || --nestedBeginTasks > 0)
@@ -153,12 +153,12 @@
     /* (Intentionally not javadoc'd)
      * Implements the internal method <code>IProgressMonitor.internalWorked</code>.
      */
-    public override void internalWorked(double work) {
+    public void internalWorked(double work) {
         if (usedUp || nestedBeginTasks !is 1) {
             return;
         }
 
-        double realWork = (work > 0.0) ? scale * work : 0.0;
+        double realWork = (work > 0.0d) ? scale * work : 0.0d;
         super.internalWorked(realWork);
         sentToParent += realWork;
         if (sentToParent >= parentTicks) {
@@ -169,14 +169,14 @@
     /* (Intentionally not javadoc'd)
      * Implements the method <code>IProgressMonitor.subTask</code>.
      */
-    public override void subTask(String name) {
+    public void subTask(String name) {
         if ((style & SUPPRESS_SUBTASK_LABEL) !is 0) {
             return;
         }
         hasSubTask = true;
         String label = name;
-        if ((style & PREPEND_MAIN_LABEL_TO_SUBTASK) !is 0 && mainTaskLabel !is null && mainTaskLabel.length > 0) {
-            label = mainTaskLabel ~ ' ' ~ label;
+        if ((style & PREPEND_MAIN_LABEL_TO_SUBTASK) !is 0 && mainTaskLabel !is null && mainTaskLabel.length() > 0) {
+            label = mainTaskLabel + ' ' + label;
         }
         super.subTask(label);
     }
@@ -184,7 +184,7 @@
     /* (Intentionally not javadoc'd)
      * Implements the method <code>IProgressMonitor.worked</code>.
      */
-    public override void worked(int work) {
+    public void worked(int work) {
         internalWorked(work);
     }
 }
--- a/org.eclipse.osgi/osgi/src/org/osgi/framework/Bundle.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.osgi/osgi/src/org/osgi/framework/Bundle.d	Sun Nov 08 12:42:30 2009 +0100
@@ -16,15 +16,21 @@
  * limitations under the License.
  */
 
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
 module org.osgi.framework.Bundle;
 
 import java.lang.all;
 
-// import java.io.IOException;
-// import java.io.InputStream;
-// import java.net.URL;
-// import java.util.Dictionary;
-// import java.util.Enumeration;
+import org.osgi.framework.BundleException; // packageimport
+import org.osgi.framework.ServiceReference; // packageimport
+import org.osgi.framework.BundleContext; // packageimport
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Dictionary;
+import java.util.Enumeration;
 
 /**
  * An installed bundle in the Framework.
@@ -81,7 +87,7 @@
      * <p>
      * The value of <code>UNINSTALLED</code> is 0x00000001.
      */
-    public static const int UNINSTALLED             = 0x00000001;
+    public static final int UNINSTALLED             = 0x00000001;
 
     /**
      * The bundle is installed but not yet resolved.
@@ -97,7 +103,7 @@
      * <p>
      * The value of <code>INSTALLED</code> is 0x00000002.
      */
-    public static const int INSTALLED               = 0x00000002;
+    public static final int INSTALLED               = 0x00000002;
 
     /**
      * The bundle is resolved and is able to be started.
@@ -124,7 +130,7 @@
      * <p>
      * The value of <code>RESOLVED</code> is 0x00000004.
      */
-    public static const int RESOLVED                = 0x00000004;
+    public static final int RESOLVED                = 0x00000004;
 
     /**
      * The bundle is in the process of starting.
@@ -144,7 +150,7 @@
      * <p>
      * The value of <code>STARTING</code> is 0x00000008.
      */
-    public static const int STARTING                = 0x00000008;
+    public static final int STARTING                = 0x00000008;
 
     /**
      * The bundle is in the process of stopping.
@@ -158,7 +164,7 @@
      * <p>
      * The value of <code>STOPPING</code> is 0x00000010.
      */
-    public static const int STOPPING                = 0x00000010;
+    public static final int STOPPING                = 0x00000010;
 
     /**
      * The bundle is now running.
@@ -169,7 +175,7 @@
      * <p>
      * The value of <code>ACTIVE</code> is 0x00000020.
      */
-    public static const int ACTIVE                  = 0x00000020;
+    public static final int ACTIVE                  = 0x00000020;
 
     /**
      * The bundle start operation is transient and the persistent autostart
@@ -184,7 +190,7 @@
      * @since 1.4
      * @see #start(int)
      */
-    public static const int START_TRANSIENT         = 0x00000001;
+    public static final int START_TRANSIENT         = 0x00000001;
 
     /**
      * The bundle start operation must activate the bundle according to the
@@ -200,7 +206,7 @@
      * @see Constants#BUNDLE_ACTIVATIONPOLICY
      * @see #start(int)
      */
-    public static const int START_ACTIVATION_POLICY = 0x00000002;
+    public static final int START_ACTIVATION_POLICY = 0x00000002;
 
     /**
      * The bundle stop is transient and the persistent autostart setting of the
@@ -351,7 +357,7 @@
      *         the Java Runtime Environment supports permissions.
      * @since 1.4
      */
-    public void start(int options);
+    public void start(int options) ;
 
     /**
      * Starts this bundle with no options.
@@ -370,7 +376,7 @@
      *         the Java Runtime Environment supports permissions.
      * @see #start(int)
      */
-    public void start();
+    public void start() ;
 
     /**
      * Stops this bundle.
@@ -448,7 +454,7 @@
      *         the Java Runtime Environment supports permissions.
      * @since 1.4
      */
-    public void stop(int options);
+    public void stop(int options) ;
 
     /**
      * Stops this bundle with no options.
@@ -465,7 +471,7 @@
      *         the Java Runtime Environment supports permissions.
      * @see #start(int)
      */
-    public void stop();
+    public void stop() ;
 
     /**
      * Updates this bundle.
@@ -552,571 +558,571 @@
      * @see #stop()
      * @see #start()
      */
-    public void update();
+    public void update() ;
+
+    /**
+     * Updates this bundle from an <code>InputStream</code>.
+     *
+     * <p>
+     * This method performs all the steps listed in <code>Bundle.update()</code>,
+     * except the new version of this bundle must be read from the supplied
+     * <code>InputStream</code>, rather than a <code>URL</code>.
+     * <p>
+     * This method must always close the <code>InputStream</code> when it is
+     * done, even if an exception is thrown.
+     *
+     * @param in The <code>InputStream</code> from which to read the new
+     *        bundle.
+     * @throws BundleException If the provided stream cannot be read or the
+     *         update fails.
+     * @throws java.lang.IllegalStateException If this bundle has been
+     *         uninstalled or this bundle tries to change its own state.
+     * @throws java.lang.SecurityException If the caller does not have the
+     *         appropriate <code>AdminPermission[this,LIFECYCLE]</code> for
+     *         both the current bundle and the updated bundle, and the Java
+     *         Runtime Environment supports permissions.
+     * @see #update()
+     */
+    public void update(InputStream in_) ;
+
+    /**
+     * Uninstalls this bundle.
+     *
+     * <p>
+     * This method causes the Framework to notify other bundles that this bundle
+     * is being uninstalled, and then puts this bundle into the
+     * <code>UNINSTALLED</code> state. The Framework must remove any resources
+     * related to this bundle that it is able to remove.
+     *
+     * <p>
+     * If this bundle has exported any packages, the Framework must continue to
+     * make these packages available to their importing bundles until the
+     * <code>PackageAdmin.refreshPackages</code> method has been called or the
+     * Framework is relaunched.
+     *
+     * <p>
+     * The following steps are required to uninstall a bundle:
+     * <ol>
+     * <li>If this bundle's state is <code>UNINSTALLED</code> then an
+     * <code>IllegalStateException</code> is thrown.
+     *
+     * <li>If this bundle's state is <code>ACTIVE</code>,
+     * <code>STARTING</code> or <code>STOPPING</code>, this bundle is
+     * stopped as described in the <code>Bundle.stop</code> method. If
+     * <code>Bundle.stop</code> throws an exception, a Framework event of type
+     * {@link FrameworkEvent#ERROR} is fired containing the exception.
+     *
+     * <li>This bundle's state is set to <code>UNINSTALLED</code>.
+     *
+     * <li>A bundle event of type {@link BundleEvent#UNINSTALLED} is fired.
+     *
+     * <li>This bundle and any persistent storage area provided for this bundle
+     * by the Framework are removed.
+     * </ol>
+     *
+     * <b>Preconditions </b>
+     * <ul>
+     * <li><code>getState()</code> not in {<code>UNINSTALLED</code>}.
+     * </ul>
+     * <b>Postconditions, no exceptions thrown </b>
+     * <ul>
+     * <li><code>getState()</code> in {<code>UNINSTALLED</code>}.
+     * <li>This bundle has been uninstalled.
+     * </ul>
+     * <b>Postconditions, when an exception is thrown </b>
+     * <ul>
+     * <li><code>getState()</code> not in {<code>UNINSTALLED</code>}.
+     * <li>This Bundle has not been uninstalled.
+     * </ul>
+     *
+     * @throws BundleException If the uninstall failed. This can occur if
+     *         another thread is attempting to change this bundle's state and
+     *         does not complete in a timely manner.
+     * @throws java.lang.IllegalStateException If this bundle has been
+     *         uninstalled or this bundle tries to change its own state.
+     * @throws java.lang.SecurityException If the caller does not have the
+     *         appropriate <code>AdminPermission[this,LIFECYCLE]</code>, and
+     *         the Java Runtime Environment supports permissions.
+     * @see #stop()
+     */
+    public void uninstall() ;
+
+    /**
+     * Returns this bundle's Manifest headers and values. This method returns
+     * all the Manifest headers and values from the main section of this
+     * bundle's Manifest file; that is, all lines prior to the first blank line.
+     *
+     * <p>
+     * Manifest header names are case-insensitive. The methods of the returned
+     * <code>Dictionary</code> object must operate on header names in a
+     * case-insensitive manner.
+     *
+     * If a Manifest header value starts with &quot;%&quot;, it must be
+     * localized according to the default locale.
+     *
+     * <p>
+     * For example, the following Manifest headers and values are included if
+     * they are present in the Manifest file:
+     *
+     * <pre>
+     *     Bundle-Name
+     *     Bundle-Vendor
+     *     Bundle-Version
+     *     Bundle-Description
+     *     Bundle-DocURL
+     *     Bundle-ContactAddress
+     * </pre>
+     *
+     * <p>
+     * This method must continue to return Manifest header information while
+     * this bundle is in the <code>UNINSTALLED</code> state.
+     *
+     * @return A <code>Dictionary</code> object containing this bundle's
+     *         Manifest headers and values.
+     *
+     * @throws java.lang.SecurityException If the caller does not have the
+     *         appropriate <code>AdminPermission[this,METADATA]</code>, and
+     *         the Java Runtime Environment supports permissions.
+     *
+     * @see Constants#BUNDLE_LOCALIZATION
+     */
+    public Dictionary getHeaders();
+
+    /**
+     * Returns this bundle's unique identifier. This bundle is assigned a unique
+     * identifier by the Framework when it was installed in the OSGi
+     * environment.
+     *
+     * <p>
+     * A bundle's unique identifier has the following attributes:
+     * <ul>
+     * <li>Is unique and persistent.
+     * <li>Is a <code>long</code>.
+     * <li>Its value is not reused for another bundle, even after a bundle is
+     * uninstalled.
+     * <li>Does not change while a bundle remains installed.
+     * <li>Does not change when a bundle is updated.
+     * </ul>
+     *
+     * <p>
+     * This method must continue to return this bundle's unique identifier while
+     * this bundle is in the <code>UNINSTALLED</code> state.
+     *
+     * @return The unique identifier of this bundle.
+     */
+    public long getBundleId();
+
+    /**
+     * Returns this bundle's location identifier.
+     *
+     * <p>
+     * The location identifier is the location passed to
+     * <code>BundleContext.installBundle</code> when a bundle is installed.
+     * The location identifier does not change while this bundle remains
+     * installed, even if this bundle is updated.
+     *
+     * <p>
+     * This method must continue to return this bundle's location identifier
+     * while this bundle is in the <code>UNINSTALLED</code> state.
+     *
+     * @return The string representation of this bundle's location identifier.
+     * @throws java.lang.SecurityException If the caller does not have the
+     *         appropriate <code>AdminPermission[this,METADATA]</code>, and
+     *         the Java Runtime Environment supports permissions.
+     */
+    public String getLocation();
+
+    /**
+     * Returns this bundle's <code>ServiceReference</code> list for all
+     * services it has registered or <code>null</code> if this bundle has no
+     * registered services.
+     *
+     * <p>
+     * If the Java runtime supports permissions, a <code>ServiceReference</code>
+     * object to a service is included in the returned list only if the caller
+     * has the <code>ServicePermission</code> to get the service using at
+     * least one of the named classes the service was registered under.
+     *
+     * <p>
+     * The list is valid at the time of the call to this method, however, as the
+     * Framework is a very dynamic environment, services can be modified or
+     * unregistered at anytime.
+     *
+     * @return An array of <code>ServiceReference</code> objects or
+     *         <code>null</code>.
+     * @throws java.lang.IllegalStateException If this bundle has been
+     *         uninstalled.
+     * @see ServiceRegistration
+     * @see ServiceReference
+     * @see ServicePermission
+     */
+    public ServiceReference[] getRegisteredServices();
+
+    /**
+     * Returns this bundle's <code>ServiceReference</code> list for all
+     * services it is using or returns <code>null</code> if this bundle is not
+     * using any services. A bundle is considered to be using a service if its
+     * use count for that service is greater than zero.
+     *
+     * <p>
+     * If the Java Runtime Environment supports permissions, a
+     * <code>ServiceReference</code> object to a service is included in the
+     * returned list only if the caller has the <code>ServicePermission</code>
+     * to get the service using at least one of the named classes the service
+     * was registered under.
+     * <p>
+     * The list is valid at the time of the call to this method, however, as the
+     * Framework is a very dynamic environment, services can be modified or
+     * unregistered at anytime.
+     *
+     * @return An array of <code>ServiceReference</code> objects or
+     *         <code>null</code>.
+     * @throws java.lang.IllegalStateException If this bundle has been
+     *         uninstalled.
+     * @see ServiceReference
+     * @see ServicePermission
+     */
+    public ServiceReference[] getServicesInUse();
+
+    /**
+     * Determines if this bundle has the specified permissions.
+     *
+     * <p>
+     * If the Java Runtime Environment does not support permissions, this method
+     * always returns <code>true</code>.
+     * <p>
+     * <code>permission</code> is of type <code>Object</code> to avoid
+     * referencing the <code>java.security.Permission</code> class directly.
+     * This is to allow the Framework to be implemented in Java environments
+     * which do not support permissions.
+     *
+     * <p>
+     * If the Java Runtime Environment does support permissions, this bundle and
+     * all its resources including embedded JAR files, belong to the same
+     * <code>java.security.ProtectionDomain</code>; that is, they must share
+     * the same set of permissions.
+     *
+     * @param permission The permission to verify.
+     *
+     * @return <code>true</code> if this bundle has the specified permission
+     *         or the permissions possessed by this bundle imply the specified
+     *         permission; <code>false</code> if this bundle does not have the
+     *         specified permission or <code>permission</code> is not an
+     *         <code>instanceof</code> <code>java.security.Permission</code>.
+     *
+     * @throws java.lang.IllegalStateException If this bundle has been
+     *         uninstalled.
+     */
+    public bool hasPermission(Object permission);
 
-//     /**
-//      * Updates this bundle from an <code>InputStream</code>.
-//      *
-//      * <p>
-//      * This method performs all the steps listed in <code>Bundle.update()</code>,
-//      * except the new version of this bundle must be read from the supplied
-//      * <code>InputStream</code>, rather than a <code>URL</code>.
-//      * <p>
-//      * This method must always close the <code>InputStream</code> when it is
-//      * done, even if an exception is thrown.
-//      *
-//      * @param in The <code>InputStream</code> from which to read the new
-//      *        bundle.
-//      * @throws BundleException If the provided stream cannot be read or the
-//      *         update fails.
-//      * @throws java.lang.IllegalStateException If this bundle has been
-//      *         uninstalled or this bundle tries to change its own state.
-//      * @throws java.lang.SecurityException If the caller does not have the
-//      *         appropriate <code>AdminPermission[this,LIFECYCLE]</code> for
-//      *         both the current bundle and the updated bundle, and the Java
-//      *         Runtime Environment supports permissions.
-//      * @see #update()
-//      */
-//     public void update(InputStream in_);
-//
-//     /**
-//      * Uninstalls this bundle.
-//      *
-//      * <p>
-//      * This method causes the Framework to notify other bundles that this bundle
-//      * is being uninstalled, and then puts this bundle into the
-//      * <code>UNINSTALLED</code> state. The Framework must remove any resources
-//      * related to this bundle that it is able to remove.
-//      *
-//      * <p>
-//      * If this bundle has exported any packages, the Framework must continue to
-//      * make these packages available to their importing bundles until the
-//      * <code>PackageAdmin.refreshPackages</code> method has been called or the
-//      * Framework is relaunched.
-//      *
-//      * <p>
-//      * The following steps are required to uninstall a bundle:
-//      * <ol>
-//      * <li>If this bundle's state is <code>UNINSTALLED</code> then an
-//      * <code>IllegalStateException</code> is thrown.
-//      *
-//      * <li>If this bundle's state is <code>ACTIVE</code>,
-//      * <code>STARTING</code> or <code>STOPPING</code>, this bundle is
-//      * stopped as described in the <code>Bundle.stop</code> method. If
-//      * <code>Bundle.stop</code> throws an exception, a Framework event of type
-//      * {@link FrameworkEvent#ERROR} is fired containing the exception.
-//      *
-//      * <li>This bundle's state is set to <code>UNINSTALLED</code>.
-//      *
-//      * <li>A bundle event of type {@link BundleEvent#UNINSTALLED} is fired.
-//      *
-//      * <li>This bundle and any persistent storage area provided for this bundle
-//      * by the Framework are removed.
-//      * </ol>
-//      *
-//      * <b>Preconditions </b>
-//      * <ul>
-//      * <li><code>getState()</code> not in {<code>UNINSTALLED</code>}.
-//      * </ul>
-//      * <b>Postconditions, no exceptions thrown </b>
-//      * <ul>
-//      * <li><code>getState()</code> in {<code>UNINSTALLED</code>}.
-//      * <li>This bundle has been uninstalled.
-//      * </ul>
-//      * <b>Postconditions, when an exception is thrown </b>
-//      * <ul>
-//      * <li><code>getState()</code> not in {<code>UNINSTALLED</code>}.
-//      * <li>This Bundle has not been uninstalled.
-//      * </ul>
-//      *
-//      * @throws BundleException If the uninstall failed. This can occur if
-//      *         another thread is attempting to change this bundle's state and
-//      *         does not complete in a timely manner.
-//      * @throws java.lang.IllegalStateException If this bundle has been
-//      *         uninstalled or this bundle tries to change its own state.
-//      * @throws java.lang.SecurityException If the caller does not have the
-//      *         appropriate <code>AdminPermission[this,LIFECYCLE]</code>, and
-//      *         the Java Runtime Environment supports permissions.
-//      * @see #stop()
-//      */
-//     public void uninstall();
-//
-//     /**
-//      * Returns this bundle's Manifest headers and values. This method returns
-//      * all the Manifest headers and values from the main section of this
-//      * bundle's Manifest file; that is, all lines prior to the first blank line.
-//      *
-//      * <p>
-//      * Manifest header names are case-insensitive. The methods of the returned
-//      * <code>Dictionary</code> object must operate on header names in a
-//      * case-insensitive manner.
-//      *
-//      * If a Manifest header value starts with &quot;%&quot;, it must be
-//      * localized according to the default locale.
-//      *
-//      * <p>
-//      * For example, the following Manifest headers and values are included if
-//      * they are present in the Manifest file:
-//      *
-//      * <pre>
-//      *     Bundle-Name
-//      *     Bundle-Vendor
-//      *     Bundle-Version
-//      *     Bundle-Description
-//      *     Bundle-DocURL
-//      *     Bundle-ContactAddress
-//      * </pre>
-//      *
-//      * <p>
-//      * This method must continue to return Manifest header information while
-//      * this bundle is in the <code>UNINSTALLED</code> state.
-//      *
-//      * @return A <code>Dictionary</code> object containing this bundle's
-//      *         Manifest headers and values.
-//      *
-//      * @throws java.lang.SecurityException If the caller does not have the
-//      *         appropriate <code>AdminPermission[this,METADATA]</code>, and
-//      *         the Java Runtime Environment supports permissions.
-//      *
-//      * @see Constants#BUNDLE_LOCALIZATION
-//      */
-//     public Dictionary getHeaders();
-//
-//     /**
-//      * Returns this bundle's unique identifier. This bundle is assigned a unique
-//      * identifier by the Framework when it was installed in the OSGi
-//      * environment.
-//      *
-//      * <p>
-//      * A bundle's unique identifier has the following attributes:
-//      * <ul>
-//      * <li>Is unique and persistent.
-//      * <li>Is a <code>long</code>.
-//      * <li>Its value is not reused for another bundle, even after a bundle is
-//      * uninstalled.
-//      * <li>Does not change while a bundle remains installed.
-//      * <li>Does not change when a bundle is updated.
-//      * </ul>
-//      *
-//      * <p>
-//      * This method must continue to return this bundle's unique identifier while
-//      * this bundle is in the <code>UNINSTALLED</code> state.
-//      *
-//      * @return The unique identifier of this bundle.
-//      */
-//     public long getBundleId();
-//
-//     /**
-//      * Returns this bundle's location identifier.
-//      *
-//      * <p>
-//      * The location identifier is the location passed to
-//      * <code>BundleContext.installBundle</code> when a bundle is installed.
-//      * The location identifier does not change while this bundle remains
-//      * installed, even if this bundle is updated.
-//      *
-//      * <p>
-//      * This method must continue to return this bundle's location identifier
-//      * while this bundle is in the <code>UNINSTALLED</code> state.
-//      *
-//      * @return The string representation of this bundle's location identifier.
-//      * @throws java.lang.SecurityException If the caller does not have the
-//      *         appropriate <code>AdminPermission[this,METADATA]</code>, and
-//      *         the Java Runtime Environment supports permissions.
-//      */
-//     public String getLocation();
-//
-//     /**
-//      * Returns this bundle's <code>ServiceReference</code> list for all
-//      * services it has registered or <code>null</code> if this bundle has no
-//      * registered services.
-//      *
-//      * <p>
-//      * If the Java runtime supports permissions, a <code>ServiceReference</code>
-//      * object to a service is included in the returned list only if the caller
-//      * has the <code>ServicePermission</code> to get the service using at
-//      * least one of the named classes the service was registered under.
-//      *
-//      * <p>
-//      * The list is valid at the time of the call to this method, however, as the
-//      * Framework is a very dynamic environment, services can be modified or
-//      * unregistered at anytime.
-//      *
-//      * @return An array of <code>ServiceReference</code> objects or
-//      *         <code>null</code>.
-//      * @throws java.lang.IllegalStateException If this bundle has been
-//      *         uninstalled.
-//      * @see ServiceRegistration
-//      * @see ServiceReference
-//      * @see ServicePermission
-//      */
-//     public ServiceReference[] getRegisteredServices();
-//
-//     /**
-//      * Returns this bundle's <code>ServiceReference</code> list for all
-//      * services it is using or returns <code>null</code> if this bundle is not
-//      * using any services. A bundle is considered to be using a service if its
-//      * use count for that service is greater than zero.
-//      *
-//      * <p>
-//      * If the Java Runtime Environment supports permissions, a
-//      * <code>ServiceReference</code> object to a service is included in the
-//      * returned list only if the caller has the <code>ServicePermission</code>
-//      * to get the service using at least one of the named classes the service
-//      * was registered under.
-//      * <p>
-//      * The list is valid at the time of the call to this method, however, as the
-//      * Framework is a very dynamic environment, services can be modified or
-//      * unregistered at anytime.
-//      *
-//      * @return An array of <code>ServiceReference</code> objects or
-//      *         <code>null</code>.
-//      * @throws java.lang.IllegalStateException If this bundle has been
-//      *         uninstalled.
-//      * @see ServiceReference
-//      * @see ServicePermission
-//      */
-//     public ServiceReference[] getServicesInUse();
-//
-//     /**
-//      * Determines if this bundle has the specified permissions.
-//      *
-//      * <p>
-//      * If the Java Runtime Environment does not support permissions, this method
-//      * always returns <code>true</code>.
-//      * <p>
-//      * <code>permission</code> is of type <code>Object</code> to avoid
-//      * referencing the <code>java.security.Permission</code> class directly.
-//      * This is to allow the Framework to be implemented in Java environments
-//      * which do not support permissions.
-//      *
-//      * <p>
-//      * If the Java Runtime Environment does support permissions, this bundle and
-//      * all its resources including embedded JAR files, belong to the same
-//      * <code>java.security.ProtectionDomain</code>; that is, they must share
-//      * the same set of permissions.
-//      *
-//      * @param permission The permission to verify.
-//      *
-//      * @return <code>true</code> if this bundle has the specified permission
-//      *         or the permissions possessed by this bundle imply the specified
-//      *         permission; <code>false</code> if this bundle does not have the
-//      *         specified permission or <code>permission</code> is not an
-//      *         <code>instanceof</code> <code>java.security.Permission</code>.
-//      *
-//      * @throws java.lang.IllegalStateException If this bundle has been
-//      *         uninstalled.
-//      */
-//     public bool hasPermission(Object permission);
-//
-//     /**
-//      * Find the specified resource from this bundle.
-//      *
-//      * This bundle's class loader is called to search for the specified
-//      * resource. If this bundle's state is <code>INSTALLED</code>, this
-//      * method must attempt to resolve this bundle before attempting to get the
-//      * specified resource. If this bundle cannot be resolved, then only this
-//      * bundle must be searched for the specified resource. Imported packages
-//      * cannot be searched when this bundle has not been resolved. If this bundle
-//      * is a fragment bundle then <code>null</code> is returned.
-//      *
-//      * @param name The name of the resource. See
-//      *        <code>java.lang.ClassLoader.getResource</code> for a description
-//      *        of the format of a resource name.
-//      * @return A URL to the named resource, or <code>null</code> if the
-//      *         resource could not be found or if this bundle is a fragment
-//      *         bundle or if the caller does not have the appropriate
-//      *         <code>AdminPermission[this,RESOURCE]</code>, and the Java
-//      *         Runtime Environment supports permissions.
-//      *
-//      * @since 1.1
-//      * @throws java.lang.IllegalStateException If this bundle has been
-//      *         uninstalled.
-//      * @see #getEntry
-//      * @see #findEntries
-//      */
-//     public URL getResource(String name);
-//
-//     /**
-//      * Returns this bundle's Manifest headers and values localized to the
-//      * specified locale.
-//      *
-//      * <p>
-//      * This method performs the same function as
-//      * <code>Bundle.getHeaders()</code> except the manifest header values are
-//      * localized to the specified locale.
-//      *
-//      * <p>
-//      * If a Manifest header value starts with &quot;%&quot;, it must be
-//      * localized according to the specified locale. If a locale is specified and
-//      * cannot be found, then the header values must be returned using the
-//      * default locale. Localizations are searched for in the following order:
-//      *
-//      * <pre>
-//      *   bn + "_" + Ls + "_" + Cs + "_" + Vs
-//      *   bn + "_" + Ls + "_" + Cs
-//      *   bn + "_" + Ls
-//      *   bn + "_" + Ld + "_" + Cd + "_" + Vd
-//      *   bn + "_" + Ld + "_" + Cd
-//      *   bn + "_" + Ld
-//      *     bn
-//      * </pre>
-//      *
-//      * Where <code>bn</code> is this bundle's localization basename,
-//      * <code>Ls</code>, <code>Cs</code> and <code>Vs</code> are the
-//      * specified locale (language, country, variant) and <code>Ld</code>,
-//      * <code>Cd</code> and <code>Vd</code> are the default locale (language,
-//      * country, variant).
-//      *
-//      * If <code>null</code> is specified as the locale string, the header
-//      * values must be localized using the default locale. If the empty string
-//      * (&quot;&quot;) is specified as the locale string, the header values must
-//      * not be localized and the raw (unlocalized) header values, including any
-//      * leading &quot;%&quot;, must be returned.
-//      *
-//      * <p>
-//      * This method must continue to return Manifest header information while
-//      * this bundle is in the <code>UNINSTALLED</code> state, however the
-//      * header values must only be available in the raw and default locale
-//      * values.
-//      *
-//      * @param locale The locale name into which the header values are to be
-//      *        localized. If the specified locale is <code>null</code> then the
-//      *        locale returned by <code>java.util.Locale.getDefault</code> is
-//      *        used. If the specified locale is the empty string, this method
-//      *        will return the raw (unlocalized) manifest headers including any
-//      *        leading &quot;%&quot;.
-//      * @return A <code>Dictionary</code> object containing this bundle's
-//      *         Manifest headers and values.
-//      *
-//      * @throws java.lang.SecurityException If the caller does not have the
-//      *         appropriate <code>AdminPermission[this,METADATA]</code>, and
-//      *         the Java Runtime Environment supports permissions.
-//      *
-//      * @see #getHeaders()
-//      * @see Constants#BUNDLE_LOCALIZATION
-//      * @since 1.3
-//      */
-//     public Dictionary getHeaders(String locale);
-//
-//     /**
-//      * Returns the symbolic name of this bundle as specified by its
-//      * <code>Bundle-SymbolicName</code> manifest header. The name must be
-//      * unique, it is recommended to use a reverse domain name naming convention
-//      * like that used for java packages. If this bundle does not have a
-//      * specified symbolic name then <code>null</code> is returned.
-//      *
-//      * <p>
-//      * This method must continue to return this bundle's symbolic name while
-//      * this bundle is in the <code>UNINSTALLED</code> state.
-//      *
-//      * @return The symbolic name of this bundle.
-//      * @since 1.3
-//      */
-//     public String getSymbolicName();
-//
-//     /**
-//      * Loads the specified class using this bundle's classloader.
-//      *
-//      * <p>
-//      * If this bundle is a fragment bundle then this method must throw a
-//      * <code>ClassNotFoundException</code>.
-//      *
-//      * <p>
-//      * If this bundle's state is <code>INSTALLED</code>, this method must
-//      * attempt to resolve this bundle before attempting to load the class.
-//      *
-//      * <p>
-//      * If this bundle cannot be resolved, a Framework event of type
-//      * {@link FrameworkEvent#ERROR} is fired containing a
-//      * <code>BundleException</code> with details of the reason this bundle
-//      * could not be resolved. This method must then throw a
-//      * <code>ClassNotFoundException</code>.
-//      *
-//      * <p>
-//      * If this bundle's state is <code>UNINSTALLED</code>, then an
-//      * <code>IllegalStateException</code> is thrown.
-//      *
-//      * @param name The name of the class to load.
-//      * @return The Class object for the requested class.
-//      * @throws java.lang.ClassNotFoundException If no such class can be found or
-//      *         if this bundle is a fragment bundle or if the caller does not
-//      *         have the appropriate <code>AdminPermission[this,CLASS]</code>,
-//      *         and the Java Runtime Environment supports permissions.
-//      * @throws java.lang.IllegalStateException If this bundle has been
-//      *         uninstalled.
-//      * @since 1.3
-//      */
-//     public Class loadClass(String name) throws ClassNotFoundException;
-//
-//     /**
-//      * Find the specified resources from this bundle.
-//      *
-//      * This bundle's class loader is called to search for the specified
-//      * resources. If this bundle's state is <code>INSTALLED</code>, this
-//      * method must attempt to resolve this bundle before attempting to get the
-//      * specified resources. If this bundle cannot be resolved, then only this
-//      * bundle must be searched for the specified resources. Imported packages
-//      * cannot be searched when a bundle has not been resolved. If this bundle is
-//      * a fragment bundle then <code>null</code> is returned.
-//      *
-//      * @param name The name of the resource. See
-//      *        <code>java.lang.ClassLoader.getResources</code> for a
-//      *        description of the format of a resource name.
-//      * @return An enumeration of URLs to the named resources, or
-//      *         <code>null</code> if the resource could not be found or if this
-//      *         bundle is a fragment bundle or if the caller does not have the
-//      *         appropriate <code>AdminPermission[this,RESOURCE]</code>, and
-//      *         the Java Runtime Environment supports permissions.
-//      *
-//      * @since 1.3
-//      * @throws java.lang.IllegalStateException If this bundle has been
-//      *         uninstalled.
-//      * @throws java.io.IOException If there is an I/O error.
-//      */
-//     public Enumeration getResources(String name) throws IOException;
-//
-//     /**
-//      * Returns an Enumeration of all the paths (<code>String</code> objects)
-//      * to entries within this bundle whose longest sub-path matches the
-//      * specified path. This bundle's classloader is not used to search for
-//      * entries. Only the contents of this bundle are searched.
-//      * <p>
-//      * The specified path is always relative to the root of this bundle and may
-//      * begin with a &quot;/&quot;. A path value of &quot;/&quot; indicates the
-//      * root of this bundle.
-//      * <p>
-//      * Returned paths indicating subdirectory paths end with a &quot;/&quot;.
-//      * The returned paths are all relative to the root of this bundle and must
-//      * not begin with &quot;/&quot;.
-//      *
-//      * @param path The path name for which to return entry paths.
-//      * @return An Enumeration of the entry paths (<code>String</code>
-//      *         objects) or <code>null</code> if no entry could be found or if
-//      *         the caller does not have the appropriate
-//      *         <code>AdminPermission[this,RESOURCE]</code> and the Java
-//      *         Runtime Environment supports permissions.
-//      * @throws java.lang.IllegalStateException If this bundle has been
-//      *         uninstalled.
-//      * @since 1.3
-//      */
-//     public Enumeration getEntryPaths(String path);
-//
-//     /**
-//      * Returns a URL to the entry at the specified path in this bundle. This
-//      * bundle's classloader is not used to search for the entry. Only the
-//      * contents of this bundle are searched for the entry.
-//      * <p>
-//      * The specified path is always relative to the root of this bundle and may
-//      * begin with &quot;/&quot;. A path value of &quot;/&quot; indicates the
-//      * root of this bundle.
-//      *
-//      * @param path The path name of the entry.
-//      * @return A URL to the entry, or <code>null</code> if no entry could be
-//      *         found or if the caller does not have the appropriate
-//      *         <code>AdminPermission[this,RESOURCE]</code> and the Java
-//      *         Runtime Environment supports permissions.
-//      *
-//      * @throws java.lang.IllegalStateException If this bundle has been
-//      *         uninstalled.
-//      * @since 1.3
-//      */
-//     public URL getEntry(String path);
-//
-//     /**
-//      * Returns the time when this bundle was last modified. A bundle is
-//      * considered to be modified when it is installed, updated or uninstalled.
-//      *
-//      * <p>
-//      * The time value is the number of milliseconds since January 1, 1970,
-//      * 00:00:00 GMT.
-//      *
-//      * @return The time when this bundle was last modified.
-//      * @since 1.3
-//      */
-//     public long getLastModified();
-//
-//     /**
-//      * Returns entries in this bundle and its attached fragments. This bundle's
-//      * classloader is not used to search for entries. Only the contents of this
-//      * bundle and its attached fragments are searched for the specified entries.
-//      *
-//      * If this bundle's state is <code>INSTALLED</code>, this method must
-//      * attempt to resolve this bundle before attempting to find entries.
-//      *
-//      * <p>
-//      * This method is intended to be used to obtain configuration, setup,
-//      * localization and other information from this bundle. This method takes
-//      * into account that the &quot;contents&quot; of this bundle can be extended
-//      * with fragments. This &quot;bundle space&quot; is not a namespace with
-//      * unique members; the same entry name can be present multiple times. This
-//      * method therefore returns an enumeration of URL objects. These URLs can
-//      * come from different JARs but have the same path name. This method can
-//      * either return only entries in the specified path or recurse into
-//      * subdirectories returning entries in the directory tree beginning at the
-//      * specified path. Fragments can be attached after this bundle is resolved,
-//      * possibly changing the set of URLs returned by this method. If this bundle
-//      * is not resolved, only the entries in the JAR file of this bundle are
-//      * returned.
-//      * <p>
-//      * Examples:
-//      *
-//      * <pre>
-//      * // List all XML files in the OSGI-INF directory and below
-//      * Enumeration e = b.findEntries(&quot;OSGI-INF&quot;, &quot;*.xml&quot;, true);
-//      *
-//      * // Find a specific localization file
-//      * Enumeration e = b.findEntries(&quot;OSGI-INF/l10n&quot;,
-//      *                               &quot;bundle_nl_DU.properties&quot;,
-//      *                               false);
-//      * if (e.hasMoreElements())
-//      *  return (URL) e.nextElement();
-//      * </pre>
-//      *
-//      * @param path The path name in which to look. The path is always relative
-//      *        to the root of this bundle and may begin with &quot;/&quot;. A
-//      *        path value of &quot;/&quot; indicates the root of this bundle.
-//      * @param filePattern The file name pattern for selecting entries in the
-//      *        specified path. The pattern is only matched against the last
-//      *        element of the entry path and it supports substring matching, as
-//      *        specified in the Filter specification, using the wildcard
-//      *        character (&quot;*&quot;). If null is specified, this is
-//      *        equivalent to &quot;*&quot; and matches all files.
-//      * @param recurse If <code>true</code>, recurse into subdirectories.
-//      *        Otherwise only return entries from the specified path.
-//      * @return An enumeration of URL objects for each matching entry, or
-//      *         <code>null</code> if an entry could not be found or if the
-//      *         caller does not have the appropriate
-//      *         <code>AdminPermission[this,RESOURCE]</code>, and the Java
-//      *         Runtime Environment supports permissions. The URLs are sorted
-//      *         such that entries from this bundle are returned first followed by
-//      *         the entries from attached fragments in ascending bundle id order.
-//      *         If this bundle is a fragment, then only matching entries in this
-//      *         fragment are returned.
-//      * @since 1.3
-//      */
-//     public Enumeration findEntries(String path, String filePattern,
-//             bool recurse);
-//
-//     /**
-//      * Returns this bundle's {@link BundleContext}. The returned
-//      * <code>BundleContext</code> can be used by the caller to act on behalf
-//      * of this bundle.
-//      *
-//      * <p>
-//      * If this bundle is not in the {@link #STARTING}, {@link #ACTIVE}, or
-//      * {@link #STOPPING} states or this bundle is a fragment bundle, then this
-//      * bundle has no valid <code>BundleContext</code>. This method will
-//      * return <code>null</code> if this bundle has no valid
-//      * <code>BundleContext</code>.
-//      *
-//      * @return A <code>BundleContext</code> for this bundle or
-//      *         <code>null</code> if this bundle has no valid
-//      *         <code>BundleContext</code>.
-//      * @throws java.lang.SecurityException If the caller does not have the
-//      *         appropriate <code>AdminPermission[this,CONTEXT]</code>, and
-//      *         the Java Runtime Environment supports permissions.
-//      * @since 1.4
-//      */
-//     public BundleContext getBundleContext();
+    /**
+     * Find the specified resource from this bundle.
+     *
+     * This bundle's class loader is called to search for the specified
+     * resource. If this bundle's state is <code>INSTALLED</code>, this
+     * method must attempt to resolve this bundle before attempting to get the
+     * specified resource. If this bundle cannot be resolved, then only this
+     * bundle must be searched for the specified resource. Imported packages
+     * cannot be searched when this bundle has not been resolved. If this bundle
+     * is a fragment bundle then <code>null</code> is returned.
+     *
+     * @param name The name of the resource. See
+     *        <code>java.lang.ClassLoader.getResource</code> for a description
+     *        of the format of a resource name.
+     * @return A URL to the named resource, or <code>null</code> if the
+     *         resource could not be found or if this bundle is a fragment
+     *         bundle or if the caller does not have the appropriate
+     *         <code>AdminPermission[this,RESOURCE]</code>, and the Java
+     *         Runtime Environment supports permissions.
+     *
+     * @since 1.1
+     * @throws java.lang.IllegalStateException If this bundle has been
+     *         uninstalled.
+     * @see #getEntry
+     * @see #findEntries
+     */
+    public URL getResource(String name);
+
+    /**
+     * Returns this bundle's Manifest headers and values localized to the
+     * specified locale.
+     *
+     * <p>
+     * This method performs the same function as
+     * <code>Bundle.getHeaders()</code> except the manifest header values are
+     * localized to the specified locale.
+     *
+     * <p>
+     * If a Manifest header value starts with &quot;%&quot;, it must be
+     * localized according to the specified locale. If a locale is specified and
+     * cannot be found, then the header values must be returned using the
+     * default locale. Localizations are searched for in the following order:
+     *
+     * <pre>
+     *   bn + "_" + Ls + "_" + Cs + "_" + Vs
+     *   bn + "_" + Ls + "_" + Cs
+     *   bn + "_" + Ls
+     *   bn + "_" + Ld + "_" + Cd + "_" + Vd
+     *   bn + "_" + Ld + "_" + Cd
+     *   bn + "_" + Ld
+     *     bn
+     * </pre>
+     *
+     * Where <code>bn</code> is this bundle's localization basename,
+     * <code>Ls</code>, <code>Cs</code> and <code>Vs</code> are the
+     * specified locale (language, country, variant) and <code>Ld</code>,
+     * <code>Cd</code> and <code>Vd</code> are the default locale (language,
+     * country, variant).
+     *
+     * If <code>null</code> is specified as the locale string, the header
+     * values must be localized using the default locale. If the empty string
+     * (&quot;&quot;) is specified as the locale string, the header values must
+     * not be localized and the raw (unlocalized) header values, including any
+     * leading &quot;%&quot;, must be returned.
+     *
+     * <p>
+     * This method must continue to return Manifest header information while
+     * this bundle is in the <code>UNINSTALLED</code> state, however the
+     * header values must only be available in the raw and default locale
+     * values.
+     *
+     * @param locale The locale name into which the header values are to be
+     *        localized. If the specified locale is <code>null</code> then the
+     *        locale returned by <code>java.util.Locale.getDefault</code> is
+     *        used. If the specified locale is the empty string, this method
+     *        will return the raw (unlocalized) manifest headers including any
+     *        leading &quot;%&quot;.
+     * @return A <code>Dictionary</code> object containing this bundle's
+     *         Manifest headers and values.
+     *
+     * @throws java.lang.SecurityException If the caller does not have the
+     *         appropriate <code>AdminPermission[this,METADATA]</code>, and
+     *         the Java Runtime Environment supports permissions.
+     *
+     * @see #getHeaders()
+     * @see Constants#BUNDLE_LOCALIZATION
+     * @since 1.3
+     */
+    public Dictionary getHeaders(String locale);
+
+    /**
+     * Returns the symbolic name of this bundle as specified by its
+     * <code>Bundle-SymbolicName</code> manifest header. The name must be
+     * unique, it is recommended to use a reverse domain name naming convention
+     * like that used for java packages. If this bundle does not have a
+     * specified symbolic name then <code>null</code> is returned.
+     *
+     * <p>
+     * This method must continue to return this bundle's symbolic name while
+     * this bundle is in the <code>UNINSTALLED</code> state.
+     *
+     * @return The symbolic name of this bundle.
+     * @since 1.3
+     */
+    public String getSymbolicName();
+
+    /**
+     * Loads the specified class using this bundle's classloader.
+     *
+     * <p>
+     * If this bundle is a fragment bundle then this method must throw a
+     * <code>ClassNotFoundException</code>.
+     *
+     * <p>
+     * If this bundle's state is <code>INSTALLED</code>, this method must
+     * attempt to resolve this bundle before attempting to load the class.
+     *
+     * <p>
+     * If this bundle cannot be resolved, a Framework event of type
+     * {@link FrameworkEvent#ERROR} is fired containing a
+     * <code>BundleException</code> with details of the reason this bundle
+     * could not be resolved. This method must then throw a
+     * <code>ClassNotFoundException</code>.
+     *
+     * <p>
+     * If this bundle's state is <code>UNINSTALLED</code>, then an
+     * <code>IllegalStateException</code> is thrown.
+     *
+     * @param name The name of the class to load.
+     * @return The Class object for the requested class.
+     * @throws java.lang.ClassNotFoundException If no such class can be found or
+     *         if this bundle is a fragment bundle or if the caller does not
+     *         have the appropriate <code>AdminPermission[this,CLASS]</code>,
+     *         and the Java Runtime Environment supports permissions.
+     * @throws java.lang.IllegalStateException If this bundle has been
+     *         uninstalled.
+     * @since 1.3
+     */
+    public Class loadClass(String name) ;
+
+    /**
+     * Find the specified resources from this bundle.
+     *
+     * This bundle's class loader is called to search for the specified
+     * resources. If this bundle's state is <code>INSTALLED</code>, this
+     * method must attempt to resolve this bundle before attempting to get the
+     * specified resources. If this bundle cannot be resolved, then only this
+     * bundle must be searched for the specified resources. Imported packages
+     * cannot be searched when a bundle has not been resolved. If this bundle is
+     * a fragment bundle then <code>null</code> is returned.
+     *
+     * @param name The name of the resource. See
+     *        <code>java.lang.ClassLoader.getResources</code> for a
+     *        description of the format of a resource name.
+     * @return An enumeration of URLs to the named resources, or
+     *         <code>null</code> if the resource could not be found or if this
+     *         bundle is a fragment bundle or if the caller does not have the
+     *         appropriate <code>AdminPermission[this,RESOURCE]</code>, and
+     *         the Java Runtime Environment supports permissions.
+     *
+     * @since 1.3
+     * @throws java.lang.IllegalStateException If this bundle has been
+     *         uninstalled.
+     * @throws java.io.IOException If there is an I/O error.
+     */
+    public Enumeration getResources(String name) ;
+
+    /**
+     * Returns an Enumeration of all the paths (<code>String</code> objects)
+     * to entries within this bundle whose longest sub-path matches the
+     * specified path. This bundle's classloader is not used to search for
+     * entries. Only the contents of this bundle are searched.
+     * <p>
+     * The specified path is always relative to the root of this bundle and may
+     * begin with a &quot;/&quot;. A path value of &quot;/&quot; indicates the
+     * root of this bundle.
+     * <p>
+     * Returned paths indicating subdirectory paths end with a &quot;/&quot;.
+     * The returned paths are all relative to the root of this bundle and must
+     * not begin with &quot;/&quot;.
+     *
+     * @param path The path name for which to return entry paths.
+     * @return An Enumeration of the entry paths (<code>String</code>
+     *         objects) or <code>null</code> if no entry could be found or if
+     *         the caller does not have the appropriate
+     *         <code>AdminPermission[this,RESOURCE]</code> and the Java
+     *         Runtime Environment supports permissions.
+     * @throws java.lang.IllegalStateException If this bundle has been
+     *         uninstalled.
+     * @since 1.3
+     */
+    public Enumeration getEntryPaths(String path);
+
+    /**
+     * Returns a URL to the entry at the specified path in this bundle. This
+     * bundle's classloader is not used to search for the entry. Only the
+     * contents of this bundle are searched for the entry.
+     * <p>
+     * The specified path is always relative to the root of this bundle and may
+     * begin with &quot;/&quot;. A path value of &quot;/&quot; indicates the
+     * root of this bundle.
+     *
+     * @param path The path name of the entry.
+     * @return A URL to the entry, or <code>null</code> if no entry could be
+     *         found or if the caller does not have the appropriate
+     *         <code>AdminPermission[this,RESOURCE]</code> and the Java
+     *         Runtime Environment supports permissions.
+     *
+     * @throws java.lang.IllegalStateException If this bundle has been
+     *         uninstalled.
+     * @since 1.3
+     */
+    public URL getEntry(String path);
+
+    /**
+     * Returns the time when this bundle was last modified. A bundle is
+     * considered to be modified when it is installed, updated or uninstalled.
+     *
+     * <p>
+     * The time value is the number of milliseconds since January 1, 1970,
+     * 00:00:00 GMT.
+     *
+     * @return The time when this bundle was last modified.
+     * @since 1.3
+     */
+    public long getLastModified();
+
+    /**
+     * Returns entries in this bundle and its attached fragments. This bundle's
+     * classloader is not used to search for entries. Only the contents of this
+     * bundle and its attached fragments are searched for the specified entries.
+     *
+     * If this bundle's state is <code>INSTALLED</code>, this method must
+     * attempt to resolve this bundle before attempting to find entries.
+     *
+     * <p>
+     * This method is intended to be used to obtain configuration, setup,
+     * localization and other information from this bundle. This method takes
+     * into account that the &quot;contents&quot; of this bundle can be extended
+     * with fragments. This &quot;bundle space&quot; is not a namespace with
+     * unique members; the same entry name can be present multiple times. This
+     * method therefore returns an enumeration of URL objects. These URLs can
+     * come from different JARs but have the same path name. This method can
+     * either return only entries in the specified path or recurse into
+     * subdirectories returning entries in the directory tree beginning at the
+     * specified path. Fragments can be attached after this bundle is resolved,
+     * possibly changing the set of URLs returned by this method. If this bundle
+     * is not resolved, only the entries in the JAR file of this bundle are
+     * returned.
+     * <p>
+     * Examples:
+     *
+     * <pre>
+     * // List all XML files in the OSGI-INF directory and below
+     * Enumeration e = b.findEntries(&quot;OSGI-INF&quot;, &quot;*.xml&quot;, true);
+     *
+     * // Find a specific localization file
+     * Enumeration e = b.findEntries(&quot;OSGI-INF/l10n&quot;,
+     *                               &quot;bundle_nl_DU.properties&quot;,
+     *                               false);
+     * if (e.hasMoreElements())
+     *  return (URL) e.nextElement();
+     * </pre>
+     *
+     * @param path The path name in which to look. The path is always relative
+     *        to the root of this bundle and may begin with &quot;/&quot;. A
+     *        path value of &quot;/&quot; indicates the root of this bundle.
+     * @param filePattern The file name pattern for selecting entries in the
+     *        specified path. The pattern is only matched against the last
+     *        element of the entry path and it supports substring matching, as
+     *        specified in the Filter specification, using the wildcard
+     *        character (&quot;*&quot;). If null is specified, this is
+     *        equivalent to &quot;*&quot; and matches all files.
+     * @param recurse If <code>true</code>, recurse into subdirectories.
+     *        Otherwise only return entries from the specified path.
+     * @return An enumeration of URL objects for each matching entry, or
+     *         <code>null</code> if an entry could not be found or if the
+     *         caller does not have the appropriate
+     *         <code>AdminPermission[this,RESOURCE]</code>, and the Java
+     *         Runtime Environment supports permissions. The URLs are sorted
+     *         such that entries from this bundle are returned first followed by
+     *         the entries from attached fragments in ascending bundle id order.
+     *         If this bundle is a fragment, then only matching entries in this
+     *         fragment are returned.
+     * @since 1.3
+     */
+    public Enumeration findEntries(String path, String filePattern,
+            bool recurse);
+
+    /**
+     * Returns this bundle's {@link BundleContext}. The returned
+     * <code>BundleContext</code> can be used by the caller to act on behalf
+     * of this bundle.
+     *
+     * <p>
+     * If this bundle is not in the {@link #STARTING}, {@link #ACTIVE}, or
+     * {@link #STOPPING} states or this bundle is a fragment bundle, then this
+     * bundle has no valid <code>BundleContext</code>. This method will
+     * return <code>null</code> if this bundle has no valid
+     * <code>BundleContext</code>.
+     *
+     * @return A <code>BundleContext</code> for this bundle or
+     *         <code>null</code> if this bundle has no valid
+     *         <code>BundleContext</code>.
+     * @throws java.lang.SecurityException If the caller does not have the
+     *         appropriate <code>AdminPermission[this,CONTEXT]</code>, and
+     *         the Java Runtime Environment supports permissions.
+     * @since 1.4
+     */
+    public BundleContext getBundleContext();
 }
--- a/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleActivator.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleActivator.d	Sun Nov 08 12:42:30 2009 +0100
@@ -1,8 +1,8 @@
 /*
  * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/BundleActivator.java,v 1.14 2007/02/21 16:49:05 hargrave Exp $
- * 
+ *
  * Copyright (c) OSGi Alliance (2000, 2007). All Rights Reserved.
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -16,12 +16,14 @@
  * limitations under the License.
  */
 
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
 module org.osgi.framework.BundleActivator;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
 
 import java.lang.all;
 
+import org.osgi.framework.BundleContext; // packageimport
+
 /**
  * Customizes the starting and stopping of a bundle.
  * <p>
@@ -32,24 +34,24 @@
  * guaranteed that the same instance's <code>BundleActivator.stop</code>
  * method will be called when the bundle is to be stopped. The Framework must
  * not concurrently call a <code>BundleActivator</code> object.
- * 
+ *
  * <p>
  * <code>BundleActivator</code> is specified through the
  * <code>Bundle-Activator</code> Manifest header. A bundle can only specify a
  * single <code>BundleActivator</code> in the Manifest file. Fragment bundles
  * must not have a <code>BundleActivator</code>. The form of the Manifest
  * header is:
- * 
+ *
  * <p>
  * <code>Bundle-Activator: <i>class-name</i></code>
- * 
+ *
  * <p>
  * where <code><i>class-name</i></code> is a fully qualified Java classname.
  * <p>
  * The specified <code>BundleActivator</code> class must have a public
  * constructor that takes no parameters so that a <code>BundleActivator</code>
  * object can be created by <code>Class.newInstance()</code>.
- * 
+ *
  * @NotThreadSafe
  * @version $Revision: 1.14 $
  */
@@ -60,17 +62,17 @@
      * bundle-specific activities necessary to start this bundle. This method
      * can be used to register services or to allocate any resources that this
      * bundle needs.
-     * 
+     *
      * <p>
      * This method must complete and return to its caller in a timely manner.
-     * 
+     *
      * @param context The execution context of the bundle being started.
      * @throws java.lang.Exception If this method throws an exception, this
      *         bundle is marked as stopped and the Framework will remove this
      *         bundle's listeners, unregister all services registered by this
      *         bundle, and release all services used by this bundle.
      */
-    public void start(BundleContext context);
+    public void start(BundleContext context) ;
 
     /**
      * Called when this bundle is stopped so the Framework can perform the
@@ -79,15 +81,15 @@
      * method started. There should be no active threads that were started by
      * this bundle when this bundle returns. A stopped bundle must not call any
      * Framework objects.
-     * 
+     *
      * <p>
      * This method must complete and return to its caller in a timely manner.
-     * 
+     *
      * @param context The execution context of the bundle being stopped.
      * @throws java.lang.Exception If this method throws an exception, the
      *         bundle is still marked as stopped, and the Framework will remove
      *         the bundle's listeners, unregister all services registered by the
      *         bundle, and release all services used by the bundle.
      */
-    public void stop(BundleContext context);
+    public void stop(BundleContext context) ;
 }
--- a/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleContext.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleContext.d	Sun Nov 08 12:42:30 2009 +0100
@@ -1,8 +1,8 @@
 /*
  * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/BundleContext.java,v 1.22 2007/02/21 16:49:05 hargrave Exp $
- * 
+ *
  * Copyright (c) OSGi Alliance (2000, 2007). All Rights Reserved.
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -16,16 +16,22 @@
  * limitations under the License.
  */
 
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
 module org.osgi.framework.BundleContext;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleListener;
-import org.osgi.framework.ServiceListener;
-import org.osgi.framework.FrameworkListener;
-import org.osgi.framework.ServiceReference;
-import org.osgi.framework.ServiceRegistration;
-import org.osgi.framework.Filter;
 
 import java.lang.all;
+
+import org.osgi.framework.BundleListener; // packageimport
+import org.osgi.framework.BundleException; // packageimport
+import org.osgi.framework.ServiceListener; // packageimport
+import org.osgi.framework.InvalidSyntaxException; // packageimport
+import org.osgi.framework.ServiceRegistration; // packageimport
+import org.osgi.framework.ServiceReference; // packageimport
+import org.osgi.framework.Bundle; // packageimport
+import org.osgi.framework.Filter; // packageimport
+import org.osgi.framework.FrameworkListener; // packageimport
+
 import java.io.File;
 import java.io.InputStream;
 import java.util.Dictionary;
@@ -34,7 +40,7 @@
  * A bundle's execution context within the Framework. The context is used to
  * grant access to other methods so that this bundle can interact with the
  * Framework.
- * 
+ *
  * <p>
  * <code>BundleContext</code> methods allow a bundle to:
  * <ul>
@@ -49,7 +55,7 @@
  * <li>Create <code>File</code> objects for files in a persistent storage
  * area provided for the bundle by the Framework.
  * </ul>
- * 
+ *
  * <p>
  * A <code>BundleContext</code> object will be created and provided to the
  * bundle associated with this context when it is started using the
@@ -59,11 +65,11 @@
  * <code>BundleContext</code> object is generally for the private use of its
  * associated bundle and is not meant to be shared with other bundles in the
  * OSGi environment.
- * 
+ *
  * <p>
  * The <code>Bundle</code> object associated with a <code>BundleContext</code>
  * object is called the <em>context bundle</em>.
- * 
+ *
  * <p>
  * The <code>BundleContext</code> object is only valid during the execution of
  * its context bundle; that is, during the period from when the context bundle
@@ -72,11 +78,11 @@
  * object is used subsequently, an <code>IllegalStateException</code> must be
  * thrown. The <code>BundleContext</code> object must never be reused after
  * its context bundle is stopped.
- * 
+ *
  * <p>
  * The Framework is the only entity that can create <code>BundleContext</code>
  * objects and they are only valid within the Framework that created them.
- * 
+ *
  * @ThreadSafe
  * @version $Revision: 1.22 $
  */
@@ -86,7 +92,7 @@
      * Returns the value of the specified property. If the key is not found in
      * the Framework properties, the system properties are then searched. The
      * method returns <code>null</code> if the property is not found.
-     * 
+     *
      * <p>
      * The Framework defines the following standard property keys:
      * </p>
@@ -106,12 +112,12 @@
      * </ul>
      * <p>
      * All bundles must have permission to read these properties.
-     * 
+     *
      * <p>
      * Note: The last four standard properties are used by the
      * {@link Constants#BUNDLE_NATIVECODE} <code>Manifest</code> header's
      * matching algorithm for selecting native language code.
-     * 
+     *
      * @param key The name of the requested property.
      * @return The value of the requested property, or <code>null</code> if
      *         the property is undefined.
@@ -124,7 +130,7 @@
     /**
      * Returns the <code>Bundle</code> object associated with this
      * <code>BundleContext</code>. This bundle is called the context bundle.
-     * 
+     *
      * @return The <code>Bundle</code> object associated with this
      *         <code>BundleContext</code>.
      * @throws java.lang.IllegalStateException If this BundleContext is no
@@ -139,38 +145,38 @@
      * <p>
      * Every installed bundle is uniquely identified by its location string,
      * typically in the form of a URL.
-     * 
+     *
      * <p>
      * The following steps are required to install a bundle:
      * <ol>
      * <li>If a bundle containing the same location string is already
      * installed, the <code>Bundle</code> object for that bundle is returned.
-     * 
+     *
      * <li>The bundle's content is read from the location string. If this
      * fails, a {@link BundleException} is thrown.
-     * 
+     *
      * <li>The bundle's <code>Bundle-NativeCode</code> dependencies are
      * resolved. If this fails, a <code>BundleException</code> is thrown.
-     * 
+     *
      * <li>The bundle's associated resources are allocated. The associated
      * resources minimally consist of a unique identifier and a persistent
      * storage area if the platform has file system support. If this step fails,
      * a <code>BundleException</code> is thrown.
-     * 
+     *
      * <li>If the bundle has declared an Bundle-RequiredExecutionEnvironment
      * header, then the listed execution environments must be verified against
-     * the installed execution environments. If none of the listed execution 
+     * the installed execution environments. If none of the listed execution
      * environments match an installed execution environment, a
      * <code>BundleException</code> must be thrown.
-     * 
+     *
      * <li>The bundle's state is set to <code>INSTALLED</code>.
-     * 
+     *
      * <li>A bundle event of type {@link BundleEvent#INSTALLED} is fired.
-     * 
+     *
      * <li>The <code>Bundle</code> object for the newly or previously
      * installed bundle is returned.
      * </ol>
-     * 
+     *
      * <b>Postconditions, no exceptions thrown </b>
      * <ul>
      * <li><code>getState()</code> in {<code>INSTALLED</code>,<code>RESOLVED</code>}.
@@ -180,7 +186,7 @@
      * <ul>
      * <li>Bundle is not installed and no trace of the bundle exists.
      * </ul>
-     * 
+     *
      * @param location The location identifier of the bundle to install.
      * @return The <code>Bundle</code> object of the installed bundle.
      * @throws BundleException If the installation failed.
@@ -190,22 +196,22 @@
      * @throws java.lang.IllegalStateException If this BundleContext is no
      *         longer valid.
      */
-    public Bundle installBundle(String location);
+    public Bundle installBundle(String location) ;
 
     /**
      * Installs a bundle from the specified <code>InputStream</code> object.
-     * 
+     *
      * <p>
      * This method performs all of the steps listed in
      * <code>BundleContext.installBundle(String location)</code>, except that
      * the bundle's content will be read from the <code>InputStream</code>
      * object. The location identifier string specified will be used as the
      * identity of the bundle.
-     * 
+     *
      * <p>
      * This method must always close the <code>InputStream</code> object, even
      * if an exception is thrown.
-     * 
+     *
      * @param location The location identifier of the bundle to install.
      * @param input The <code>InputStream</code> object from which this bundle
      *        will be read.
@@ -219,11 +225,11 @@
      *         longer valid.
      * @see #installBundle(java.lang.String)
      */
-    public Bundle installBundle(String location, InputStream input);
+    public Bundle installBundle(String location, InputStream input) ;
 
     /**
      * Returns the bundle with the specified identifier.
-     * 
+     *
      * @param id The identifier of the bundle to retrieve.
      * @return A <code>Bundle</code> object or <code>null</code> if the
      *         identifier does not match any installed bundle.
@@ -237,7 +243,7 @@
      * environment at the time of the call to this method. However, since the
      * Framework is a very dynamic environment, bundles can be installed or
      * uninstalled at anytime.
-     * 
+     *
      * @return An array of <code>Bundle</code> objects, one object per
      *         installed bundle.
      */
@@ -249,19 +255,19 @@
      * listeners. See {@link Filter} for a description of the filter syntax.
      * <code>ServiceListener</code> objects are notified when a service has a
      * lifecycle state change.
-     * 
+     *
      * <p>
      * If the context bundle's list of listeners already contains a listener
      * <code>l</code> such that <code>(l==listener)</code>, then this
      * method replaces that listener's filter (which may be <code>null</code>)
      * with the specified one (which may be <code>null</code>).
-     * 
+     *
      * <p>
      * The listener is called if the filter criteria is met. To filter based
      * upon the class of the service, the filter should reference the
      * {@link Constants#OBJECTCLASS} property. If <code>filter</code> is
      * <code>null</code>, all services are considered to match the filter.
-     * 
+     *
      * <p>
      * When using a <code>filter</code>, it is possible that the
      * <code>ServiceEvent</code>s for the complete lifecycle of a service
@@ -275,43 +281,43 @@
      * <code>ServiceEvent</code> of type <code>MODIFIED</code>. Thus, the
      * listener will not be called with a <code>ServiceEvent</code> of type
      * <code>REGISTERED</code>.
-     * 
+     *
      * <p>
      * If the Java Runtime Environment supports permissions, the
      * <code>ServiceListener</code> object will be notified of a service event
      * only if the bundle that is registering it has the
      * <code>ServicePermission</code> to get the service using at least one of
      * the named classes the service was registered under.
-     * 
+     *
      * @param listener The <code>ServiceListener</code> object to be added.
      * @param filter The filter criteria.
-     * 
+     *
      * @throws InvalidSyntaxException If <code>filter</code> contains an
      *         invalid filter string that cannot be parsed.
      * @throws java.lang.IllegalStateException If this BundleContext is no
      *         longer valid.
-     * 
+     *
      * @see ServiceEvent
      * @see ServiceListener
      * @see ServicePermission
      */
     public void addServiceListener(ServiceListener listener,
-            String filter);
+            String filter) ;
 
     /**
      * Adds the specified <code>ServiceListener</code> object to the context
      * bundle's list of listeners.
-     * 
+     *
      * <p>
      * This method is the same as calling
      * <code>BundleContext.addServiceListener(ServiceListener listener,
      * String filter)</code>
      * with <code>filter</code> set to <code>null</code>.
-     * 
+     *
      * @param listener The <code>ServiceListener</code> object to be added.
      * @throws java.lang.IllegalStateException If this BundleContext is no
      *         longer valid.
-     * 
+     *
      * @see #addServiceListener(ServiceListener, String)
      */
     public void addServiceListener(ServiceListener listener);
@@ -319,11 +325,11 @@
     /**
      * Removes the specified <code>ServiceListener</code> object from the
      * context bundle's list of listeners.
-     * 
+     *
      * <p>
      * If <code>listener</code> is not contained in this context bundle's list
      * of listeners, this method does nothing.
-     * 
+     *
      * @param listener The <code>ServiceListener</code> to be removed.
      * @throws java.lang.IllegalStateException If this BundleContext is no
      *         longer valid.
@@ -334,12 +340,12 @@
      * Adds the specified <code>BundleListener</code> object to the context
      * bundle's list of listeners if not already present. BundleListener objects
      * are notified when a bundle has a lifecycle state change.
-     * 
+     *
      * <p>
      * If the context bundle's list of listeners already contains a listener
      * <code>l</code> such that <code>(l==listener)</code>, this method
      * does nothing.
-     * 
+     *
      * @param listener The <code>BundleListener</code> to be added.
      * @throws java.lang.IllegalStateException If this BundleContext is no
      *         longer valid.
@@ -347,7 +353,7 @@
      *         <code>SynchronousBundleListener</code> and the caller does not
      *         have the appropriate <code>AdminPermission[context bundle,LISTENER]</code>,
      *         and the Java Runtime Environment supports permissions.
-     * 
+     *
      * @see BundleEvent
      * @see BundleListener
      */
@@ -356,11 +362,11 @@
     /**
      * Removes the specified <code>BundleListener</code> object from the
      * context bundle's list of listeners.
-     * 
+     *
      * <p>
      * If <code>listener</code> is not contained in the context bundle's list
      * of listeners, this method does nothing.
-     * 
+     *
      * @param listener The <code>BundleListener</code> object to be removed.
      * @throws java.lang.IllegalStateException If this BundleContext is no
      *         longer valid.
@@ -375,16 +381,16 @@
      * Adds the specified <code>FrameworkListener</code> object to the context
      * bundle's list of listeners if not already present. FrameworkListeners are
      * notified of general Framework events.
-     * 
+     *
      * <p>
      * If the context bundle's list of listeners already contains a listener
      * <code>l</code> such that <code>(l==listener)</code>, this method
      * does nothing.
-     * 
+     *
      * @param listener The <code>FrameworkListener</code> object to be added.
      * @throws java.lang.IllegalStateException If this BundleContext is no
      *         longer valid.
-     * 
+     *
      * @see FrameworkEvent
      * @see FrameworkListener
      */
@@ -393,11 +399,11 @@
     /**
      * Removes the specified <code>FrameworkListener</code> object from the
      * context bundle's list of listeners.
-     * 
+     *
      * <p>
      * If <code>listener</code> is not contained in the context bundle's list
      * of listeners, this method does nothing.
-     * 
+     *
      * @param listener The <code>FrameworkListener</code> object to be
      *        removed.
      * @throws java.lang.IllegalStateException If this BundleContext is no
@@ -414,12 +420,12 @@
      * bundles. The registering bundle is defined to be the context bundle.
      * Other bundles can locate the service by using either the
      * {@link #getServiceReferences} or {@link #getServiceReference} method.
-     * 
+     *
      * <p>
      * A bundle can register a service object that implements the
      * {@link ServiceFactory} interface to have more flexibility in providing
      * service objects to other bundles.
-     * 
+     *
      * <p>
      * The following steps are required to register a service:
      * <ol>
@@ -441,7 +447,7 @@
      * <li>A <code>ServiceRegistration</code> object for this registration is
      * returned.
      * </ol>
-     * 
+     *
      * @param clazzes The class names under which the service can be located.
      *        The class names in this array will be stored in the service's
      *        properties under the key {@link Constants#OBJECTCLASS}.
@@ -455,11 +461,11 @@
      *        {@link ServiceRegistration#setProperties} method must be called.
      *        The set of properties may be <code>null</code> if the service
      *        has no properties.
-     * 
+     *
      * @return A <code>ServiceRegistration</code> object for use by the bundle
      *         registering the service to update the service's properties or to
      *         unregister the service.
-     * 
+     *
      * @throws java.lang.IllegalArgumentException If one of the following is
      *         true:
      *         <ul>
@@ -470,15 +476,15 @@
      *         <li><code>properties</code> contains case variants of the same
      *         key name.
      *         </ul>
-     * 
+     *
      * @throws java.lang.SecurityException If the caller does not have the
      *         <code>ServicePermission</code> to register the service for all
      *         the named classes and the Java Runtime Environment supports
      *         permissions.
-     * 
+     *
      * @throws java.lang.IllegalStateException If this BundleContext is no
      *         longer valid.
-     * 
+     *
      * @see ServiceRegistration
      * @see ServiceFactory
      */
@@ -488,7 +494,7 @@
     /**
      * Registers the specified service object with the specified properties
      * under the specified class name with the Framework.
-     * 
+     *
      * <p>
      * This method is otherwise identical to
      * {@link #registerService(java.lang.String[], java.lang.Object,
@@ -497,16 +503,16 @@
      * Note that even in this case the value of the service's
      * {@link Constants#OBJECTCLASS} property will be an array of strings,
      * rather than just a single string.
-     * 
+     *
      * @param clazz The class name under which the service can be located.
      * @param service The service object or a <code>ServiceFactory</code>
      *        object.
-     * @param properties The properties for this service. 
-     * 
+     * @param properties The properties for this service.
+     *
      * @return A <code>ServiceRegistration</code> object for use by the bundle
      *         registering the service to update the service's properties or to
      *         unregister the service.
-     *         
+     *
      * @throws java.lang.IllegalStateException If this BundleContext is no
      *         longer valid.
      * @see #registerService(java.lang.String[], java.lang.Object,
@@ -522,23 +528,23 @@
      * criteria, and the packages for the class names under which the services
      * were registered match the context bundle's packages as defined in
      * {@link ServiceReference#isAssignableTo(Bundle, String)}.
-     * 
+     *
      * <p>
      * The list is valid at the time of the call to this method, however since
      * the Framework is a very dynamic environment, services can be modified or
      * unregistered at anytime.
-     * 
+     *
      * <p>
      * <code>filter</code> is used to select the registered service whose
      * properties objects contain keys and values which satisfy the filter. See
      * {@link Filter} for a description of the filter string syntax.
-     * 
+     *
      * <p>
      * If <code>filter</code> is <code>null</code>, all registered services
      * are considered to match the filter. If <code>filter</code> cannot be
      * parsed, an {@link InvalidSyntaxException} will be thrown with a human
      * readable message where the filter became unparsable.
-     * 
+     *
      * <p>
      * The following steps are required to select a set of
      * <code>ServiceReference</code> objects:
@@ -573,7 +579,7 @@
      * <li>An array of the remaining <code>ServiceReference</code> objects is
      * returned.
      * </ol>
-     * 
+     *
      * @param clazz The class name with which the service was registered or
      *        <code>null</code> for all services.
      * @param filter The filter criteria.
@@ -586,30 +592,30 @@
      *         longer valid.
      */
     public ServiceReference[] getServiceReferences(String clazz,
-            String filter);
+            String filter) ;
 
     /**
      * Returns an array of <code>ServiceReference</code> objects. The returned
      * array of <code>ServiceReference</code> objects contains services that
      * were registered under the specified class and match the specified filter
      * criteria.
-     * 
+     *
      * <p>
      * The list is valid at the time of the call to this method, however since
      * the Framework is a very dynamic environment, services can be modified or
      * unregistered at anytime.
-     * 
+     *
      * <p>
      * <code>filter</code> is used to select the registered service whose
      * properties objects contain keys and values which satisfy the filter. See
      * {@link Filter} for a description of the filter string syntax.
-     * 
+     *
      * <p>
      * If <code>filter</code> is <code>null</code>, all registered services
      * are considered to match the filter. If <code>filter</code> cannot be
      * parsed, an {@link InvalidSyntaxException} will be thrown with a human
      * readable message where the filter became unparsable.
-     * 
+     *
      * <p>
      * The following steps are required to select a set of
      * <code>ServiceReference</code> objects:
@@ -635,7 +641,7 @@
      * <li>An array of the remaining <code>ServiceReference</code> objects is
      * returned.
      * </ol>
-     * 
+     *
      * @param clazz The class name with which the service was registered or
      *        <code>null</code> for all services.
      * @param filter The filter criteria.
@@ -649,17 +655,17 @@
      * @since 1.3
      */
     public ServiceReference[] getAllServiceReferences(String clazz,
-            String filter);
+            String filter) ;
 
     /**
      * Returns a <code>ServiceReference</code> object for a service that
      * implements and was registered under the specified class.
-     * 
+     *
      * <p>
      * This <code>ServiceReference</code> object is valid at the time of the
      * call to this method, however as the Framework is a very dynamic
      * environment, services can be modified or unregistered at anytime.
-     * 
+     *
      * <p>
      * This method is the same as calling
      * {@link BundleContext#getServiceReferences(String, String)} with a
@@ -673,7 +679,7 @@
      * If there is a tie in ranking, the service with the lowest service ID (as
      * specified in its {@link Constants#SERVICE_ID} property); that is, the
      * service that was registered first is returned.
-     * 
+     *
      * @param clazz The class name with which the service was registered.
      * @return A <code>ServiceReference</code> object, or <code>null</code>
      *         if no services are registered which implement the named class.
@@ -695,11 +701,11 @@
      * <p>
      * When a bundle's use count for a service drops to zero, the bundle should
      * no longer use that service.
-     * 
+     *
      * <p>
      * This method will always return <code>null</code> when the service
      * associated with this <code>reference</code> has been unregistered.
-     * 
+     *
      * <p>
      * The following steps are required to get the service object:
      * <ol>
@@ -723,7 +729,7 @@
      * type {@link FrameworkEvent#ERROR} is fired.
      * <li>The service object for the service is returned.
      * </ol>
-     * 
+     *
      * @param reference A reference to the service.
      * @return A service object for the service associated with
      *         <code>reference</code> or <code>null</code> if the service is
@@ -746,12 +752,12 @@
      * for the service is zero, this method returns <code>false</code>.
      * Otherwise, the context bundle's use count for the service is decremented
      * by one.
-     * 
+     *
      * <p>
      * The service's service object should no longer be used and all references
      * to it should be destroyed when a bundle's use count for the service drops
      * to zero.
-     * 
+     *
      * <p>
      * The following steps are required to unget the service object:
      * <ol>
@@ -766,7 +772,7 @@
      * method is called to release the service object for the context bundle.
      * <li><code>true</code> is returned.
      * </ol>
-     * 
+     *
      * @param reference A reference to the service to be released.
      * @return <code>false</code> if the context bundle's use count for the
      *         service is zero or if the service has been unregistered;
@@ -782,20 +788,20 @@
      * Creates a <code>File</code> object for a file in the persistent storage
      * area provided for the bundle by the Framework. This method will return
      * <code>null</code> if the platform does not have file system support.
-     * 
+     *
      * <p>
      * A <code>File</code> object for the base directory of the persistent
      * storage area provided for the context bundle by the Framework can be
      * obtained by calling this method with an empty string as
      * <code>filename</code>.
-     * 
+     *
      * <p>
      * If the Java Runtime Environment supports permissions, the Framework will
      * ensure that the bundle has the <code>java.io.FilePermission</code> with
      * actions <code>read</code>,<code>write</code>,<code>delete</code>
      * for all files (recursively) in the persistent storage area provided for
      * the context bundle.
-     * 
+     *
      * @param filename A relative name to the file to be accessed.
      * @return A <code>File</code> object that represents the requested file
      *         or <code>null</code> if the platform does not have file system
@@ -809,11 +815,11 @@
      * Creates a <code>Filter</code> object. This <code>Filter</code> object
      * may be used to match a <code>ServiceReference</code> object or a
      * <code>Dictionary</code> object.
-     * 
+     *
      * <p>
      * If the filter cannot be parsed, an {@link InvalidSyntaxException} will be
      * thrown with a human readable message where the filter became unparsable.
-     * 
+     *
      * @param filter The filter string.
      * @return A <code>Filter</code> object encapsulating the filter string.
      * @throws InvalidSyntaxException If <code>filter</code> contains an
@@ -821,10 +827,10 @@
      * @throws NullPointerException If <code>filter</code> is null.
      * @throws java.lang.IllegalStateException If this BundleContext is no
      *         longer valid.
-     * 
+     *
      * @since 1.1
      * @see "Framework specification for a description of the filter string syntax."
      * @see FrameworkUtil#createFilter(String)
      */
-    public Filter createFilter(String filter);
+    public Filter createFilter(String filter) ;
 }
--- a/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleEvent.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleEvent.d	Sun Nov 08 12:42:30 2009 +0100
@@ -1,8 +1,8 @@
 /*
  * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/BundleEvent.java,v 1.19 2007/02/20 00:14:12 hargrave Exp $
- * 
+ *
  * Copyright (c) OSGi Alliance (2000, 2007). All Rights Reserved.
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -16,8 +16,13 @@
  * limitations under the License.
  */
 
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
 module org.osgi.framework.BundleEvent;
-import org.osgi.framework.Bundle;
+
+import java.lang.all;
+
+import org.osgi.framework.Bundle; // packageimport
 
 import java.util.EventObject;
 
@@ -28,10 +33,10 @@
  * <code>SynchronousBundleListener</code>s and <code>BundleListener</code>s
  * when a change occurs in a bundle's lifecycle. A type code is used to identify
  * the event type for future extendability.
- * 
+ *
  * <p>
  * OSGi Alliance reserves the right to extend the set of types.
- * 
+ *
  * @Immutable
  * @see BundleListener
  * @see SynchronousBundleListener
@@ -54,7 +59,7 @@
      * The bundle has been installed.
      * <p>
      * The value of <code>INSTALLED</code> is 0x00000001.
-     * 
+     *
      * @see BundleContext#installBundle(String)
      */
     public final static int INSTALLED           = 0x00000001;
@@ -67,7 +72,7 @@
      * has been executed if the bundle has a bundle activator class.
      * <p>
      * The value of <code>STARTED</code> is 0x00000002.
-     * 
+     *
      * @see Bundle#start()
      */
     public final static int STARTED             = 0x00000002;
@@ -80,7 +85,7 @@
      * has been executed if the bundle has a bundle activator class.
      * <p>
      * The value of <code>STOPPED</code> is 0x00000004.
-     * 
+     *
      * @see Bundle#stop()
      */
     public final static int STOPPED             = 0x00000004;
@@ -89,7 +94,7 @@
      * The bundle has been updated.
      * <p>
      * The value of <code>UPDATED</code> is 0x00000008.
-     * 
+     *
      * @see Bundle#update()
      */
     public final static int UPDATED             = 0x00000008;
@@ -98,7 +103,7 @@
      * The bundle has been uninstalled.
      * <p>
      * The value of <code>UNINSTALLED</code> is 0x00000010.
-     * 
+     *
      * @see Bundle#uninstall
      */
     public final static int UNINSTALLED         = 0x00000010;
@@ -107,7 +112,7 @@
      * The bundle has been resolved.
      * <p>
      * The value of <code>RESOLVED</code> is 0x00000020.
-     * 
+     *
      * @see Bundle#RESOLVED
      * @since 1.3
      */
@@ -117,7 +122,7 @@
      * The bundle has been unresolved.
      * <p>
      * The value of <code>UNRESOLVED</code> is 0x00000040.
-     * 
+     *
      * @see Bundle#INSTALLED
      * @since 1.3
      */
@@ -133,7 +138,7 @@
      * delivered to <code>BundleListener</code>s.
      * <p>
      * The value of <code>STARTING</code> is 0x00000080.
-     * 
+     *
      * @see Bundle#start()
      * @since 1.3
      */
@@ -149,7 +154,7 @@
      * delivered to <code>BundleListener</code>s.
      * <p>
      * The value of <code>STOPPING</code> is 0x00000100.
-     * 
+     *
      * @see Bundle#stop()
      * @since 1.3
      */
@@ -166,20 +171,20 @@
      * <code>BundleListener</code>s.
      * <p>
      * The value of <code>LAZY_ACTIVATION</code> is 0x00000200.
-     * 
+     *
      * @since 1.4
      */
     public final static int LAZY_ACTIVATION     = 0x00000200;
 
     /**
      * Creates a bundle event of the specified type.
-     * 
+     *
      * @param type The event type.
      * @param bundle The bundle which had a lifecycle change.
      */
 
     public this(int type, Bundle bundle) {
-        super(cast(Object)bundle);
+        super(bundle);
         this.bundle = bundle;
         this.type = type;
     }
@@ -187,7 +192,7 @@
     /**
      * Returns the bundle which had a lifecycle change. This bundle is the
      * source of the event.
-     * 
+     *
      * @return The bundle that had a change occur in its lifecycle.
      */
     public Bundle getBundle() {
@@ -208,7 +213,7 @@
      * <li>{@link #UNRESOLVED}
      * <li>{@link #UNINSTALLED}
      * </ul>
-     * 
+     *
      * @return The type of lifecycle event.
      */
 
--- a/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleListener.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleListener.d	Sun Nov 08 12:42:30 2009 +0100
@@ -1,8 +1,8 @@
 /*
  * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/BundleListener.java,v 1.13 2007/02/21 16:49:05 hargrave Exp $
- * 
+ *
  * Copyright (c) OSGi Alliance (2000, 2007). All Rights Reserved.
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -16,10 +16,14 @@
  * limitations under the License.
  */
 
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
 module org.osgi.framework.BundleListener;
-import org.osgi.framework.BundleEvent;
 
 import java.lang.all;
+
+import org.osgi.framework.BundleEvent; // packageimport
+
 import java.util.EventListener;
 
 /**
@@ -35,7 +39,7 @@
  * <code>BundleListener</code>s are called with a <code>BundleEvent</code>
  * object when a bundle has been installed, resolved, started, stopped, updated,
  * unresolved, or uninstalled.
- * 
+ *
  * @see BundleEvent
  * @NotThreadSafe
  * @version $Revision: 1.13 $
@@ -44,7 +48,7 @@
 public interface BundleListener : EventListener {
     /**
      * Receives notification that a bundle has had a lifecycle change.
-     * 
+     *
      * @param event The <code>BundleEvent</code>.
      */
     public void bundleChanged(BundleEvent event);
--- a/org.eclipse.osgi/osgi/src/org/osgi/framework/Filter.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.osgi/osgi/src/org/osgi/framework/Filter.d	Sun Nov 08 12:42:30 2009 +0100
@@ -1,8 +1,8 @@
 /*
  * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/Filter.java,v 1.16 2007/02/21 16:49:05 hargrave Exp $
- * 
+ *
  * Copyright (c) OSGi Alliance (2000, 2007). All Rights Reserved.
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -15,10 +15,14 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
 module org.osgi.framework.Filter;
-import org.osgi.framework.ServiceReference;
 
 import java.lang.all;
+
+import org.osgi.framework.ServiceReference; // packageimport
+
 import java.util.Dictionary;
 
 /**
@@ -32,14 +36,14 @@
  * <code>Filter</code> object.
  * <p>
  * Some examples of LDAP filters are:
- * 
+ *
  * <pre>
  *  &quot;(cn=Babs Jensen)&quot;
  *  &quot;(!(cn=Tim Howes))&quot;
  *  &quot;(&amp;(&quot; + Constants.OBJECTCLASS + &quot;=Person)(|(sn=Jensen)(cn=Babs J*)))&quot;
  *  &quot;(o=univ*of*mich*)&quot;
  * </pre>
- * 
+ *
  * @since 1.1
  * @see "Core Specification, section 5.5, for a description of the filter string
  *      syntax."
@@ -53,10 +57,10 @@
      * The filter is executed using the keys and values of the referenced
      * service's properties. The keys are case insensitively matched with the
      * filter.
-     * 
+     *
      * @param reference The reference to the service whose properties are used
      *        in the match.
-     * 
+     *
      * @return <code>true</code> if the service's properties match this
      *         filter; <code>false</code> otherwise.
      */
@@ -66,14 +70,14 @@
      * Filter using a <code>Dictionary</code> object. The Filter is executed
      * using the <code>Dictionary</code> object's keys and values. The keys
      * are case insensitively matched with the filter.
-     * 
+     *
      * @param dictionary The <code>Dictionary</code> object whose keys are
      *        used in the match.
-     * 
+     *
      * @return <code>true</code> if the <code>Dictionary</code> object's
      *         keys and values match this filter; <code>false</code>
      *         otherwise.
-     * 
+     *
      * @throws IllegalArgumentException If <code>dictionary</code> contains
      *         case variants of the same key name.
      */
@@ -84,43 +88,43 @@
      * <p>
      * The filter string is normalized by removing whitespace which does not
      * affect the meaning of the filter.
-     * 
+     *
      * @return Filter string.
      */
     public String toString();
 
     /**
      * Compares this <code>Filter</code> object to another object.
-     * 
+     *
      * @param obj The object to compare against this <code>Filter</code>
      *        object.
-     * 
+     *
      * @return If the other object is a <code>Filter</code> object, then
      *         returns <code>this.toString().equals(obj.toString()</code>;<code>false</code>
      *         otherwise.
      */
-    public bool equals(Object obj);
+    public equals_t opEquals(Object obj);
 
     /**
      * Returns the hashCode for this <code>Filter</code> object.
-     * 
+     *
      * @return The hashCode of the filter string; that is,
      *         <code>this.toString().hashCode()</code>.
      */
-    public int hashCode();
+    public hash_t toHash();
 
     /**
      * Filter with case sensitivity using a <code>Dictionary</code> object.
      * The Filter is executed using the <code>Dictionary</code> object's keys
      * and values. The keys are case sensitively matched with the filter.
-     * 
+     *
      * @param dictionary The <code>Dictionary</code> object whose keys are
      *        used in the match.
-     * 
+     *
      * @return <code>true</code> if the <code>Dictionary</code> object's
      *         keys and values match this filter; <code>false</code>
      *         otherwise.
-     * 
+     *
      * @since 1.3
      */
     public bool matchCase(Dictionary dictionary);
--- a/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkEvent.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkEvent.d	Sun Nov 08 12:42:30 2009 +0100
@@ -1,8 +1,8 @@
 /*
  * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/FrameworkEvent.java,v 1.15 2007/02/20 00:14:12 hargrave Exp $
- * 
+ *
  * Copyright (c) OSGi Alliance (2004, 2007). All Rights Reserved.
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -16,24 +16,28 @@
  * limitations under the License.
  */
 
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
 module org.osgi.framework.FrameworkEvent;
-import org.osgi.framework.Bundle;
 
 import java.lang.all;
+
+import org.osgi.framework.Bundle; // packageimport
+
 import java.util.EventObject;
 
 /**
  * A general event from the Framework.
- * 
+ *
  * <p>
  * <code>FrameworkEvent</code> objects are delivered to
  * <code>FrameworkListener</code>s when a general event occurs within the
  * OSGi environment. A type code is used to identify the event type for future
  * extendability.
- * 
+ *
  * <p>
  * OSGi Alliance reserves the right to extend the set of event types.
- * 
+ *
  * @Immutable
  * @see FrameworkListener
  * @version $Revision: 1.15 $
@@ -58,25 +62,25 @@
 
     /**
      * The Framework has started.
-     * 
+     *
      * <p>
      * This event is fired when the Framework has started after all installed
      * bundles that are marked to be started have been started and the Framework
      * has reached the intitial start level.
-     * 
+     *
      * <p>
      * The value of <code>STARTED</code> is 0x00000001.
-     * 
+     *
      * @see "<code>StartLevel</code>"
      */
     public final static int STARTED             = 0x00000001;
 
     /**
      * An error has occurred.
-     * 
+     *
      * <p>
      * There was an error associated with a bundle.
-     * 
+     *
      * <p>
      * The value of <code>ERROR</code> is 0x00000002.
      */
@@ -84,14 +88,14 @@
 
     /**
      * A PackageAdmin.refreshPackage operation has completed.
-     * 
+     *
      * <p>
      * This event is fired when the Framework has completed the refresh packages
      * operation initiated by a call to the PackageAdmin.refreshPackages method.
-     * 
+     *
      * <p>
      * The value of <code>PACKAGES_REFRESHED</code> is 0x00000004.
-     * 
+     *
      * @since 1.2
      * @see "<code>PackageAdmin.refreshPackages</code>"
      */
@@ -99,14 +103,14 @@
 
     /**
      * A StartLevel.setStartLevel operation has completed.
-     * 
+     *
      * <p>
      * This event is fired when the Framework has completed changing the active
      * start level initiated by a call to the StartLevel.setStartLevel method.
-     * 
+     *
      * <p>
      * The value of <code>STARTLEVEL_CHANGED</code> is 0x00000008.
-     * 
+     *
      * @since 1.2
      * @see "<code>StartLevel</code>"
      */
@@ -114,33 +118,33 @@
 
     /**
      * A warning has occurred.
-     * 
+     *
      * <p>
      * There was a warning associated with a bundle.
-     * 
+     *
      * <p>
      * The value of <code>WARNING</code> is 0x00000010.
-     * 
+     *
      * @since 1.3
      */
     public final static int WARNING             = 0x00000010;
 
     /**
      * An informational event has occurred.
-     * 
+     *
      * <p>
      * There was an informational event associated with a bundle.
-     * 
+     *
      * <p>
      * The value of <code>INFO</code> is 0x00000020.
-     * 
+     *
      * @since 1.3
      */
     public final static int INFO                = 0x00000020;
 
     /**
      * Creates a Framework event.
-     * 
+     *
      * @param type The event type.
      * @param source The event source object. This may not be <code>null</code>.
      * @deprecated As of 1.2. This constructor is deprecated in favor of using
@@ -156,14 +160,14 @@
 
     /**
      * Creates a Framework event regarding the specified bundle.
-     * 
+     *
      * @param type The event type.
      * @param bundle The event source.
      * @param throwable The related exception. This argument may be
      *        <code>null</code> if there is no related exception.
      */
     public this(int type, Bundle bundle, Throwable throwable) {
-        super(cast(Object)bundle);
+        super(bundle);
         this.type = type;
         this.bundle = bundle;
         this.throwable = throwable;
@@ -171,7 +175,7 @@
 
     /**
      * Returns the exception related to this event.
-     * 
+     *
      * @return The related exception or <code>null</code> if none.
      */
     public Throwable getThrowable() {
@@ -181,7 +185,7 @@
     /**
      * Returns the bundle associated with the event. This bundle is also the
      * source of the event.
-     * 
+     *
      * @return The bundle associated with the event.
      */
     public Bundle getBundle() {
@@ -200,7 +204,7 @@
      * <li>{@link #PACKAGES_REFRESHED}
      * <li>{@link #STARTLEVEL_CHANGED}
      * </ul>
-     * 
+     *
      * @return The type of state change.
      */
 
--- a/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkListener.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkListener.d	Sun Nov 08 12:42:30 2009 +0100
@@ -1,8 +1,8 @@
 /*
  * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/FrameworkListener.java,v 1.12 2007/02/21 16:49:05 hargrave Exp $
- * 
+ *
  * Copyright (c) OSGi Alliance (2000, 2007). All Rights Reserved.
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -16,10 +16,14 @@
  * limitations under the License.
  */
 
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
 module org.osgi.framework.FrameworkListener;
-import org.osgi.framework.FrameworkEvent;
 
 import java.lang.all;
+
+import org.osgi.framework.FrameworkEvent; // packageimport
+
 import java.util.EventListener;
 
 /**
@@ -29,14 +33,14 @@
  * <code>FrameworkListener</code>. The Framework delivers
  * <code>FrameworkEvent</code> objects to a <code>FrameworkListener</code>
  * in order and must not concurrently call a <code>FrameworkListener</code>.
- * 
+ *
  * <p>
  * A <code>FrameworkListener</code> object is registered with the Framework
  * using the {@link BundleContext#addFrameworkListener} method.
  * <code>FrameworkListener</code> objects are called with a
  * <code>FrameworkEvent</code> objects when the Framework starts and when
  * asynchronous errors occur.
- * 
+ *
  * @see FrameworkEvent
  * @NotThreadSafe
  * @version $Revision: 1.12 $
@@ -46,7 +50,7 @@
 
     /**
      * Receives notification of a general <code>FrameworkEvent</code> object.
-     * 
+     *
      * @param event The <code>FrameworkEvent</code> object.
      */
     public void frameworkEvent(FrameworkEvent event);
--- a/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceEvent.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceEvent.d	Sun Nov 08 12:42:30 2009 +0100
@@ -1,8 +1,8 @@
 /*
  * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/ServiceEvent.java,v 1.15 2007/02/20 00:14:12 hargrave Exp $
- * 
+ *
  * Copyright (c) OSGi Alliance (2000, 2007). All Rights Reserved.
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -16,10 +16,14 @@
  * limitations under the License.
  */
 
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
 module org.osgi.framework.ServiceEvent;
-import org.osgi.framework.ServiceReference;
+
+import java.lang.all;
 
-import java.lang.util;
+import org.osgi.framework.ServiceReference; // packageimport
+
 import java.util.EventObject;
 
 /**
@@ -29,10 +33,10 @@
  * <code>ServiceListener</code>s and <code>AllServiceListener</code>s when
  * a change occurs in this service's lifecycle. A type code is used to identify
  * the event type for future extendability.
- * 
+ *
  * <p>
  * OSGi Alliance reserves the right to extend the set of types.
- * 
+ *
  * @Immutable
  * @see ServiceListener
  * @see AllServiceListener
@@ -56,10 +60,10 @@
      * <p>
      * This event is synchronously delivered <strong>after</strong> the service
      * has been registered with the Framework.
-     * 
+     *
      * <p>
      * The value of <code>REGISTERED</code> is 0x00000001.
-     * 
+     *
      * @see BundleContext#registerService(String[],Object,java.util.Dictionary)
      */
     public final static int         REGISTERED          = 0x00000001;
@@ -69,10 +73,10 @@
      * <p>
      * This event is synchronously delivered <strong>after</strong> the service
      * properties have been modified.
-     * 
+     *
      * <p>
      * The value of <code>MODIFIED</code> is 0x00000002.
-     * 
+     *
      * @see ServiceRegistration#setProperties
      */
     public final static int         MODIFIED            = 0x00000002;
@@ -82,17 +86,17 @@
      * <p>
      * This event is synchronously delivered <strong>before</strong> the
      * service has completed unregistering.
-     * 
+     *
      * <p>
      * If a bundle is using a service that is <code>UNREGISTERING</code>, the
      * bundle should release its use of the service when it receives this event.
      * If the bundle does not release its use of the service when it receives
      * this event, the Framework will automatically release the bundle's use of
      * the service while completing the service unregistration operation.
-     * 
+     *
      * <p>
      * The value of UNREGISTERING is 0x00000004.
-     * 
+     *
      * @see ServiceRegistration#unregister
      * @see BundleContext#ungetService
      */
@@ -100,13 +104,13 @@
 
     /**
      * Creates a new service event object.
-     * 
+     *
      * @param type The event type.
      * @param reference A <code>ServiceReference</code> object to the service
      *        that had a lifecycle change.
      */
     public this(int type, ServiceReference reference) {
-        super(cast(Object)reference);
+        super(reference);
         this.reference = reference;
         this.type = type;
     }
@@ -116,7 +120,7 @@
      * lifecycle.
      * <p>
      * This reference is the source of the event.
-     * 
+     *
      * @return Reference to the service that had a lifecycle change.
      */
     public ServiceReference getServiceReference() {
@@ -130,7 +134,7 @@
      * <li>{@link #MODIFIED}
      * <li>{@link #UNREGISTERING}
      * </ul>
-     * 
+     *
      * @return Type of service lifecycle change.
      */
 
--- a/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceListener.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceListener.d	Sun Nov 08 12:42:30 2009 +0100
@@ -1,8 +1,8 @@
 /*
  * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/ServiceListener.java,v 1.15 2007/02/20 00:16:30 hargrave Exp $
- * 
+ *
  * Copyright (c) OSGi Alliance (2000, 2007). All Rights Reserved.
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -16,10 +16,14 @@
  * limitations under the License.
  */
 
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
 module org.osgi.framework.ServiceListener;
-import org.osgi.framework.ServiceEvent;
 
 import java.lang.all;
+
+import org.osgi.framework.ServiceEvent; // packageimport
+
 import java.util.EventListener;
 
 /**
@@ -30,14 +34,14 @@
  * <code>ServiceEvent</code> objects to a <code>ServiceListener</code> out
  * of order and may concurrently call and/or reenter a
  * <code>ServiceListener</code>.
- * 
+ *
  * <p>
  * A <code>ServiceListener</code> object is registered with the Framework
  * using the <code>BundleContext.addServiceListener</code> method.
  * <code>ServiceListener</code> objects are called with a
  * <code>ServiceEvent</code> object when a service is registered, modified, or
  * is in the process of unregistering.
- * 
+ *
  * <p>
  * <code>ServiceEvent</code> object delivery to <code>ServiceListener</code>
  * objects is filtered by the filter specified when the listener was registered.
@@ -46,12 +50,12 @@
  * the listener if the bundle which defines the listener object's class has the
  * appropriate <code>ServicePermission</code> to get the service using at
  * least one of the named classes under which the service was registered.
- * 
+ *
  * <p>
  * <code>ServiceEvent</code> object delivery to <code>ServiceListener</code>
  * objects is further filtered according to package sources as defined in
  * {@link ServiceReference#isAssignableTo(Bundle, String)}.
- * 
+ *
  * @see ServiceEvent
  * @see ServicePermission
  * @ThreadSafe
@@ -61,7 +65,7 @@
 public interface ServiceListener : EventListener {
     /**
      * Receives notification that a service has had a lifecycle change.
-     * 
+     *
      * @param event The <code>ServiceEvent</code> object.
      */
     public void serviceChanged(ServiceEvent event);
--- a/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceReference.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceReference.d	Sun Nov 08 12:42:30 2009 +0100
@@ -1,8 +1,8 @@
 /*
  * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/ServiceReference.java,v 1.20 2007/02/21 16:49:05 hargrave Exp $
- * 
+ *
  * Copyright (c) OSGi Alliance (2000, 2007). All Rights Reserved.
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -16,14 +16,17 @@
  * limitations under the License.
  */
 
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
 module org.osgi.framework.ServiceReference;
-import org.osgi.framework.Bundle;
 
 import java.lang.all;
 
+import org.osgi.framework.Bundle; // packageimport
+
 /**
  * A reference to a service.
- * 
+ *
  * <p>
  * The Framework returns <code>ServiceReference</code> objects from the
  * <code>BundleContext.getServiceReference</code> and
@@ -44,7 +47,7 @@
  * If the same service object is registered multiple times,
  * <code>ServiceReference</code> objects associated with different
  * <code>ServiceRegistration</code> objects are not equal.
- * 
+ *
  * @see BundleContext#getServiceReference
  * @see BundleContext#getServiceReferences
  * @see BundleContext#getService
@@ -57,16 +60,16 @@
      * Returns the property value to which the specified property key is mapped
      * in the properties <code>Dictionary</code> object of the service
      * referenced by this <code>ServiceReference</code> object.
-     * 
+     *
      * <p>
      * Property keys are case-insensitive.
-     * 
+     *
      * <p>
      * This method must continue to return property values after the service has
      * been unregistered. This is so references to unregistered services (for
      * example, <code>ServiceReference</code> objects stored in the log) can
      * still be interrogated.
-     * 
+     *
      * @param key The property key.
      * @return The property value to which the key is mapped; <code>null</code>
      *         if there is no property named after the key.
@@ -77,20 +80,20 @@
      * Returns an array of the keys in the properties <code>Dictionary</code>
      * object of the service referenced by this <code>ServiceReference</code>
      * object.
-     * 
+     *
      * <p>
      * This method will continue to return the keys after the service has been
      * unregistered. This is so references to unregistered services (for
      * example, <code>ServiceReference</code> objects stored in the log) can
      * still be interrogated.
-     * 
+     *
      * <p>
      * This method is <i>case-preserving </i>; this means that every key in the
      * returned array must have the same case as the corresponding key in the
      * properties <code>Dictionary</code> that was passed to the
      * {@link BundleContext#registerService(String[],Object,java.util.Dictionary)}
      * or {@link ServiceRegistration#setProperties} methods.
-     * 
+     *
      * @return An array of property keys.
      */
     public String[] getPropertyKeys();
@@ -98,12 +101,12 @@
     /**
      * Returns the bundle that registered the service referenced by this
      * <code>ServiceReference</code> object.
-     * 
+     *
      * <p>
      * This method must return <code>null</code> when the service has been
      * unregistered. This can be used to determine if the service has been
      * unregistered.
-     * 
+     *
      * @return The bundle that registered the service referenced by this
      *         <code>ServiceReference</code> object; <code>null</code> if
      *         that service has already been unregistered.
@@ -115,12 +118,12 @@
      * Returns the bundles that are using the service referenced by this
      * <code>ServiceReference</code> object. Specifically, this method returns
      * the bundles whose usage count for that service is greater than zero.
-     * 
+     *
      * @return An array of bundles whose usage count for the service referenced
      *         by this <code>ServiceReference</code> object is greater than
      *         zero; <code>null</code> if no bundles are currently using that
      *         service.
-     * 
+     *
      * @since 1.1
      */
     public Bundle[] getUsingBundles();
@@ -142,14 +145,14 @@
      * package source of the specified bundle then return <code>true</code>;
      * otherwise return <code>false</code>.</li>
      * </ol>
-     * 
+     *
      * @param bundle The <code>Bundle</code> object to check.
      * @param className The class name to check.
      * @return <code>true</code> if the bundle which registered the service
      *         referenced by this <code>ServiceReference</code> and the
      *         specified bundle use the same source for the package of the
      *         specified class name. Otherwise <code>false</code> is returned.
-     * 
+     *
      * @since 1.3
      */
     public bool isAssignableTo(Bundle bundle, String className);
@@ -157,7 +160,7 @@
     /**
      * Compares this <code>ServiceReference</code> with the specified
      * <code>ServiceReference</code> for order.
-     * 
+     *
      * <p>
      * If this <code>ServiceReference</code> and the specified
      * <code>ServiceReference</code> have the same
@@ -172,7 +175,7 @@
      * <code>ServiceReference</code> if it has a higher
      * {@link Constants#SERVICE_ID service id} and greater if it has a lower
      * service id.
-     * 
+     *
      * @param reference The <code>ServiceReference</code> to be compared.
      * @return Returns a negative integer, zero, or a positive integer if this
      *         <code>ServiceReference</code> is less than, equal to, or
--- a/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceRegistration.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceRegistration.d	Sun Nov 08 12:42:30 2009 +0100
@@ -1,8 +1,8 @@
 /*
  * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/ServiceRegistration.java,v 1.14 2007/02/21 16:49:05 hargrave Exp $
- * 
+ *
  * Copyright (c) OSGi Alliance (2000, 2007). All Rights Reserved.
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -16,15 +16,19 @@
  * limitations under the License.
  */
 
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
 module org.osgi.framework.ServiceRegistration;
-import org.osgi.framework.ServiceReference;
 
 import java.lang.all;
+
+import org.osgi.framework.ServiceReference; // packageimport
+
 import java.util.Dictionary;
 
 /**
  * A registered service.
- * 
+ *
  * <p>
  * The Framework returns a <code>ServiceRegistration</code> object when a
  * <code>BundleContext.registerService</code> method invocation is successful.
@@ -33,7 +37,7 @@
  * <p>
  * The <code>ServiceRegistration</code> object may be used to update the
  * properties of the service or to unregister the service.
- * 
+ *
  * @see BundleContext#registerService(String[],Object,Dictionary)
  * @ThreadSafe
  * @version $Revision: 1.14 $
@@ -46,7 +50,7 @@
      * <p>
      * The <code>ServiceReference</code> object may be shared with other
      * bundles.
-     * 
+     *
      * @throws java.lang.IllegalStateException If this
      *         <code>ServiceRegistration</code> object has already been
      *         unregistered.
@@ -56,12 +60,12 @@
 
     /**
      * Updates the properties associated with a service.
-     * 
+     *
      * <p>
      * The {@link Constants#OBJECTCLASS} and {@link Constants#SERVICE_ID} keys
      * cannot be modified by this method. These values are set by the Framework
      * when the service is registered in the OSGi environment.
-     * 
+     *
      * <p>
      * The following steps are required to modify service properties:
      * <ol>
@@ -69,12 +73,12 @@
      * <li>A service event of type {@link ServiceEvent#MODIFIED} is
      * fired.
      * </ol>
-     * 
+     *
      * @param properties The properties for this service. See {@link Constants}
      *        for a list of standard service property keys. Changes should not
      *        be made to this object after calling this method. To update the
      *        service's properties this method should be called again.
-     * 
+     *
      * @throws IllegalStateException If this <code>ServiceRegistration</code>
      *         object has already been unregistered.
      * @throws IllegalArgumentException If <code>properties</code> contains
@@ -87,7 +91,7 @@
      * from the Framework service registry. All <code>ServiceReference</code>
      * objects associated with this <code>ServiceRegistration</code> object
      * can no longer be used to interact with the service.
-     * 
+     *
      * <p>
      * The following steps are required to unregister a service:
      * <ol>
@@ -104,7 +108,7 @@
      * <code>ServiceFactory.ungetService</code> method is called to release
      * the service object for the bundle.
      * </ol>
-     * 
+     *
      * @throws java.lang.IllegalStateException If this
      *         <code>ServiceRegistration</code> object has already been
      *         unregistered.
--- a/org.eclipse.osgi/osgi/src/org/osgi/util/tracker/ServiceTracker.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.osgi/osgi/src/org/osgi/util/tracker/ServiceTracker.d	Sun Nov 08 12:42:30 2009 +0100
@@ -1,8 +1,8 @@
 /*
  * $Header: /cvshome/build/org.osgi.util.tracker/src/org/osgi/util/tracker/ServiceTracker.java,v 1.22 2006/07/20 16:14:43 hargrave Exp $
- * 
+ *
  * Copyright (c) OSGi Alliance (2000, 2007). All Rights Reserved.
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -16,21 +16,25 @@
  * limitations under the License.
  */
 
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
 module org.osgi.util.tracker.ServiceTracker;
-import org.osgi.util.tracker.ServiceTrackerCustomizer;
 
 import java.lang.all;
+
+import org.osgi.util.tracker.ServiceTrackerCustomizer; // packageimport
+
 import java.util.ArrayList;
 import java.util.Enumeration;
 import java.util.Hashtable;
 import java.util.LinkedList;
 
-//FIXME tmp remove: import org.eclipse.osgi.framework.internal.core.FilterImpl;
-//FIXME tmp remove: import org.osgi.framework.AllServiceListener;
+import org.eclipse.osgi.framework.internal.core.FilterImpl;
+import org.osgi.framework.AllServiceListener;
 import org.osgi.framework.BundleContext;
-//FIXME tmp remove: import org.osgi.framework.Constants;
+import org.osgi.framework.Constants;
 import org.osgi.framework.Filter;
-//FIXME tmp remove: import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.InvalidSyntaxException;
 import org.osgi.framework.ServiceEvent;
 import org.osgi.framework.ServiceListener;
 import org.osgi.framework.ServiceReference;
@@ -58,7 +62,7 @@
  * <code>ServiceTrackerCustomizer</code> object while holding any locks.
  * <code>ServiceTrackerCustomizer</code> implementations must also be
  * thread-safe.
- * 
+ *
  * @ThreadSafe
  * @version $Revision: 1.29 $
  */
@@ -70,48 +74,8 @@
  */
 
 public class ServiceTracker : ServiceTrackerCustomizer {
-    public this(BundleContext context, ServiceReference reference, ServiceTrackerCustomizer customizer) {
-        implMissing(__FILE__,__LINE__);
-    }
-    public this(BundleContext context, String clazz, ServiceTrackerCustomizer customizer) {
-        implMissing(__FILE__,__LINE__);
-    }
-    public this(BundleContext context, Filter filter, ServiceTrackerCustomizer customizer) {
-        implMissing(__FILE__,__LINE__);
-    }
-    public Object addingService(ServiceReference reference){
-        implMissing(__FILE__,__LINE__);
-        return null;
-    }
-    public void modifiedService(ServiceReference reference, Object service){
-        implMissing(__FILE__,__LINE__);
-    }
-    public void removedService(ServiceReference reference, Object service){
-        implMissing(__FILE__,__LINE__);
-    }
-    public void open() {
-        implMissing(__FILE__,__LINE__);
-    }
-    public void open( bool trackAll) {
-        implMissing(__FILE__,__LINE__);
-    }
-    public synchronized void close() {
-        implMissing(__FILE__,__LINE__);
-    }
-    public Object getService(ServiceReference reference) {
-        implMissing(__FILE__,__LINE__);
-        return null;
-    }
-    public Object getService() {
-        implMissing(__FILE__,__LINE__);
-        return null;
-    }
-}
-//FIXME Dummy class
-/+++
-public class ServiceTracker : ServiceTrackerCustomizer {
-    /* set this to true to compile in debug messages */
-    static final bool                DEBUG           = false;
+    /* set this to true to compile in_ debug_ messages */
+    static final bool               DEBUG           = false;
     /**
      * Bundle context against which this <code>ServiceTracker</code> object is
      * tracking.
@@ -119,7 +83,7 @@
     protected final BundleContext       context;
     /**
      * Filter specifying search criteria for the services to track.
-     * 
+     *
      * @since 1.1
      */
     protected final Filter              filter;
@@ -145,40 +109,40 @@
      * True if no Filter object was supplied in a constructor or we are not
      * using the supplied filter.
      */
-    final bool                       noUserFilter;
+    final bool                      noUserFilter;
     /**
      * Tracked services: <code>ServiceReference</code> object -> customized
      * Object and <code>ServiceListener</code> object
      */
-    private volatile Tracked            tracked;
+    private /+volatile+/ Tracked            tracked;
     /**
      * Modification count. This field is initialized to zero by open, set to -1
      * by close and incremented by modified.
-     * 
+     *
      * This field is volatile since it is accessed by multiple threads.
      */
-    private volatile int                trackingCount   = -1;
+    private /+volatile+/ int                trackingCount   = -1;
     /**
      * Cached ServiceReference for getServiceReference.
-     * 
+     *
      * This field is volatile since it is accessed by multiple threads.
      */
-    private volatile ServiceReference   cachedReference;
+    private /+volatile+/ ServiceReference   cachedReference;
     /**
      * Cached service object for getService.
-     * 
+     *
      * This field is volatile since it is accessed by multiple threads.
      */
-    private volatile Object             cachedService;
+    private /+volatile+/ Object             cachedService;
 
     /**
      * Create a <code>ServiceTracker</code> object on the specified
      * <code>ServiceReference</code> object.
-     * 
+     *
      * <p>
      * The service referenced by the specified <code>ServiceReference</code>
      * object will be tracked by this <code>ServiceTracker</code> object.
-     * 
+     *
      * @param context <code>BundleContext</code> object against which the
      *        tracking is done.
      * @param reference <code>ServiceReference</code> object for the service
@@ -196,8 +160,8 @@
         this.context = context;
         this.trackReference = reference;
         this.trackClass = null;
-        this.customizer = (customizer == null) ? this : customizer;
-        this.listenerFilter = "(&(" + Constants.OBJECTCLASS + "=" + ((String[]) reference.getProperty(Constants.OBJECTCLASS))[0] //$NON-NLS-1$ //$NON-NLS-2$
+        this.customizer = (customizer is null) ? this : customizer;
+        this.listenerFilter = "(&(" + Constants.OBJECTCLASS + "=" + (stringcast( reference.getProperty(Constants.OBJECTCLASS)))[0] //$NON-NLS-1$ //$NON-NLS-2$
                 + ")(" + Constants.SERVICE_ID + "=" + reference.getProperty(Constants.SERVICE_ID).toString() + "))" ; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
         this.noUserFilter = true;
         try {
@@ -214,11 +178,11 @@
     /**
      * Create a <code>ServiceTracker</code> object on the specified class
      * name.
-     * 
+     *
      * <p>
      * Services registered under the specified class name will be tracked by
      * this <code>ServiceTracker</code> object.
-     * 
+     *
      * @param context <code>BundleContext</code> object against which the
      *        tracking is done.
      * @param clazz Class name of the services to be tracked.
@@ -235,7 +199,7 @@
         this.context = context;
         this.trackReference = null;
         this.trackClass = clazz;
-        this.customizer = (customizer == null) ? this : customizer;
+        this.customizer = (customizer is null) ? this : customizer;
         this.listenerFilter = "(" + Constants.OBJECTCLASS + "=" + clazz.toString() + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
         this.noUserFilter = true;
         try {
@@ -252,11 +216,11 @@
     /**
      * Create a <code>ServiceTracker</code> object on the specified
      * <code>Filter</code> object.
-     * 
+     *
      * <p>
      * Services which match the specified <code>Filter</code> object will be
      * tracked by this <code>ServiceTracker</code> object.
-     * 
+     *
      * @param context <code>BundleContext</code> object against which the
      *        tracking is done.
      * @param filter <code>Filter</code> object to select the services to be
@@ -275,24 +239,24 @@
         this.trackReference = null;
 
         // obtain a required objectClass from the user supplied filter
-        if (filter instanceof FilterImpl) {
-            this.trackClass = ((FilterImpl)filter).getRequiredObjectClass();
+        if ( null !is cast(FilterImpl)filter ) {
+            this.trackClass = (cast(FilterImpl)filter).getRequiredObjectClass();
         } else {
             this.trackClass = null;
         }
-        
-        if (this.trackClass != null) {
+
+        if (this.trackClass !is null) {
             this.listenerFilter = FilterImpl.getObjectClassFilterString(this.trackClass);
-            //convert to track by class instead of filter if the user filter is in the form (objectClass=some.Clazz) 
-            this.noUserFilter = this.listenerFilter.equals(filter.toString()); 
+            //convert to track by class instead of filter if the user filter is in the form (objectClass=some.Clazz)
+            this.noUserFilter = this.listenerFilter.opEquals(filter.toString());
         } else {
             this.listenerFilter = null;
             this.noUserFilter = false;
         }
 
         this.filter = filter;
-        this.customizer = (customizer == null) ? this : customizer;
-        if ((context == null) || (filter == null)) { // we throw a NPE here
+        this.customizer = (customizer is null) ? this : customizer;
+        if ((context is null) || (filter is null)) { // we throw a NPE here
             // to
             // be consistent with the
             // other constructors
@@ -303,14 +267,14 @@
     /**
      * Open this <code>ServiceTracker</code> object and begin tracking
      * services.
-     * 
+     *
      * <p>
      * This method calls <code>open(false)</code>.
-     * 
+     *
      * @throws java.lang.IllegalStateException if the <code>BundleContext</code>
      *         object with which this <code>ServiceTracker</code> object was
      *         created is no longer valid.
-     * @see #open(bool)
+     * @see #open(boolean)
      */
     public void open() {
         open(false);
@@ -319,12 +283,12 @@
     /**
      * Open this <code>ServiceTracker</code> object and begin tracking
      * services.
-     * 
+     *
      * <p>
      * Services which match the search criteria specified when this
      * <code>ServiceTracker</code> object was created are now tracked by this
      * <code>ServiceTracker</code> object.
-     * 
+     *
      * @param trackAllServices If <code>true</code>, then this
      *        <code>ServiceTracker</code> will track all matching services
      *        regardless of class loader accessibility. If <code>false</code>,
@@ -338,11 +302,11 @@
      * @since 1.3
      */
     public synchronized void open(bool trackAllServices) {
-        if (tracked != null) {
+        if (tracked !is null) {
             return;
         }
         if (DEBUG) {
-            System.out.println("ServiceTracker.open: " + filter); //$NON-NLS-1$
+            System.out_.println("ServiceTracker.open: " + filter); //$NON-NLS-1$
         }
         tracked = trackAllServices ? new AllTracked() : new Tracked();
         trackingCount = 0;
@@ -350,16 +314,16 @@
             try {
                 context.addServiceListener(tracked, listenerFilter);
                 ServiceReference[] references;
-                
-                if (trackReference != null) { // tracking a single reference 
-                    references = new ServiceReference[] {trackReference};
+
+                if (trackReference !is null) { // tracking a single reference
+                    references = [ cast(ServiceReference)trackReference];
                 }
                 else { // tracking a set of references
                     references = getInitialReferences(trackAllServices, trackClass,
                             noUserFilter ? null: filter.toString());
                 }
 
-                tracked.setInitialServices(references); // set tracked with
+                tracked.setInitialServices(references); // set tracked with_
                 // the initial
                 // references
             }
@@ -375,7 +339,7 @@
     /**
      * Returns the list of initial <code>ServiceReference</code> objects that
      * will be tracked by this <code>ServiceTracker</code> object.
-     * 
+     *
      * @param trackAllServices If true, use getAllServiceReferences.
      * @param trackClass the class name with which the service was registered,
      *        or null for all services.
@@ -384,8 +348,7 @@
      * @throws InvalidSyntaxException if the filter uses an invalid syntax.
      */
     private ServiceReference[] getInitialReferences(bool trackAllServices,
-            String trackClass, String filterString)
-            throws InvalidSyntaxException {
+            String trackClass, String filterString) {
         if (trackAllServices) {
             return context.getAllServiceReferences(trackClass, filterString);
         }
@@ -396,17 +359,17 @@
 
     /**
      * Close this <code>ServiceTracker</code> object.
-     * 
+     *
      * <p>
      * This method should be called when this <code>ServiceTracker</code>
      * object should end the tracking of services.
      */
     public synchronized void close() {
-        if (tracked == null) {
+        if (tracked is null) {
             return;
         }
         if (DEBUG) {
-            System.out.println("ServiceTracker.close: " + filter); //$NON-NLS-1$
+            System.out_.println("ServiceTracker.close: " + filter); //$NON-NLS-1$
         }
         tracked.close();
         ServiceReference[] references = getServiceReferences();
@@ -418,15 +381,15 @@
         catch (IllegalStateException e) {
             /* In case the context was stopped. */
         }
-        if (references != null) {
-            for (int i = 0; i < references.length; i++) {
+        if (references !is null) {
+            for (int i = 0; i < references.length_; i++) {
                 outgoing.untrack(references[i]);
             }
         }
         trackingCount = -1;
         if (DEBUG) {
-            if ((cachedReference == null) && (cachedService == null)) {
-                System.out
+            if ((cachedReference is null) && (cachedService is null)) {
+                System.out_
                         .println("ServiceTracker.close[cached cleared]: " + filter); //$NON-NLS-1$
             }
         }
@@ -435,12 +398,12 @@
     /**
      * Default implementation of the
      * <code>ServiceTrackerCustomizer.addingService</code> method.
-     * 
+     *
      * <p>
      * This method is only called when this <code>ServiceTracker</code> object
      * has been constructed with a <code>null ServiceTrackerCustomizer</code>
      * argument.
-     * 
+     *
      * The default implementation returns the result of calling
      * <code>getService</code>, on the <code>BundleContext</code> object
      * with which this <code>ServiceTracker</code> object was created, passing
@@ -450,7 +413,7 @@
      * object to be tracked for the service being added. In that case, take care
      * not to rely on the default implementation of removedService that will
      * unget the service.
-     * 
+     *
      * @param reference Reference to service being added to this
      *        <code>ServiceTracker</code> object.
      * @return The service object to be tracked for the service added to this
@@ -464,14 +427,14 @@
     /**
      * Default implementation of the
      * <code>ServiceTrackerCustomizer.modifiedService</code> method.
-     * 
+     *
      * <p>
      * This method is only called when this <code>ServiceTracker</code> object
      * has been constructed with a <code>null ServiceTrackerCustomizer</code>
      * argument.
-     * 
+     *
      * The default implementation does nothing.
-     * 
+     *
      * @param reference Reference to modified service.
      * @param service The service object for the modified service.
      * @see ServiceTrackerCustomizer
@@ -482,12 +445,12 @@
     /**
      * Default implementation of the
      * <code>ServiceTrackerCustomizer.removedService</code> method.
-     * 
+     *
      * <p>
      * This method is only called when this <code>ServiceTracker</code> object
      * has been constructed with a <code>null ServiceTrackerCustomizer</code>
      * argument.
-     * 
+     *
      * The default implementation calls <code>ungetService</code>, on the
      * <code>BundleContext</code> object with which this
      * <code>ServiceTracker</code> object was created, passing the specified
@@ -496,7 +459,7 @@
      * This method can be overridden in a subclass. If the default
      * implementation of <code>addingService</code> method was used, this
      * method must unget the service.
-     * 
+     *
      * @param reference Reference to removed service.
      * @param service The service object for the removed service.
      * @see ServiceTrackerCustomizer
@@ -513,7 +476,7 @@
      * during the calling of the <code>BundleActivator</code> methods.
      * <code>BundleActivator</code> methods are expected to complete in a
      * short period of time.
-     * 
+     *
      * @param timeout time interval in milliseconds to wait. If zero, the method
      *        will wait indefinately.
      * @return Returns the result of <code>getService()</code>.
@@ -521,21 +484,21 @@
      *         current thread.
      * @throws IllegalArgumentException If the value of timeout is negative.
      */
-    public Object waitForService(long timeout) throws InterruptedException {
+    public Object waitForService(long timeout) {
         if (timeout < 0) {
-            throw new IllegalArgumentException("timeout value is negative"); //$NON-NLS-1$
+            throw new IllegalArgumentException("timeout value is_ negative"); //$NON-NLS-1$
         }
         Object object = getService();
-        while (object == null) {
+        while (object is null) {
             Tracked tracked = this.tracked; /*
                                              * use local var since we are not
                                              * synchronized
                                              */
-            if (tracked == null) { /* if ServiceTracker is not open */
+            if (tracked is null) { /* if ServiceTracker is_ not open */
                 return null;
             }
             synchronized (tracked) {
-                if (tracked.size() == 0) {
+                if (tracked.size() is 0) {
                     tracked.wait(timeout);
                 }
             }
@@ -550,7 +513,7 @@
     /**
      * Return an array of <code>ServiceReference</code> objects for all
      * services being tracked by this <code>ServiceTracker</code> object.
-     * 
+     *
      * @return Array of <code>ServiceReference</code> objects or
      *         <code>null</code> if no service are being tracked.
      */
@@ -559,18 +522,18 @@
                                          * use local var since we are not
                                          * synchronized
                                          */
-        if (tracked == null) { /* if ServiceTracker is not open */
+        if (tracked is null) { /* if ServiceTracker is_ not open */
             return null;
         }
         synchronized (tracked) {
-            int length = tracked.size();
-            if (length == 0) {
+            int length_ = tracked.size();
+            if (length_ is 0) {
                 return null;
             }
-            ServiceReference[] references = new ServiceReference[length];
+            ServiceReference[] references = new ServiceReference[length_];
             Enumeration keys = tracked.keys();
-            for (int i = 0; i < length; i++) {
-                references[i] = (ServiceReference) keys.nextElement();
+            for (int i = 0; i < length_; i++) {
+                references[i] = cast(ServiceReference) keys.nextElement();
             }
             return references;
         }
@@ -579,12 +542,12 @@
     /**
      * Returns a <code>ServiceReference</code> object for one of the services
      * being tracked by this <code>ServiceTracker</code> object.
-     * 
+     *
      * <p>
      * If multiple services are being tracked, the service with the highest
      * ranking (as specified in its <code>service.ranking</code> property) is
      * returned.
-     * 
+     *
      * <p>
      * If there is a tie in ranking, the service with the lowest service ID (as
      * specified in its <code>service.id</code> property); that is, the
@@ -592,39 +555,39 @@
      * <p>
      * This is the same algorithm used by
      * <code>BundleContext.getServiceReference</code>.
-     * 
+     *
      * @return <code>ServiceReference</code> object or <code>null</code> if
      *         no service is being tracked.
      * @since 1.1
      */
     public ServiceReference getServiceReference() {
         ServiceReference reference = cachedReference;
-        if (reference != null) {
+        if (reference !is null) {
             if (DEBUG) {
-                System.out
+                System.out_
                         .println("ServiceTracker.getServiceReference[cached]: " + filter); //$NON-NLS-1$
             }
             return reference;
         }
         if (DEBUG) {
-            System.out.println("ServiceTracker.getServiceReference: " + filter); //$NON-NLS-1$
+            System.out_.println("ServiceTracker.getServiceReference: " + filter); //$NON-NLS-1$
         }
         ServiceReference[] references = getServiceReferences();
-        int length = (references == null) ? 0 : references.length;
-        if (length == 0) /* if no service is being tracked */
+        int length_ = (references is null) ? 0 : references.length_;
+        if (length_ is 0) /* if no service is_ being tracked */
         {
             return null;
         }
         int index = 0;
-        if (length > 1) /* if more than one service, select highest ranking */
+        if (length_ > 1) /* if more than one service, select highest ranking */
         {
-            int rankings[] = new int[length];
+            int rankings[] = new int[length_];
             int count = 0;
             int maxRanking = Integer.MIN_VALUE;
-            for (int i = 0; i < length; i++) {
+            for (int i = 0; i < length_; i++) {
                 Object property = references[i]
                         .getProperty(Constants.SERVICE_RANKING);
-                int ranking = (property instanceof Integer) ? ((Integer) property)
+                int ranking = ( null !is cast(Integer)property ) ? (cast(Integer) property)
                         .intValue()
                         : 0;
                 rankings[i] = ranking;
@@ -634,7 +597,7 @@
                     count = 1;
                 }
                 else {
-                    if (ranking == maxRanking) {
+                    if (ranking is maxRanking) {
                         count++;
                     }
                 }
@@ -642,9 +605,9 @@
             if (count > 1) /* if still more than one service, select lowest id */
             {
                 long minId = Long.MAX_VALUE;
-                for (int i = 0; i < length; i++) {
-                    if (rankings[i] == maxRanking) {
-                        long id = ((Long) (references[i]
+                for (int i = 0; i < length_; i++) {
+                    if (rankings[i] is maxRanking) {
+                        long id = (cast(Long) (references[i]
                                 .getProperty(Constants.SERVICE_ID)))
                                 .longValue();
                         if (id < minId) {
@@ -662,7 +625,7 @@
      * Returns the service object for the specified
      * <code>ServiceReference</code> object if the referenced service is being
      * tracked by this <code>ServiceTracker</code> object.
-     * 
+     *
      * @param reference Reference to the desired service.
      * @return Service object or <code>null</code> if the service referenced
      *         by the specified <code>ServiceReference</code> object is not
@@ -673,7 +636,7 @@
                                          * use local var since we are not
                                          * synchronized
                                          */
-        if (tracked == null) { /* if ServiceTracker is not open */
+        if (tracked is null) { /* if ServiceTracker is_ not open */
             return null;
         }
         synchronized (tracked) {
@@ -684,7 +647,7 @@
     /**
      * Return an array of service objects for all services being tracked by this
      * <code>ServiceTracker</code> object.
-     * 
+     *
      * @return Array of service objects or <code>null</code> if no service are
      *         being tracked.
      */
@@ -693,17 +656,17 @@
                                          * use local var since we are not
                                          * synchronized
                                          */
-        if (tracked == null) { /* if ServiceTracker is not open */
+        if (tracked is null) { /* if ServiceTracker is_ not open */
             return null;
         }
         synchronized (tracked) {
             ServiceReference[] references = getServiceReferences();
-            int length = (references == null) ? 0 : references.length;
-            if (length == 0) {
+            int length_ = (references is null) ? 0 : references.length_;
+            if (length_ is 0) {
                 return null;
             }
-            Object[] objects = new Object[length];
-            for (int i = 0; i < length; i++) {
+            Object[] objects = new Object[length_];
+            for (int i = 0; i < length_; i++) {
                 objects[i] = getService(references[i]);
             }
             return objects;
@@ -713,28 +676,28 @@
     /**
      * Returns a service object for one of the services being tracked by this
      * <code>ServiceTracker</code> object.
-     * 
+     *
      * <p>
      * If any services are being tracked, this method returns the result of
      * calling <code>getService(getServiceReference())</code>.
-     * 
+     *
      * @return Service object or <code>null</code> if no service is being
      *         tracked.
      */
     public Object getService() {
         Object service = cachedService;
-        if (service != null) {
+        if (service !is null) {
             if (DEBUG) {
-                System.out
+                System.out_
                         .println("ServiceTracker.getService[cached]: " + filter); //$NON-NLS-1$
             }
             return service;
         }
         if (DEBUG) {
-            System.out.println("ServiceTracker.getService: " + filter); //$NON-NLS-1$
+            System.out_.println("ServiceTracker.getService: " + filter); //$NON-NLS-1$
         }
         ServiceReference reference = getServiceReference();
-        if (reference == null) {
+        if (reference is null) {
             return null;
         }
         return cachedService = getService(reference);
@@ -742,12 +705,12 @@
 
     /**
      * Remove a service from this <code>ServiceTracker</code> object.
-     * 
+     *
      * The specified service will be removed from this
      * <code>ServiceTracker</code> object. If the specified service was being
      * tracked then the <code>ServiceTrackerCustomizer.removedService</code>
      * method will be called for that service.
-     * 
+     *
      * @param reference Reference to the service to be removed.
      */
     public void remove(ServiceReference reference) {
@@ -755,7 +718,7 @@
                                          * use local var since we are not
                                          * synchronized
                                          */
-        if (tracked == null) { /* if ServiceTracker is not open */
+        if (tracked is null) { /* if ServiceTracker is_ not open */
             return;
         }
         tracked.untrack(reference);
@@ -764,7 +727,7 @@
     /**
      * Return the number of services being tracked by this
      * <code>ServiceTracker</code> object.
-     * 
+     *
      * @return Number of services being tracked.
      */
     public int size() {
@@ -772,7 +735,7 @@
                                          * use local var since we are not
                                          * synchronized
                                          */
-        if (tracked == null) { /* if ServiceTracker is not open */
+        if (tracked is null) { /* if ServiceTracker is_ not open */
             return 0;
         }
         return tracked.size();
@@ -780,12 +743,12 @@
 
     /**
      * Returns the tracking count for this <code>ServiceTracker</code> object.
-     * 
+     *
      * The tracking count is initialized to 0 when this
      * <code>ServiceTracker</code> object is opened. Every time a service is
      * added, modified or removed from this <code>ServiceTracker</code> object
      * the tracking count is incremented.
-     * 
+     *
      * <p>
      * The tracking count can be used to determine if this
      * <code>ServiceTracker</code> object has added, modified or removed a
@@ -794,7 +757,7 @@
      * service has been added, modified or removed from this
      * <code>ServiceTracker</code> object since the previous tracking count
      * was collected.
-     * 
+     *
      * @since 1.2
      * @return The tracking count for this <code>ServiceTracker</code> object
      *         or -1 if this <code>ServiceTracker</code> object is not open.
@@ -806,7 +769,7 @@
     /**
      * Called by the Tracked object whenever the set of tracked services is
      * modified. Increments the tracking count and clears the cache.
-     * 
+     *
      * @GuardedBy tracked
      */
     /*
@@ -819,7 +782,7 @@
         cachedReference = null; /* clear cached value */
         cachedService = null; /* clear cached value */
         if (DEBUG) {
-            System.out.println("ServiceTracker.modified: " + filter); //$NON-NLS-1$
+            System.out_.println("ServiceTracker.modified: " + filter); //$NON-NLS-1$
         }
     }
 
@@ -832,10 +795,10 @@
      * object for the tracker. This class is used to synchronize access to the
      * tracked services. This is not a public class. It is only for use by the
      * implementation of the <code>ServiceTracker</code> class.
-     * 
+     *
      * @ThreadSafe
      */
-    class Tracked extends Hashtable implements ServiceListener {
+    class Tracked : Hashtable , ServiceListener {
         static final long           serialVersionUID    = -7420065199791006079L;
         /**
          * List of ServiceReferences in the process of being added. This is used
@@ -845,22 +808,22 @@
          * service to be unregistered, notification to the nested call to
          * untrack that the service was unregistered can be made to the track
          * method.
-         * 
+         *
          * Since the ArrayList implementation is not synchronized, all access to
          * this list must be protected by the same synchronized object for
          * thread-safety.
-         * 
+         *
          * @GuardedBy this
          */
         private final ArrayList     adding;
 
         /**
          * true if the tracked object is closed.
-         * 
+         *
          * This field is volatile because it is set by one thread and read by
          * another.
          */
-        private volatile bool    closed;
+        private /+volatile+/ bool   closed;
 
         /**
          * Initial list of ServiceReferences for the tracker. This is used to
@@ -869,15 +832,15 @@
          * initial set of tracked services are not "announced" by ServiceEvents
          * and therefore the ServiceEvent for unregistration could be delivered
          * before we track the service.
-         * 
+         *
          * A service must not be in both the initial and adding lists at the
          * same time. A service must be moved from the initial list to the
          * adding list "atomically" before we begin tracking it.
-         * 
+         *
          * Since the LinkedList implementation is not synchronized, all access
          * to this list must be protected by the same synchronized object for
          * thread-safety.
-         * 
+         *
          * @GuardedBy this
          */
         private final LinkedList    initial;
@@ -885,7 +848,7 @@
         /**
          * Tracked constructor.
          */
-        protected Tracked() {
+        protected this() {
             super();
             closed = false;
             adding = new ArrayList(6);
@@ -895,22 +858,22 @@
         /**
          * Set initial list of services into tracker before ServiceEvents begin
          * to be received.
-         * 
+         *
          * This method must be called from ServiceTracker.open while
          * synchronized on this object in the same synchronized block as the
          * addServiceListener call.
-         * 
+         *
          * @param references The initial list of services to be tracked.
          * @GuardedBy this
          */
         protected void setInitialServices(ServiceReference[] references) {
-            if (references == null) {
+            if (references is null) {
                 return;
             }
-            int size = references.length;
+            int size = references.length_;
             for (int i = 0; i < size; i++) {
                 if (DEBUG) {
-                    System.out
+                    System.out_
                             .println("ServiceTracker.Tracked.setInitialServices: " + references[i]); //$NON-NLS-1$
                 }
                 initial.add(references[i]);
@@ -920,16 +883,16 @@
         /**
          * Track the initial list of services. This is called after
          * ServiceEvents can begin to be received.
-         * 
+         *
          * This method must be called from ServiceTracker.open while not
          * synchronized on this object after the addServiceListener call.
-         * 
+         *
          */
         protected void trackInitialServices() {
             while (true) {
                 ServiceReference reference;
                 synchronized (this) {
-                    if (initial.size() == 0) {
+                    if (initial.size() is 0) {
                         /*
                          * if there are no more inital services
                          */
@@ -939,11 +902,11 @@
                      * move the first service from the initial list to the
                      * adding list within this synchronized block.
                      */
-                    reference = (ServiceReference) initial.removeFirst();
-                    if (this.get(reference) != null) {
+                    reference = cast(ServiceReference) initial.removeFirst();
+                    if (this.get(reference) !is null) {
                         /* if we are already tracking this service */
                         if (DEBUG) {
-                            System.out
+                            System.out_
                                     .println("ServiceTracker.Tracked.trackInitialServices[already tracked]: " + reference); //$NON-NLS-1$
                         }
                         continue; /* skip this service */
@@ -954,7 +917,7 @@
                          * added.
                          */
                         if (DEBUG) {
-                            System.out
+                            System.out_
                                     .println("ServiceTracker.Tracked.trackInitialServices[already adding]: " + reference); //$NON-NLS-1$
                         }
                         continue; /* skip this service */
@@ -962,7 +925,7 @@
                     adding.add(reference);
                 }
                 if (DEBUG) {
-                    System.out
+                    System.out_
                             .println("ServiceTracker.Tracked.trackInitialServices: " + reference); //$NON-NLS-1$
                 }
                 trackAdding(reference); /*
@@ -985,7 +948,7 @@
          * <code>ServiceListener</code> method for the
          * <code>ServiceTracker</code> class. This method must NOT be
          * synchronized to avoid deadlock potential.
-         * 
+         *
          * @param event <code>ServiceEvent</code> object from the framework.
          */
         public void serviceChanged(ServiceEvent event) {
@@ -998,7 +961,7 @@
             }
             ServiceReference reference = event.getServiceReference();
             if (DEBUG) {
-                System.out
+                System.out_
                         .println("ServiceTracker.Tracked.serviceChanged[" + event.getType() + "]: " + reference); //$NON-NLS-1$ //$NON-NLS-2$
             }
 
@@ -1041,7 +1004,7 @@
 
         /**
          * Begin to track the referenced service.
-         * 
+         *
          * @param reference Reference to a service to be tracked.
          */
         private void track(ServiceReference reference) {
@@ -1049,10 +1012,10 @@
             synchronized (this) {
                 object = this.get(reference);
             }
-            if (object != null) /* we are already tracking the service */
+            if (object !is null) /* we are already tracking the service */
             {
                 if (DEBUG) {
-                    System.out
+                    System.out_
                             .println("ServiceTracker.Tracked.track[modified]: " + reference); //$NON-NLS-1$
                 }
                 synchronized (this) {
@@ -1073,12 +1036,12 @@
                                                      * being added.
                                                      */
                     if (DEBUG) {
-                        System.out
+                        System.out_
                                 .println("ServiceTracker.Tracked.track[already adding]: " + reference); //$NON-NLS-1$
                     }
                     return;
                 }
-                adding.add(reference); /* mark this service is being added */
+                adding.add(reference); /* mark this service is_ being added */
             }
 
             trackAdding(reference); /*
@@ -1091,12 +1054,12 @@
          * Common logic to add a service to the tracker used by track and
          * trackInitialServices. The specified reference must have been placed
          * in the adding list before calling this method.
-         * 
+         *
          * @param reference Reference to a service to be tracked.
          */
         private void trackAdding(ServiceReference reference) {
             if (DEBUG) {
-                System.out
+                System.out_
                         .println("ServiceTracker.Tracked.trackAdding: " + reference); //$NON-NLS-1$
             }
             Object object = null;
@@ -1116,7 +1079,7 @@
                                                      * untracked during the
                                                      * customizer callback
                                                      */
-                        if (object != null) {
+                        if (object !is null) {
                             this.put(reference, object);
                             modified(); /* increment modification count */
                             notifyAll(); /*
@@ -1135,7 +1098,7 @@
              */
             if (becameUntracked) {
                 if (DEBUG) {
-                    System.out
+                    System.out_
                             .println("ServiceTracker.Tracked.trackAdding[removed]: " + reference); //$NON-NLS-1$
                 }
                 /* Call customizer outside of synchronized region */
@@ -1149,7 +1112,7 @@
 
         /**
          * Discontinue tracking the referenced service.
-         * 
+         *
          * @param reference Reference to the tracked service.
          */
         protected void untrack(ServiceReference reference) {
@@ -1162,7 +1125,7 @@
                                                      * process
                                                      */
                     if (DEBUG) {
-                        System.out
+                        System.out_
                                 .println("ServiceTracker.Tracked.untrack[removed from initial]: " + reference); //$NON-NLS-1$
                     }
                     return; /*
@@ -1176,7 +1139,7 @@
                                                  * process of being added
                                                  */
                     if (DEBUG) {
-                        System.out
+                        System.out_
                                 .println("ServiceTracker.Tracked.untrack[being added]: " + reference); //$NON-NLS-1$
                     }
                     return; /*
@@ -1189,13 +1152,13 @@
                                                      * before calling customizer
                                                      * callback
                                                      */
-                if (object == null) { /* are we actually tracking the service */
+                if (object is null) { /* are we actually tracking the service */
                     return;
                 }
                 modified(); /* increment modification count */
             }
             if (DEBUG) {
-                System.out
+                System.out_
                         .println("ServiceTracker.Tracked.untrack[removed]: " + reference); //$NON-NLS-1$
             }
             /* Call customizer outside of synchronized region */
@@ -1210,21 +1173,18 @@
     /**
      * Subclass of Tracked which implements the AllServiceListener interface.
      * This class is used by the ServiceTracker if open is called with true.
-     * 
+     *
      * @since 1.3
      * @ThreadSafe
      */
-    class AllTracked extends Tracked implements AllServiceListener {
+    class AllTracked : Tracked , AllServiceListener {
         static final long   serialVersionUID    = 4050764875305137716L;
 
         /**
          * AllTracked constructor.
          */
-        protected AllTracked() {
+        protected this() {
             super();
         }
     }
 }
-+++/
-
-
--- a/org.eclipse.osgi/osgi/src/org/osgi/util/tracker/ServiceTrackerCustomizer.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.osgi/osgi/src/org/osgi/util/tracker/ServiceTrackerCustomizer.d	Sun Nov 08 12:42:30 2009 +0100
@@ -1,8 +1,8 @@
 /*
  * $Header: /cvshome/build/org.osgi.util.tracker/src/org/osgi/util/tracker/ServiceTrackerCustomizer.java,v 1.13 2007/02/19 19:04:33 hargrave Exp $
- * 
+ *
  * Copyright (c) OSGi Alliance (2000, 2007). All Rights Reserved.
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -16,9 +16,13 @@
  * limitations under the License.
  */
 
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
 module org.osgi.util.tracker.ServiceTrackerCustomizer;
 
 import java.lang.all;
+
+
 import org.osgi.framework.ServiceReference;
 
 /**
@@ -30,7 +34,7 @@
  * tracked service. The <code>ServiceTrackerCustomizer</code> object is also
  * called when a tracked service is modified or has been removed from the
  * <code>ServiceTracker</code> object.
- * 
+ *
  * <p>
  * The methods in this interface may be called as the result of a
  * <code>ServiceEvent</code> being received by a <code>ServiceTracker</code>
@@ -40,20 +44,20 @@
  * <code>ServiceRegistration.setProperties</code>) or unregister (
  * <code>ServiceRegistration.unregister</code>) a service while being
  * synchronized on any object.
- * 
+ *
  * <p>
  * The <code>ServiceTracker</code> class is thread-safe. It does not call a
  * <code>ServiceTrackerCustomizer</code> object while holding any locks.
  * <code>ServiceTrackerCustomizer</code> implementations must also be
  * thread-safe.
- * 
+ *
  * @ThreadSafe
  * @version $Revision: 1.13 $
  */
 public interface ServiceTrackerCustomizer {
     /**
      * A service is being added to the <code>ServiceTracker</code> object.
-     * 
+     *
      * <p>
      * This method is called before a service which matched the search
      * parameters of the <code>ServiceTracker</code> object is added to it.
@@ -61,7 +65,7 @@
      * <code>ServiceReference</code> object. The returned service object is
      * stored in the <code>ServiceTracker</code> object and is available from
      * the <code>getService</code> and <code>getServices</code> methods.
-     * 
+     *
      * @param reference Reference to service being added to the
      *        <code>ServiceTracker</code> object.
      * @return The service object to be tracked for the
@@ -73,11 +77,11 @@
     /**
      * A service tracked by the <code>ServiceTracker</code> object has been
      * modified.
-     * 
+     *
      * <p>
      * This method is called when a service being tracked by the
      * <code>ServiceTracker</code> object has had it properties modified.
-     * 
+     *
      * @param reference Reference to service that has been modified.
      * @param service The service object for the modified service.
      */
@@ -86,11 +90,11 @@
     /**
      * A service tracked by the <code>ServiceTracker</code> object has been
      * removed.
-     * 
+     *
      * <p>
      * This method is called after a service is no longer being tracked by the
      * <code>ServiceTracker</code> object.
-     * 
+     *
      * @param reference Reference to service that has been removed.
      * @param service The service object for the removed service.
      */
--- a/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/log/FrameworkLog.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/log/FrameworkLog.d	Sun Nov 08 12:42:30 2009 +0100
@@ -4,16 +4,20 @@
  * 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:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
 module org.eclipse.osgi.framework.log.FrameworkLog;
-import org.eclipse.osgi.framework.log.FrameworkLogEntry;
 
 import java.lang.all;
+
+import org.eclipse.osgi.framework.log.FrameworkLogEntry; // packageimport
+
 import java.io.File;
-//import java.io.IOException;
+import java.io.IOException;
 import java.io.Writer;
 
 import org.osgi.framework.FrameworkEvent;
@@ -21,18 +25,18 @@
 /**
  * The FramworkLog interface.  A FrameworkLog implementation is provided by the
  * FrameworkAdaptor and used by the Framework to log any error messages and
- * FrameworkEvents of type ERROR.  The FrameworkLog may persist the log messages 
+ * FrameworkEvents of type ERROR.  The FrameworkLog may persist the log messages
  * to the filesystem or allow other ways of accessing the log information.
  * @since 3.1
  * @noimplement This interface is not intended to be implemented by clients.
  */
 public interface FrameworkLog {
     /**
-     * A service lookup constant (value "performance") indicating an 
-     * implementation of the logging service that logs performance events. 
-     * Create a filter with this property set to <code>"true"</code> in order to 
+     * A service lookup constant (value "performance") indicating an
+     * implementation of the logging service that logs performance events.
+     * Create a filter with this property set to <code>"true"</code> in order to
      * obtain a performance log.
-     * 
+     *
      * @since 3.1
      */
     public static final String SERVICE_PERFORMANCE = "performance"; //$NON-NLS-1$
@@ -52,28 +56,28 @@
     /**
      * Sets the current Writer used to log messages to the specified
      * newWriter.  If append is set to true then the content
-     * of the current Writer will be appended to the new Writer 
+     * of the current Writer will be appended to the new Writer
      * if possible.
-     * @param newWriter The Writer to use for logging messages. 
+     * @param newWriter The Writer to use for logging messages.
      * @param append Indicates whether the content of the current Writer
-     * used for logging messages should be appended to the end of the new 
+     * used for logging messages should be appended to the end of the new
      * Writer.
      */
     public void setWriter(Writer newWriter, bool append);
 
-    /** 
+    /**
      * Sets the current File used to log messages to a FileWriter
-     * using the specified File.  If append is set to true then the 
-     * content of the current Writer will be appended to the 
+     * using the specified File.  If append is set to true then the
+     * content of the current Writer will be appended to the
      * new File if possible.
      * @param newFile The File to create a new FileWriter which will be
      * used for logging messages.
      * @param append Indicates whether the content of the current Writer
-     * used for logging messages should be appended to the end of the new 
+     * used for logging messages should be appended to the end of the new
      * File.
      * @throws IOException if any problem occurs while constructing a
-     * FileWriter from the newFile.  If this exception is thrown the 
-     * FrameworkLog will not be effected and will continue to use the 
+     * FileWriter from the newFile.  If this exception is thrown the
+     * FrameworkLog will not be effected and will continue to use the
      * current Writer to log messages.
      */
     public void setFile(File newFile, bool append) ;
--- a/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/log/FrameworkLogEntry.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/log/FrameworkLogEntry.d	Sun Nov 08 12:42:30 2009 +0100
@@ -4,15 +4,18 @@
  * 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:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
 module org.eclipse.osgi.framework.log.FrameworkLogEntry;
 
 import java.lang.all;
 
+
 /**
  * A framework log entry used to log information to a FrameworkLog
  * @since 3.1
@@ -26,21 +29,21 @@
      */
     public static final int OK = 0;
 
-    /** 
+    /**
      * Severity constant (bit mask, value 1) indicating this log entry is informational only.
      * @see #getSeverity()
      * @since 3.2
      */
     public static final int INFO = 0x01;
 
-    /** 
+    /**
      * Severity constant (bit mask, value 2) indicating this log entry represents a warning.
      * @see #getSeverity()
      * @since 3.2
      */
     public static final int WARNING = 0x02;
 
-    /** 
+    /**
      * Severity constant (bit mask, value 4) indicating this log entry represents an error.
      * @see #getSeverity()
      * @since 3.2
@@ -56,7 +59,7 @@
 
     // It would be nice to rename some of these fields but we cannot change the getter method
     // names without breaking clients.  Changing only the field names would be confusing.
-    //TODO "entry" has another meaning here - title, summary, tag are better names 
+    //TODO "entry" has another meaning here - title, summary, tag are better names
     private String entry;
     private String message;
     //TODO get rid of this
@@ -105,7 +108,7 @@
     }
 
     /**
-     * 
+     *
      * @return Returns the children.
      */
     public FrameworkLogEntry[] getChildren() {
@@ -155,7 +158,7 @@
      * no children.
      * </p>
      *
-     * @return the severity: one of <code>OK</code>, <code>ERROR</code>, 
+     * @return the severity: one of <code>OK</code>, <code>ERROR</code>,
      * <code>INFO</code>, <code>WARNING</code>,  or <code>CANCEL</code>
      * @since 3.2
      */
--- a/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/NLS.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/NLS.d	Sun Nov 08 12:42:30 2009 +0100
@@ -7,28 +7,29 @@
  *
  * Contributors:
  *     IBM - Initial API and implementation
- * Port to the D programming language:
- *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
 module org.eclipse.osgi.util.NLS;
 
 import java.lang.all;
 
-// import java.io.IOException;
-// import java.io.InputStream;
-// import java.lang.reflect.Field;
-// import java.lang.reflect.Modifier;
-// import java.security.AccessController;
-// import java.security.PrivilegedAction;
-// import java.util.ArrayList;
-// import java.util.HashMap;
-// import java.util.Locale;
-// import java.util.Map;
-// import java.util.Properties;
-//
-// import org.eclipse.osgi.framework.debug.Debug;
-// import org.eclipse.osgi.framework.log.FrameworkLog;
-// import org.eclipse.osgi.framework.log.FrameworkLogEntry;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Properties;
+
+import org.eclipse.osgi.framework.debug_.Debug;
+import org.eclipse.osgi.framework.log.FrameworkLog;
+import org.eclipse.osgi.framework.log.FrameworkLogEntry;
 
 /**
  * Common superclass for all message bundle classes.  Provides convenience
@@ -60,28 +61,28 @@
  */
 public abstract class NLS {
 
-//     private static final Object[] EMPTY_ARGS = new Object[0];
-//     private static final String EXTENSION = ".properties"; //$NON-NLS-1$
-//     private static String[] nlSuffixes;
-//     /*
-//      * NOTE do not change the name of this field; it is set by the Framework using reflection
-//      */
-//     private static FrameworkLog frameworkLog;
-//
-//     static final int SEVERITY_ERROR = 0x04;
-//     static final int SEVERITY_WARNING = 0x02;
-//     /*
-//      * This object is assigned to the value of a field map to indicate
-//      * that a translated message has already been assigned to that field.
-//      */
-//     static final Object ASSIGNED = new Object();
-//
-//     /**
-//      * Creates a new NLS instance.
-//      */
-//     protected NLS() {
-//         super();
-//     }
+    private static final Object[] EMPTY_ARGS = null;
+    private static final String EXTENSION = ".properties"; //$NON-NLS-1$
+    private static String[] nlSuffixes;
+    /*
+     * NOTE do not change the name of this field; it is set by the Framework using reflection
+     */
+    private static FrameworkLog frameworkLog;
+
+    static final int SEVERITY_ERROR = 0x04;
+    static final int SEVERITY_WARNING = 0x02;
+    /*
+     * This object is assigned to the value of a field map to indicate
+     * that a translated message has already been assigned to that field.
+     */
+    static final Object ASSIGNED = new Object();
+
+    /**
+     * Creates a new NLS instance.
+     */
+    protected this() {
+        super();
+    }
 
     /**
      * Bind the given message's substitution locations with the given string value.
@@ -92,14 +93,7 @@
      * @throws IllegalArgumentException if the text appearing within curly braces in the given message does not map to an integer
      */
     public static String bind(String message, Object binding) {
-        implMissing( __FILE__, __LINE__ );
-        return null;
-//         return internalBind(message, null, String.valueOf(binding), null);
-    }
-    public static String bind(String message, String binding) {
-        implMissing( __FILE__, __LINE__ );
-        return null;
-//         return internalBind(message, null, String.valueOf(binding), null);
+        return internalBind(message, null, String.valueOf(binding), null);
     }
 
     /**
@@ -112,14 +106,7 @@
      * @throws IllegalArgumentException if the text appearing within curly braces in the given message does not map to an integer
      */
     public static String bind(String message, Object binding1, Object binding2) {
-        implMissing( __FILE__, __LINE__ );
-        return null;
-//         return internalBind(message, null, String.valueOf(binding1), String.valueOf(binding2));
-    }
-    public static String bind(String message, String binding1, String binding2) {
-        implMissing( __FILE__, __LINE__ );
-        return null;
-//         return internalBind(message, null, String.valueOf(binding1), String.valueOf(binding2));
+        return internalBind(message, null, String.valueOf(binding1), String.valueOf(binding2));
     }
 
     /**
@@ -131,316 +118,309 @@
      * @throws IllegalArgumentException if the text appearing within curly braces in the given message does not map to an integer
      */
     public static String bind(String message, Object[] bindings) {
-        implMissing( __FILE__, __LINE__ );
-        return null;
-//         return internalBind(message, bindings, null, null);
+        return internalBind(message, bindings, null, null);
+    }
+
+    /**
+     * Initialize the given class with the values from the specified message bundle.
+     *
+     * @param bundleName fully qualified path of the class name
+     * @param clazz the class where the constants will exist
+     */
+    public static void initializeMessages(/+FIXFINAL+/ String bundleName, /+FIXFINAL+/ Class clazz) {
+        if (System.getSecurityManager() is null) {
+            load(bundleName, clazz);
+            return;
+        }
+        AccessController.doPrivileged(new class() PrivilegedAction {
+            public Object run() {
+                load(bundleName, clazz);
+                return null;
+            }
+        });
     }
-    public static String bind(String message, String[] bindings) {
-        implMissing( __FILE__, __LINE__ );
-        return null;
-//         return internalBind(message, bindings, null, null);
+
+    /*
+     * Perform the string substitution on the given message with the specified args.
+     * See the class comment for exact details.
+     */
+    private static String internalBind(String message, Object[] args, String argZero, String argOne) {
+        if (message is null)
+            return "No message available."; //$NON-NLS-1$
+        if (args is null || args.length_ is 0)
+            args = EMPTY_ARGS;
+
+        int length_ = message.length();
+        //estimate correct size of string buffer to avoid growth
+        int bufLen = length_ + (args.length_ * 5);
+        if (argZero !is null)
+            bufLen += argZero.length() - 3;
+        if (argOne !is null)
+            bufLen += argOne.length() - 3;
+        StringBuffer buffer = new StringBuffer(bufLen < 0 ? 0 : bufLen);
+        for (int i = 0; i < length_; i++) {
+            char c = message.charAt(i);
+            switch (c) {
+                case '{' :
+                    int index = message.indexOf('}', i);
+                    // if we don't have a matching closing brace then...
+                    if (index is -1) {
+                        buffer.append(c);
+                        break;
+                    }
+                    i++;
+                    if (i >= length_) {
+                        buffer.append(c);
+                        break;
+                    }
+                    // look for a substitution
+                    int number = -1;
+                    try {
+                        number = Integer.parseInt(message.substring(i, index));
+                    } catch (NumberFormatException e) {
+                        throw new IllegalArgumentException();
+                    }
+                    if (number is 0 && argZero !is null)
+                        buffer.append(argZero);
+                    else if (number is 1 && argOne !is null)
+                        buffer.append(argOne);
+                    else {
+                        if (number >= args.length_ || number < 0) {
+                            buffer.append("<missing argument>"); //$NON-NLS-1$
+                            i = index;
+                            break;
+                        }
+                        buffer.append(args[number]);
+                    }
+                    i = index;
+                    break;
+                case '\'' :
+                    // if a single quote is the last char on the line then skip it
+                    int nextIndex = i + 1;
+                    if (nextIndex >= length_) {
+                        buffer.append(c);
+                        break;
+                    }
+                    char next = message.charAt(nextIndex);
+                    // if the next char is another single quote then write out one
+                    if (next is '\'') {
+                        i++;
+                        buffer.append(c);
+                        break;
+                    }
+                    // otherwise we want to read until we get to the next single quote
+                    index = message.indexOf('\'', nextIndex);
+                    // if there are no more in the string, then skip it
+                    if (index is -1) {
+                        buffer.append(c);
+                        break;
+                    }
+                    // otherwise write out the chars inside the quotes
+                    buffer.append(message.substring(nextIndex, index));
+                    i = index;
+                    break;
+                default :
+                    buffer.append(c);
+            }
+        }
+        return buffer.toString();
+    }
+
+    /*
+     * Build an array of property files to search.  The returned array contains
+     * the property fields in order from most specific to most generic.
+     * So, in the FR_fr locale, it will return file_fr_FR.properties, then
+     * file_fr.properties, and finally file.properties.
+     */
+    private static String[] buildVariants(String root) {
+        if (nlSuffixes is null) {
+            //build list of suffixes for loading resource bundles
+            String nl = Locale.getDefault().toString();
+            ArrayList result = new ArrayList(4);
+            int lastSeparator;
+            while (true) {
+                result.add('_' + nl + EXTENSION);
+                lastSeparator = nl.lastIndexOf('_');
+                if (lastSeparator is -1)
+                    break;
+                nl = nl.substring(0, lastSeparator);
+            }
+            //add the empty suffix last (most general)
+            result.add(EXTENSION);
+            nlSuffixes = stringcast( result.toArray)(new String[result.size()]);
+        }
+        root = root.replace('.', '/');
+        String[] variants = new String[nlSuffixes.length_];
+        for (int i = 0; i < variants.length_; i++)
+            variants[i] = root + nlSuffixes[i];
+        return variants;
     }
 
-//     /**
-//      * Initialize the given class with the values from the specified message bundle.
-//      *
-//      * @param bundleName fully qualified path of the class name
-//      * @param clazz the class where the constants will exist
-//      */
-//     public static void initializeMessages(final String bundleName, final Class clazz) {
-//         if (System.getSecurityManager() is null) {
-//             load(bundleName, clazz);
-//             return;
-//         }
-//         AccessController.doPrivileged(new PrivilegedAction() {
-//             public Object run() {
-//                 load(bundleName, clazz);
-//                 return null;
-//             }
-//         });
-//     }
-//
-//     /*
-//      * Perform the string substitution on the given message with the specified args.
-//      * See the class comment for exact details.
-//      */
-//     private static String internalBind(String message, Object[] args, String argZero, String argOne) {
-//         if (message is null)
-//             return "No message available."; //$NON-NLS-1$
-//         if (args is null || args.length is 0)
-//             args = EMPTY_ARGS;
-//
-//         int length = message.length();
-//         //estimate correct size of string buffer to avoid growth
-//         int bufLen = length + (args.length * 5);
-//         if (argZero !is null)
-//             bufLen += argZero.length() - 3;
-//         if (argOne !is null)
-//             bufLen += argOne.length() - 3;
-//         StringBuffer buffer = new StringBuffer(bufLen < 0 ? 0 : bufLen);
-//         for (int i = 0; i < length; i++) {
-//             char c = message.charAt(i);
-//             switch (c) {
-//                 case '{' :
-//                     int index = message.indexOf('}', i);
-//                     // if we don't have a matching closing brace then...
-//                     if (index is -1) {
-//                         buffer.append(c);
-//                         break;
-//                     }
-//                     i++;
-//                     if (i >= length) {
-//                         buffer.append(c);
-//                         break;
-//                     }
-//                     // look for a substitution
-//                     int number = -1;
-//                     try {
-//                         number = Integer.parseInt(message.substring(i, index));
-//                     } catch (NumberFormatException e) {
-//                         throw new IllegalArgumentException();
-//                     }
-//                     if (number is 0 && argZero !is null)
-//                         buffer.append(argZero);
-//                     else if (number is 1 && argOne !is null)
-//                         buffer.append(argOne);
-//                     else {
-//                         if (number >= args.length || number < 0) {
-//                             buffer.append("<missing argument>"); //$NON-NLS-1$
-//                             i = index;
-//                             break;
-//                         }
-//                         buffer.append(args[number]);
-//                     }
-//                     i = index;
-//                     break;
-//                 case '\'' :
-//                     // if a single quote is the last char on the line then skip it
-//                     int nextIndex = i + 1;
-//                     if (nextIndex >= length) {
-//                         buffer.append(c);
-//                         break;
-//                     }
-//                     char next = message.charAt(nextIndex);
-//                     // if the next char is another single quote then write out one
-//                     if (next is '\'') {
-//                         i++;
-//                         buffer.append(c);
-//                         break;
-//                     }
-//                     // otherwise we want to read until we get to the next single quote
-//                     index = message.indexOf('\'', nextIndex);
-//                     // if there are no more in the string, then skip it
-//                     if (index is -1) {
-//                         buffer.append(c);
-//                         break;
-//                     }
-//                     // otherwise write out the chars inside the quotes
-//                     buffer.append(message.substring(nextIndex, index));
-//                     i = index;
-//                     break;
-//                 default :
-//                     buffer.append(c);
-//             }
-//         }
-//         return buffer.toString();
-//     }
-//
-//     /*
-//      * Build an array of property files to search.  The returned array contains
-//      * the property fields in order from most specific to most generic.
-//      * So, in the FR_fr locale, it will return file_fr_FR.properties, then
-//      * file_fr.properties, and finally file.properties.
-//      */
-//     private static String[] buildVariants(String root) {
-//         if (nlSuffixes is null) {
-//             //build list of suffixes for loading resource bundles
-//             String nl = Locale.getDefault().toString();
-//             ArrayList result = new ArrayList(4);
-//             int lastSeparator;
-//             while (true) {
-//                 result.add('_' + nl + EXTENSION);
-//                 lastSeparator = nl.lastIndexOf('_');
-//                 if (lastSeparator is -1)
-//                     break;
-//                 nl = nl.substring(0, lastSeparator);
-//             }
-//             //add the empty suffix last (most general)
-//             result.add(EXTENSION);
-//             nlSuffixes = (String[]) result.toArray(new String[result.size()]);
-//         }
-//         root = root.replace('.', '/');
-//         String[] variants = new String[nlSuffixes.length];
-//         for (int i = 0; i < variants.length; i++)
-//             variants[i] = root + nlSuffixes[i];
-//         return variants;
-//     }
-//
-//     private static void computeMissingMessages(String bundleName, Class clazz, Map fieldMap, Field[] fieldArray, bool isAccessible) {
-//         // iterate over the fields in the class to make sure that there aren't any empty ones
-//         final int MOD_EXPECTED = Modifier.PUBLIC | Modifier.STATIC;
-//         final int MOD_MASK = MOD_EXPECTED | Modifier.FINAL;
-//         final int numFields = fieldArray.length;
-//         for (int i = 0; i < numFields; i++) {
-//             Field field = fieldArray[i];
-//             if ((field.getModifiers() & MOD_MASK) !is MOD_EXPECTED)
-//                 continue;
-//             //if the field has a a value assigned, there is nothing to do
-//             if (fieldMap.get(field.getName()) is ASSIGNED)
-//                 continue;
-//             try {
-//                 // Set a value for this empty field. We should never get an exception here because
-//                 // we know we have a public static non-final field. If we do get an exception, silently
-//                 // log it and continue. This means that the field will (most likely) be un-initialized and
-//                 // will fail later in the code and if so then we will see both the NPE and this error.
-//                 String value = "NLS missing message: " + field.getName() + " in: " + bundleName; //$NON-NLS-1$ //$NON-NLS-2$
-//                 if (Debug.DEBUG_MESSAGE_BUNDLES)
-//                     System.out.println(value);
-//                 log(SEVERITY_WARNING, value, null);
-//                 if (!isAccessible)
-//                     field.setAccessible(true);
-//                 field.set(null, value);
-//             } catch (Exception e) {
-//                 log(SEVERITY_ERROR, "Error setting the missing message value for: " + field.getName(), e); //$NON-NLS-1$
-//             }
-//         }
-//     }
-//
-//     /*
-//      * Load the given resource bundle using the specified class loader.
-//      */
-//     static void load(final String bundleName, Class clazz) {
-//         long start = System.currentTimeMillis();
-//         final Field[] fieldArray = clazz.getDeclaredFields();
-//         ClassLoader loader = clazz.getClassLoader();
-//
-//         bool isAccessible = (clazz.getModifiers() & Modifier.PUBLIC) !is 0;
-//
-//         //build a map of field names to Field objects
-//         final int len = fieldArray.length;
-//         Map fields = new HashMap(len * 2);
-//         for (int i = 0; i < len; i++)
-//             fields.put(fieldArray[i].getName(), fieldArray[i]);
-//
-//         // search the variants from most specific to most general, since
-//         // the MessagesProperties.put method will mark assigned fields
-//         // to prevent them from being assigned twice
-//         final String[] variants = buildVariants(bundleName);
-//         for (int i = 0; i < variants.length; i++) {
-//             // loader is null if we're launched off the Java boot classpath
-//             final InputStream input = loader is null ? ClassLoader.getSystemResourceAsStream(variants[i]) : loader.getResourceAsStream(variants[i]);
-//             if (input is null)
-//                 continue;
-//             try {
-//                 final MessagesProperties properties = new MessagesProperties(fields, bundleName, isAccessible);
-//                 properties.load(input);
-//             } catch (IOException e) {
-//                 log(SEVERITY_ERROR, "Error loading " + variants[i], e); //$NON-NLS-1$
-//             } finally {
-//                 if (input !is null)
-//                     try {
-//                         input.close();
-//                     } catch (IOException e) {
-//                         // ignore
-//                     }
-//             }
-//         }
-//         computeMissingMessages(bundleName, clazz, fields, fieldArray, isAccessible);
-//         if (Debug.DEBUG_MESSAGE_BUNDLES)
-//             System.out.println("Time to load message bundle: " + bundleName + " was " + (System.currentTimeMillis() - start) + "ms."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-//     }
-//
-//     /*
-//      * The method adds a log entry based on the error message and exception.
-//      * The output is written to the System.err.
-//      *
-//      * This method is only expected to be called if there is a problem in
-//      * the NLS mechanism. As a result, translation facility is not available
-//      * here and messages coming out of this log are generally not translated.
-//      *
-//      * @param severity - severity of the message (SEVERITY_ERROR or SEVERITY_WARNING)
-//      * @param message - message to log
-//      * @param e - exception to log
-//      */
-//     static void log(int severity, String message, Exception e) {
-//         if (frameworkLog !is null) {
-//             frameworkLog.log(new FrameworkLogEntry("org.eclipse.osgi", severity, 1, message, 0, e, null)); //$NON-NLS-1$
-//             return;
-//         }
-//         String statusMsg;
-//         switch (severity) {
-//             case SEVERITY_ERROR :
-//                 statusMsg = "Error: "; //$NON-NLS-1$
-//                 break;
-//             case SEVERITY_WARNING :
-//                 // intentionally fall through:
-//             default :
-//                 statusMsg = "Warning: "; //$NON-NLS-1$
-//         }
-//         if (message !is null)
-//             statusMsg += message;
-//         if (e !is null)
-//             statusMsg += ": " + e.getMessage(); //$NON-NLS-1$
-//         System.err.println(statusMsg);
-//         if (e !is null)
-//             e.printStackTrace();
-//     }
-//
-//     /*
-//      * Class which sub-classes java.util.Properties and uses the #put method
-//      * to set field values rather than storing the values in the table.
-//      */
-//     private static class MessagesProperties extends Properties {
-//
-//         private static final int MOD_EXPECTED = Modifier.PUBLIC | Modifier.STATIC;
-//         private static final int MOD_MASK = MOD_EXPECTED | Modifier.FINAL;
-//         private static final long serialVersionUID = 1L;
-//
-//         private final String bundleName;
-//         private final Map fields;
-//         private final bool isAccessible;
-//
-//         public MessagesProperties(Map fieldMap, String bundleName, bool isAccessible) {
-//             super();
-//             this.fields = fieldMap;
-//             this.bundleName = bundleName;
-//             this.isAccessible = isAccessible;
-//         }
-//
-//         /* (non-Javadoc)
-//          * @see java.util.Hashtable#put(java.lang.Object, java.lang.Object)
-//          */
-//         public synchronized Object put(Object key, Object value) {
-//             Object fieldObject = fields.put(key, ASSIGNED);
-//             // if already assigned, there is nothing to do
-//             if (fieldObject is ASSIGNED)
-//                 return null;
-//             if (fieldObject is null) {
-//                 final String msg = "NLS unused message: " + key + " in: " + bundleName;//$NON-NLS-1$ //$NON-NLS-2$
-//                 if (Debug.DEBUG_MESSAGE_BUNDLES)
-//                     System.out.println(msg);
-//                 log(SEVERITY_WARNING, msg, null);
-//                 return null;
-//             }
-//             final Field field = (Field) fieldObject;
-//             //can only set value of public static non-final fields
-//             if ((field.getModifiers() & MOD_MASK) !is MOD_EXPECTED)
-//                 return null;
-//             try {
-//                 // Check to see if we are allowed to modify the field. If we aren't (for instance
-//                 // if the class is not public) then change the accessible attribute of the field
-//                 // before trying to set the value.
-//                 if (!isAccessible)
-//                     field.setAccessible(true);
-//                 // Set the value into the field. We should never get an exception here because
-//                 // we know we have a public static non-final field. If we do get an exception, silently
-//                 // log it and continue. This means that the field will (most likely) be un-initialized and
-//                 // will fail later in the code and if so then we will see both the NPE and this error.
-//                 field.set(null, value);
-//             } catch (Exception e) {
-//                 log(SEVERITY_ERROR, "Exception setting field value.", e); //$NON-NLS-1$
-//             }
-//             return null;
-//         }
-//     }
-}
+    private static void computeMissingMessages(String bundleName, Class clazz, Map fieldMap, Field[] fieldArray, bool isAccessible) {
+        // iterate over the fields in the class to make sure that there aren't any empty ones
+        final int MOD_EXPECTED = Modifier.PUBLIC | Modifier.STATIC;
+        final int MOD_MASK = MOD_EXPECTED | Modifier.FINAL;
+        final int numFields = fieldArray.length_;
+        for (int i = 0; i < numFields; i++) {
+            Field field = fieldArray[i];
+            if ((field.getModifiers() & MOD_MASK) !is MOD_EXPECTED)
+                continue;
+            //if the field has a a value assigned, there is nothing to do
+            if (fieldMap.get(field.getName()) is ASSIGNED)
+                continue;
+            try {
+                // Set a value for this empty field. We should never get an exception here because
+                // we know we have a public static non-final field. If we do get an exception, silently
+                // log it and continue. This means that the field will (most likely) be un-initialized and
+                // will fail later in the code and if so then we will see both the NPE and this error.
+                String value = "NLS missing message: " + field.getName() + " in_: " + bundleName; //$NON-NLS-1$ //$NON-NLS-2$
+                if (Debug.DEBUG_MESSAGE_BUNDLES)
+                    System.out_.println(value);
+                log(SEVERITY_WARNING, value, null);
+                if (!isAccessible)
+                    field.setAccessible(true);
+                field.set(null, value);
+            } catch (Exception e) {
+                log(SEVERITY_ERROR, "Error setting the missing message value for: " + field.getName(), e); //$NON-NLS-1$
+            }
+        }
+    }
+
+    /*
+     * Load the given resource bundle using the specified class loader.
+     */
+    static void load(/+FIXFINAL+/ String bundleName, Class clazz) {
+        long start = System.currentTimeMillis();
+        final Field[] fieldArray = clazz.getDeclaredFields();
+        ClassLoader loader = clazz.getClassLoader();
+
+        bool isAccessible = (clazz.getModifiers() & Modifier.PUBLIC) !is 0;
+
+        //build a map of field names to Field objects
+        final int len = fieldArray.length_;
+        Map fields = new HashMap(len * 2);
+        for (int i = 0; i < len; i++)
+            fields.put(fieldArray[i].getName(), fieldArray[i]);
+
+        // search the variants from most specific to most general, since
+        // the MessagesProperties.put method will mark assigned fields
+        // to prevent them from being assigned twice
+        final String[] variants = buildVariants(bundleName);
+        for (int i = 0; i < variants.length_; i++) {
+            // loader==null if we're launched off the Java boot classpath
+            final InputStream input = loader is null ? ClassLoader.getSystemResourceAsStream(variants[i]) : loader.getResourceAsStream(variants[i]);
+            if (input is null)
+                continue;
+            try {
+                final MessagesProperties properties = new MessagesProperties(fields, bundleName, isAccessible);
+                properties.load(input);
+            } catch (IOException e) {
+                log(SEVERITY_ERROR, "Error loading " + variants[i], e); //$NON-NLS-1$
+            } finally {
+                if (input !is null)
+                    try {
+                        input.close();
+                    } catch (IOException e) {
+                        // ignore
+                    }
+            }
+        }
+        computeMissingMessages(bundleName, clazz, fields, fieldArray, isAccessible);
+        if (Debug.DEBUG_MESSAGE_BUNDLES)
+            System.out_.println("Time to load message bundle: " + bundleName + " was " + (System.currentTimeMillis() - start) + "ms."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+    }
+
+    /*
+     * The method adds a log entry based on the error message and exception.
+     * The output is written to the System.err.
+     *
+     * This method is only expected to be called if there is a problem in
+     * the NLS mechanism. As a result, translation facility is not available
+     * here and messages coming out of this log are generally not translated.
+     *
+     * @param severity - severity of the message (SEVERITY_ERROR or SEVERITY_WARNING)
+     * @param message - message to log
+     * @param e - exception to log
+     */
+    static void log(int severity, String message, Exception e) {
+        if (frameworkLog !is null) {
+            frameworkLog.log(new FrameworkLogEntry("org.eclipse.osgi", severity, 1, message, 0, e, null)); //$NON-NLS-1$
+            return;
+        }
+        String statusMsg;
+        switch (severity) {
+            case SEVERITY_ERROR :
+                statusMsg = "Error: "; //$NON-NLS-1$
+                break;
+            case SEVERITY_WARNING :
+                // intentionally fall through:
+            default :
+                statusMsg = "Warning: "; //$NON-NLS-1$
+        }
+        if (message !is null)
+            statusMsg += message;
+        if (e !is null)
+            statusMsg += ": " + e.getMessage(); //$NON-NLS-1$
+        System.err.println(statusMsg);
+        if (e !is null)
+            e.printStackTrace();
+    }
+
+    /*
+     * Class which sub-classes java.util.Properties and uses the #put method
+     * to set field values rather than storing the values in the table.
+     */
+    private static class MessagesProperties : Properties {
+
+        private static final int MOD_EXPECTED = Modifier.PUBLIC | Modifier.STATIC;
+        private static final int MOD_MASK = MOD_EXPECTED | Modifier.FINAL;
+        private static final long serialVersionUID = 1L;
+
+        private final String bundleName;
+        private final Map fields;
+        private final bool isAccessible;
+
+        public this(Map fieldMap, String bundleName, bool isAccessible) {
+            super();
+            this.fields = fieldMap;
+            this.bundleName = bundleName;
+            this.isAccessible = isAccessible;
+        }
+
+        /* (non-Javadoc)
+         * @see java.util.Hashtable#put(java.lang.Object, java.lang.Object)
+         */
+        public synchronized Object put(Object key, Object value) {
+            Object fieldObject = fields.put(key, ASSIGNED);
+            // if already assigned, there is nothing to do
+            if (fieldObject is ASSIGNED)
+                return null;
+            if (fieldObject is null) {
+                final String msg = "NLS unused message: " + key + " in_: " + bundleName;//$NON-NLS-1$ //$NON-NLS-2$
+                if (Debug.DEBUG_MESSAGE_BUNDLES)
+                    System.out_.println(msg);
+                log(SEVERITY_WARNING, msg, null);
+                return null;
+            }
+            final Field field = cast(Field) fieldObject;
+            //can only set value of public static non-final fields
+            if ((field.getModifiers() & MOD_MASK) !is MOD_EXPECTED)
+                return null;
+            try {
+                // Check to see if we are allowed to modify the field. If we aren't (for instance
+                // if the class is not public) then change the accessible attribute of the field
+                // before trying to set the value.
+                if (!isAccessible)
+                    field.setAccessible(true);
+                // Set the value into the field. We should never get an exception here because
+                // we know we have a public static non-final field. If we do get an exception, silently
+                // log it and continue. This means that the field will (most likely) be un-initialized and
+                // will fail later in the code and if so then we will see both the NPE and this error.
+                field.set(null, value);
+            } catch (Exception e) {
+                log(SEVERITY_ERROR, "Exception setting field value.", e); //$NON-NLS-1$
+            }
+            return null;
+        }
+    }
+}
\ No newline at end of file
--- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/SWT.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/SWT.d	Sun Nov 08 12:42:30 2009 +0100
@@ -22,22 +22,22 @@
 import java.lang.all;
 
 version(build){
-    pragma(link, "advapi32.lib");
-    pragma(link, "comctl32.lib");
-    pragma(link, "comdlg32.lib");
-    pragma(link, "gdi32.lib");
-    pragma(link, "kernel32.lib");
-    pragma(link, "shell32.lib");
-    pragma(link, "ole32.lib");
-    pragma(link, "oleaut32.lib");
-    pragma(link, "olepro32.lib");
-    pragma(link, "oleacc.lib");
-    pragma(link, "user32.lib");
-    pragma(link, "usp10.lib");
-    pragma(link, "msimg32.lib");
-    pragma(link, "opengl32.lib");
-    pragma(link, "shlwapi.lib");
-    pragma(link, "org.eclipse.swt.win32.win32.x86.lib");
+    pragma(link, "advapi32");
+    pragma(link, "comctl32");
+    pragma(link, "comdlg32");
+    pragma(link, "gdi32");
+    pragma(link, "kernel32");
+    pragma(link, "shell32");
+    pragma(link, "ole32");
+    pragma(link, "oleaut32");
+    pragma(link, "olepro32");
+    pragma(link, "oleacc");
+    pragma(link, "user32");
+    pragma(link, "usp10");
+    pragma(link, "msimg32");
+    pragma(link, "opengl32");
+    pragma(link, "shlwapi");
+    pragma(link, "org.eclipse.swt.win32.win32.x86");
     //pragma(link, "gdiplus"); // load dynamic
     //pragma(link, "uxtheme"); // load dynamic
 }
--- a/rakefile	Sat May 02 11:27:24 2009 +0200
+++ b/rakefile	Sun Nov 08 12:42:30 2009 +0100
@@ -112,11 +112,13 @@
     if isDebug
         dbg_str = "Debug "
     end
-    puts "#{dbg_str}Building #{libname}"
 
     resdir_abs = File.expand_path( File.join( basedir, resdir ))
     srcdir_abs = File.expand_path( File.join( basedir, srcdir ))
 
+    STDERR.puts "#{dbg_str}Building #{libname}"
+    STDERR.puts "workdir=>#{srcdir_abs.to_path}"
+
     FileUtils.mkdir_p DIR_IMP
     FileUtils.mkdir_p DIR_OBJ
     FileUtils.mkdir_p DIR_RES
@@ -312,14 +314,62 @@
 end
 
 desc "Build Equinox"
-task :equinox do
+task :default => :work
+
+desc "Build Equinox"
+task "equinox" do
     buildTree( "org.eclipse.osgi", "osgi/src"      , "res", nil, "org.eclipse.osgi.osgi" )
     buildTree( "org.eclipse.osgi", "supplement/src", "res", nil, "org.eclipse.osgi.supplement")
     buildTree( "org.eclipse.equinox.common", "src", "res" )
+
+    buildTree( "org.eclipse.osgi", "console/src", "res", nil, "org.eclipse.osgi.console")
+    buildTree( "org.eclipse.osgi", "core/adaptor", "res", nil, "org.eclipse.osgi.core.adaptor")
+    buildTree( "org.eclipse.osgi", "core/framework", "res", nil, "org.eclipse.osgi.core.framework")
+    buildTree( "org.eclipse.osgi", "defaultAdaptor/src", "res", nil, "org.eclipse.osgi.defaultadaptor")
+    buildTree( "org.eclipse.osgi", "eclipseAdaptor/src", "res", nil, "org.eclipse.osgi.eclipseadaptor")
+    buildTree( "org.eclipse.osgi", "jarverifier", "res", nil, "org.eclipse.osgi.jarverifier")
+    buildTree( "org.eclipse.osgi", "resolver/src", "res", nil, "org.eclipse.osgi.resolver")
+    buildTree( "org.eclipse.osgi", "security/src", "res", nil, "org.eclipse.osgi.security")
+    buildTree( "org.eclipse.osgi", "supplement/src", "res", nil, "org.eclipse.osgi.supplement")
+    buildTree( "org.eclipse.osgi.services", "src", "res" )
+    buildTree( "org.eclipse.equinox.app", "src", "res" )
+    buildTree( "org.eclipse.equinox.preferences", "src", "res" )
+    buildTree( "org.eclipse.equinox.registry", "src", "res" )
+    buildTree( "org.eclipse.equinox.security", "src", "res" )
 end
 
 desc "Build Current Working area"
 task :work do
+    searchdirs = ""
+    searchdirs << "-I../../supplement/src "
+    searchdirs << "-I../../osgi/src "
+    searchdirs << "-I../../core/framework "
+    searchdirs << "-I../../supplement/src "
+    searchdirs << "-I../../console/src "
+    searchdirs << "-I../../core/adaptor "
+    searchdirs << "-I../../defaultAdaptor/src "
+    searchdirs << "-I../../eclipseAdaptor/src "
+    searchdirs << "-I../../jarverifier "
+    searchdirs << "-I../../resolver/src "
+    searchdirs << "-I../../security/src "
+
+    buildTree( "org.eclipse.osgi", "supplement/src", "res", searchdirs, "org.eclipse.osgi.supplement")
+    buildTree( "org.eclipse.osgi", "osgi/src"      , "res", searchdirs, "org.eclipse.osgi.osgi" )
+    buildTree( "org.eclipse.osgi", "core/framework", "res", searchdirs, "org.eclipse.osgi.core.framework")
+    buildTree( "org.eclipse.osgi", "supplement/src", "res", nil, "org.eclipse.osgi.supplement")
+    buildTree( "org.eclipse.osgi", "console/src", "res", nil, "org.eclipse.osgi.console")
+    buildTree( "org.eclipse.osgi", "core/adaptor", "res", nil, "org.eclipse.osgi.core.adaptor")
+    buildTree( "org.eclipse.osgi", "defaultAdaptor/src", "res", nil, "org.eclipse.osgi.defaultadaptor")
+    buildTree( "org.eclipse.osgi", "eclipseAdaptor/src", "res", nil, "org.eclipse.osgi.eclipseadaptor")
+    buildTree( "org.eclipse.osgi", "jarverifier", "res", nil, "org.eclipse.osgi.jarverifier")
+    buildTree( "org.eclipse.osgi", "resolver/src", "res", nil, "org.eclipse.osgi.resolver")
+    buildTree( "org.eclipse.osgi", "security/src", "res", nil, "org.eclipse.osgi.security")
+    buildTree( "org.eclipse.osgi.services", "src", "res" )
+    buildTree( "org.eclipse.equinox.common", "src", "res" )
+    buildTree( "org.eclipse.equinox.app", "src", "res" )
+    buildTree( "org.eclipse.equinox.preferences", "src", "res" )
+    buildTree( "org.eclipse.equinox.registry", "src", "res" )
+    buildTree( "org.eclipse.equinox.security", "src", "res" )
 end
 
 desc "Build Eclipse Core"
@@ -364,10 +414,6 @@
 task :all => [ :base, :swt, :equinox, :core, :jface, :jfacetext, :uiforms,
     :draw2d, :swtsnippets, :jfacesnippets ]
 
-desc "Clean, then build ALL"
-task :default => [ :clean, :all ]
-
-
 desc "Build SWT Snippet Collection"
 task :swtsnippets, :explicit_snp do | t, args |