changeset 20:dccb717aa902

Remove more tango imports
author Frank Benoit <benoit@tionex.de>
date Wed, 18 Mar 2009 12:10:17 +0100
parents 52184e4b815c
children 9b96950f2c3c
files java/src/java/mangoicu/UMessageFormat.d org.eclipse.core.commands/src/org/eclipse/core/commands/util/Tracing.d org.eclipse.equinox.common/src/org/eclipse/core/runtime/Path.d org.eclipse.jface/src/org/eclipse/jface/action/LegacyActionTools.d org.eclipse.jface/src/org/eclipse/jface/bindings/BindingManager.d org.eclipse.jface/src/org/eclipse/jface/fieldassist/ComboContentAdapter.d org.eclipse.jface/src/org/eclipse/jface/preference/IntegerFieldEditor.d org.eclipse.jface/src/org/eclipse/jface/resource/FileImageDescriptor.d org.eclipse.jface/src/org/eclipse/jface/viewers/CustomHashtable.d org.eclipse.jface/src/org/eclipse/jface/viewers/ViewerRow.d org.eclipse.jface/src/org/eclipse/jface/window/ToolTip.d rakefile
diffstat 12 files changed, 36 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/java/src/java/mangoicu/UMessageFormat.d	Wed Mar 18 10:55:25 2009 +0100
+++ b/java/src/java/mangoicu/UMessageFormat.d	Wed Mar 18 12:10:17 2009 +0100
@@ -255,9 +255,13 @@
 
                 ***************************************************************/
 
-                invariant 
+                version( D_Version2 ){
+                }
+                else{
+                mixin( "invariant 
                 {
                        assert (index < args.length);
+                }");
                 }
 
                 /***************************************************************
--- a/org.eclipse.core.commands/src/org/eclipse/core/commands/util/Tracing.d	Wed Mar 18 10:55:25 2009 +0100
+++ b/org.eclipse.core.commands/src/org/eclipse/core/commands/util/Tracing.d	Wed Mar 18 12:10:17 2009 +0100
@@ -14,7 +14,6 @@
 module org.eclipse.core.commands.util.Tracing;
 
 import java.lang.all;
-import tango.util.log.Trace;
 
 /**
  * <p>
@@ -61,7 +60,7 @@
         if (message.length !is 0) {
             buffer.append(message);
         }
-        Trace.formatln( "{}", buffer.toString());
+        getDwtLogger().trace( __FILE__, __LINE__, "{}", buffer.toString());
     }
 
     /**
--- a/org.eclipse.equinox.common/src/org/eclipse/core/runtime/Path.d	Wed Mar 18 10:55:25 2009 +0100
+++ b/org.eclipse.equinox.common/src/org/eclipse/core/runtime/Path.d	Wed Mar 18 12:10:17 2009 +0100
@@ -21,10 +21,6 @@
 
 import tango.io.model.IFile;
 
-
-static import tango.text.Text;
-alias tango.text.Text.Text!(char) StringBuffer;
-
 /**
  * The standard implementation of the <code>IPath</code> interface.
  * Paths are always maintained in canonicalized form.  That is, parent
--- a/org.eclipse.jface/src/org/eclipse/jface/action/LegacyActionTools.d	Wed Mar 18 10:55:25 2009 +0100
+++ b/org.eclipse.jface/src/org/eclipse/jface/action/LegacyActionTools.d	Wed Mar 18 12:10:17 2009 +0100
@@ -21,8 +21,6 @@
 import java.util.Map;
 import java.util.HashMap;
 import java.util.Set;
-static import tango.text.Text;
-alias tango.text.Text.Text!(char) StringBuffer;
 
 /**
  * <p>
--- a/org.eclipse.jface/src/org/eclipse/jface/bindings/BindingManager.d	Wed Mar 18 10:55:25 2009 +0100
+++ b/org.eclipse.jface/src/org/eclipse/jface/bindings/BindingManager.d	Wed Mar 18 12:10:17 2009 +0100
@@ -58,8 +58,6 @@
 import java.util.HashMap;
 import java.util.Set;
 import java.util.HashSet;
-static import tango.text.Text;
-alias tango.text.Text.Text!(char) StringBuffer;
 import tango.text.locale.Core;
 static import tango.text.Util;
 
--- a/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ComboContentAdapter.d	Wed Mar 18 10:55:25 2009 +0100
+++ b/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ComboContentAdapter.d	Wed Mar 18 12:10:17 2009 +0100
@@ -24,8 +24,6 @@
 
 import java.lang.all;
 import java.util.Set;
-import tango.text.Text;
-alias tango.text.Text.Text!(char) StringBuffer;
 /**
  * An {@link IControlContentAdapter} for SWT Combo controls. This is a
  * convenience class for easily creating a {@link ContentProposalAdapter} for
--- a/org.eclipse.jface/src/org/eclipse/jface/preference/IntegerFieldEditor.d	Wed Mar 18 10:55:25 2009 +0100
+++ b/org.eclipse.jface/src/org/eclipse/jface/preference/IntegerFieldEditor.d	Wed Mar 18 12:10:17 2009 +0100
@@ -22,7 +22,6 @@
 
 import java.lang.all;
 import java.util.Set;
-import tango.util.Convert;
 
 /**
  * A field editor for an integer type preference.
@@ -121,7 +120,7 @@
         if (text !is null) {
             int value = getPreferenceStore().getInt(getPreferenceName());
             text.setText( tango.text.convert.Integer.toString(value));//$NON-NLS-1$
-            oldValue = to!(String)( value ); //$NON-NLS-1$
+            oldValue = String_valueOf( value ); //$NON-NLS-1$
         }
 
     }
--- a/org.eclipse.jface/src/org/eclipse/jface/resource/FileImageDescriptor.d	Wed Mar 18 10:55:25 2009 +0100
+++ b/org.eclipse.jface/src/org/eclipse/jface/resource/FileImageDescriptor.d	Wed Mar 18 12:10:17 2009 +0100
@@ -34,8 +34,6 @@
 import java.io.BufferedInputStream;
 import java.io.ByteArrayInputStream;
 
-import tango.util.log.Trace;
-
 /**
  * An image descriptor that loads its image information from a file.
  */
@@ -107,7 +105,7 @@
                 result = new ImageData(in_);
             } catch (SWTException e) {
                 if (e.code !is SWT.ERROR_INVALID_IMAGE /+&& e.code !is SWT.ERROR_UNSUPPORTED_FORMAT+/) {
-                    Trace.formatln( "FileImageDescriptor getImageData SWTException for name={}", name );
+                    getDwtLogger().trace( __FILE__, __LINE__, "FileImageDescriptor getImageData SWTException for name={}", name );
                     throw e;
                     // fall through otherwise
                 }
@@ -129,7 +127,6 @@
         InputStream is_ = null;
 
 //         if (location !is null) {
-// Trace.formatln( "FileImageDescriptor getStream importdata.length={} name={}",importdata.length, name );
             is_ = new ByteArrayInputStream(cast(byte[]) importdata);
 //             is_ = ClassInfoGetResourceAsStream( location, name);
 
--- a/org.eclipse.jface/src/org/eclipse/jface/viewers/CustomHashtable.d	Wed Mar 18 10:55:25 2009 +0100
+++ b/org.eclipse.jface/src/org/eclipse/jface/viewers/CustomHashtable.d	Wed Mar 18 12:10:17 2009 +0100
@@ -20,8 +20,6 @@
 
 import java.lang.all;
 import java.util.Enumeration;
-static import tango.text.Text;
-alias tango.text.Text.Text!(char) StringBuffer;
 
 /**
  * CustomHashtable associates keys with values. Keys and values cannot be null.
--- a/org.eclipse.jface/src/org/eclipse/jface/viewers/ViewerRow.d	Wed Mar 18 10:55:25 2009 +0100
+++ b/org.eclipse.jface/src/org/eclipse/jface/viewers/ViewerRow.d	Wed Mar 18 12:10:17 2009 +0100
@@ -31,7 +31,6 @@
 
 import java.lang.all;
 import java.util.Set;
-import tango.util.Convert;
 
 /**
  * ViewerRow is the abstract superclass of the part that represents items in a
@@ -368,7 +367,7 @@
      * @since 3.4
      */
     public void setStyleRanges(int columnIndex, StyleRange[] styleRanges) {
-        getItem().setData(KEY_TEXT_LAYOUT ~ to!(String)(columnIndex), new ArrayWrapperT!(StyleRange)(styleRanges));
+        getItem().setData(KEY_TEXT_LAYOUT ~ String_valueOf(columnIndex), new ArrayWrapperT!(StyleRange)(styleRanges));
     }
 
 
@@ -382,7 +381,7 @@
      * @since 3.4
      */
     public StyleRange[] getStyleRanges(int columnIndex) {
-        return (cast(ArrayWrapperT!(StyleRange)) getItem().getData(KEY_TEXT_LAYOUT ~ to!(String)(columnIndex))).array;
+        return (cast(ArrayWrapperT!(StyleRange)) getItem().getData(KEY_TEXT_LAYOUT ~ String_valueOf(columnIndex))).array;
     }
     
     int getWidth(int columnIndex) {
--- a/org.eclipse.jface/src/org/eclipse/jface/window/ToolTip.d	Wed Mar 18 10:55:25 2009 +0100
+++ b/org.eclipse.jface/src/org/eclipse/jface/window/ToolTip.d	Wed Mar 18 12:10:17 2009 +0100
@@ -14,8 +14,6 @@
 
 module org.eclipse.jface.window.ToolTip;
 
-import tango.util.log.Trace;
-
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.DisposeEvent;
 import org.eclipse.swt.events.DisposeListener;
--- a/rakefile	Wed Mar 18 10:55:25 2009 +0100
+++ b/rakefile	Wed Mar 18 12:10:17 2009 +0100
@@ -21,7 +21,7 @@
 end
 
 def buildTree( basedir, srcdir, resdir, dcargs="" )
-    puts "Building #{basedir} #{srcdir}"
+    puts "Building #{basedir}/#{srcdir}"
 
     objdir_abs = File.expand_path( OBJDIR )
     dimpdir_abs = File.expand_path( DIMPDIR )
@@ -87,6 +87,7 @@
 
 desc "Clean"
 task :clean do
+    puts "Cleaning"
     FileUtils.rm_rf DIMPDIR
     FileUtils.rm_rf OBJDIR
     FileUtils.rm_rf RSPNAME
@@ -102,19 +103,41 @@
     buildTree( "org.eclipse.swt.win32.win32.x86", "src", "res" )
 end
 
-desc "Build jface"
-task :jface do
+desc "Build Equinox"
+task :equinox do
     buildTree( "org.eclipse.osgi", "src", "res" )
     buildTree( "org.eclipse.osgi", "supplement/src", "res" )
     buildTree( "org.eclipse.equinox.common", "src", "res" )
+end
+
+desc "Build Eclipse Core"
+task :core do
     buildTree( "org.eclipse.core.runtime", "src", "res" )
     buildTree( "org.eclipse.core.commands", "src", "res" )
     buildTree( "org.eclipse.core.jobs", "src", "res" )
+end
+
+desc "Build JFace"
+task :jface do
     buildTree( "org.eclipse.jface", "src", "res" )
     buildTree( "org.eclipse.text", "src", "res" )
     buildTree( "org.eclipse.jface.text", "projection", "res", "-Isrc" )
     buildTree( "org.eclipse.jface.text", "src", "res" )
+end
+
+desc "Build UI Forms"
+task :uiforms do
     buildTree( "org.eclipse.ui.forms", "src", "res" )
+end
+
+desc "Build Draw2D"
+task :draw2d do
     buildTree( "org.eclipse.draw2d", "src", "res" )
 end
 
+desc "Build ALL"
+task :all => [ :java, :swt, :equinox, :core, :jface, :uiforms, :draw2d ]
+
+task :default => [ :clean, :all ]
+
+