# HG changeset patch # User Frank Benoit # Date 1236605200 -3600 # Node ID 950d84783eac67fec6dee46a25cc2867d7379d3a # Parent 2847134a5fc0421d7a7589c28a517914221217ff Removing direct tango deps. diff -r 2847134a5fc0 -r 950d84783eac java/src/java/lang/Character.d --- a/java/src/java/lang/Character.d Thu Mar 05 15:12:35 2009 +0100 +++ b/java/src/java/lang/Character.d Mon Mar 09 14:26:40 2009 +0100 @@ -9,10 +9,28 @@ implMissing( __FILE__, __LINE__); return false; } + public static dchar toUpperCase( wchar c ){ + wchar[1] src; + src[0] = c; + dchar[1] buf; + uint ate; + dchar[] res = tango.text.convert.Utf.toString32( src, buf, &ate ); + dchar[] r = tango.text.Unicode.toUpper( res ); + return r[0]; + } public static dchar toUpperCase( dchar c ){ dchar[] r = tango.text.Unicode.toUpper( [c] ); return r[0]; } + public static dchar toLowerCase( wchar c ){ + wchar[1] src; + src[0] = c; + dchar[1] buf; + uint ate; + dchar[] res = tango.text.convert.Utf.toString32( src, buf, &ate ); + dchar[] r = tango.text.Unicode.toLower( res ); + return r[0]; + } public static dchar toLowerCase( dchar c ){ dchar[] r = tango.text.Unicode.toLower( [c] ); return r[0]; @@ -23,6 +41,15 @@ public static bool isDigit( dchar c ){ return tango.text.Unicode.isDigit( c ); } + public static bool isLetter( dchar c ){ + return tango.text.Unicode.isLetter(c); + } + public static bool isSpace( dchar c ){ + return tango.text.Unicode.isSpace(c); + } + public static bool isWhiteSpace( dchar c ){ + return tango.text.Unicode.isWhitespace(c); + } public static bool isLetterOrDigit( dchar c ){ return isDigit(c) || isLetter(c); } diff -r 2847134a5fc0 -r 950d84783eac java/src/java/lang/util.d --- a/java/src/java/lang/util.d Thu Mar 05 15:12:35 2009 +0100 +++ b/java/src/java/lang/util.d Mon Mar 09 14:26:40 2009 +0100 @@ -410,10 +410,26 @@ return v ? "true" : "false"; } +String String_valueOf( byte v ){ + return tango.text.convert.Integer.toString(v); +} + +String String_valueOf( ubyte v ){ + return tango.text.convert.Integer.toString(v); +} + +String String_valueOf( short v ){ + return tango.text.convert.Integer.toString(v); +} + String String_valueOf( int v ){ return tango.text.convert.Integer.toString(v); } +String String_valueOf( uint v ){ + return tango.text.convert.Integer.toString(v); +} + String String_valueOf( long v ){ return tango.text.convert.Integer.toString(v); } @@ -442,6 +458,10 @@ return v is null ? "null" : v.toString(); } +String String_valueOf( wchar[] wstr ){ + return .toString(wstr); +} + bool CharacterIsDefined( dchar ch ){ return (ch in tango.text.UnicodeData.unicodeData) !is null; } @@ -578,6 +598,11 @@ } /// Extension to String +public dchar dcharAt( String str, int pos ){ + return str[ pos .. $ ].firstCodePoint(); +} + +/// Extension to String public void getChars( String src, int srcBegin, int srcEnd, String dst, int dstBegin){ dst[ dstBegin .. dstBegin + srcEnd - srcBegin ] = src[ srcBegin .. srcEnd ]; } diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/SWTError.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/SWTError.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/SWTError.d Mon Mar 09 14:26:40 2009 +0100 @@ -12,10 +12,9 @@ *******************************************************************************/ module org.eclipse.swt.SWTError; -import org.eclipse.swt.SWT; +import java.lang.all; -import tango.io.Stdout; -import java.lang.all; +import org.eclipse.swt.SWT; /** * This error is thrown whenever an unrecoverable error @@ -148,14 +147,14 @@ *

*/ public void printStackTrace () { - Stderr.formatln( "stacktrace follows (if feature compiled in)" ); + getDwtLogger().error( "stacktrace follows (if feature compiled in)" ); foreach( msg; info ){ - Stderr.formatln( "{}", msg ); + getDwtLogger().error( "{}", msg ); } if ( throwable !is null) { - Stderr.formatln ("*** Stack trace of contained error ***"); //$NON-NLS-1$ + getDwtLogger().error ("*** Stack trace of contained error ***"); //$NON-NLS-1$ foreach( msg; throwable.info ){ - Stderr.formatln( "{}", msg ); + getDwtLogger().error( "{}", msg ); } } } diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/SWTException.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/SWTException.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/SWTException.d Mon Mar 09 14:26:40 2009 +0100 @@ -12,10 +12,9 @@ *******************************************************************************/ module org.eclipse.swt.SWTException; -import org.eclipse.swt.SWT; +import java.lang.all; -import tango.io.Stdout; -import java.lang.all; +import org.eclipse.swt.SWT; /** * This runtime exception is thrown whenever a recoverable error @@ -139,14 +138,14 @@ *

*/ public void printStackTrace () { - Stderr.formatln( "stacktrace follows (if feature compiled in)" ); + getDwtLogger().error( "stacktrace follows (if feature compiled in)" ); foreach( msg; info ){ - Stderr.formatln( "{}", msg ); + getDwtLogger().error( "{}", msg ); } if ( throwable !is null) { - Stderr.formatln ("*** Stack trace of contained exception ***"); //$NON-NLS-1$ + getDwtLogger().error ("*** Stack trace of contained exception ***"); //$NON-NLS-1$ foreach( msg; throwable.info ){ - Stderr.formatln( "{}", msg ); + getDwtLogger().error( "{}", msg ); } } } diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/accessibility/Accessible.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/accessibility/Accessible.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/accessibility/Accessible.d Mon Mar 09 14:26:40 2009 +0100 @@ -37,7 +37,6 @@ import org.eclipse.swt.accessibility.AccessibleEvent; import java.lang.all; -import tango.core.Array; import tango.core.Thread; /** diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/custom/CLabel.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/custom/CLabel.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/custom/CLabel.d Mon Mar 09 14:26:40 2009 +0100 @@ -349,9 +349,7 @@ void onMnemonic(TraverseEvent event) { dchar mnemonic = _findMnemonic(text); if (mnemonic is '\0') return; - dchar[1] d; uint ate; - auto r = tango.text.convert.Utf.toString32( [event.character][], d, &ate ); - if (tango.text.Unicode.toLower(r)[0] !is mnemonic) return; + if (Character.toLowerCase(event.character) !is mnemonic) return; Composite control = this.getParent(); while (control !is null) { Control [] children = control.getChildren(); @@ -798,7 +796,7 @@ layout.setText(t); mid = validateOffset(layout, mid); while (min < mid && mid < max) { - String s1 = t[0 .. mid].dup; + String s1 = t.substring(0, mid); String s2 = t.substring(validateOffset(layout, l-mid), l); int l1 = gc.textExtent(s1, DRAW_FLAGS).x; int l2 = gc.textExtent(s2, DRAW_FLAGS).x; @@ -825,18 +823,18 @@ String[] lines = new String[1]; int start = 0, pos; do { - pos = tango.text.Util.locate( text, '\n', start); - if (pos is text.length ) { - lines[lines.length - 1] = text[start .. $ ]; + pos = text.indexOf('\n', start); + if (pos is -1) { + lines[lines.length - 1] = text.substring(start); } else { - bool crlf = (pos > 0) && (text[ pos - 1 ] is '\r'); - lines[lines.length - 1] = text[ start .. pos - (crlf ? 1 : 0)]; + bool crlf = (pos > 0) && (text.charAt(pos - 1) is '\r'); + lines[lines.length - 1] = text.substring(start, pos - (crlf ? 1 : 0)); start = pos + 1; String[] newLines = new String[lines.length+1]; System.arraycopy(lines, 0, newLines, 0, lines.length); lines = newLines; } - } while (pos !is text.length); + } while (pos !is -1); return lines; } } diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/custom/CTabFolder.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/custom/CTabFolder.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/custom/CTabFolder.d Mon Mar 09 14:26:40 2009 +0100 @@ -48,8 +48,6 @@ import org.eclipse.swt.custom.CTabFolderEvent; import java.lang.all; -import tango.util.Convert; -static import tango.text.convert.Utf; /** * @@ -886,7 +884,7 @@ } count = items.length - showCount; } - String chevronString = count > 99 ? "99+" : to!(String)(count); //$NON-NLS-1$ + String chevronString = count > 99 ? "99+" : String_valueOf(count); //$NON-NLS-1$ switch (chevronImageState) { case NORMAL: { Color chevronBorder = single ? getSelectionForeground() : getForeground(); @@ -1683,7 +1681,7 @@ if (text !is null) { dchar mnemonic = _findMnemonic(text); if (mnemonic !is '\0') { - shortcut = "Alt+"~tango.text.convert.Utf.toString([mnemonic]); //$NON-NLS-1$ + shortcut = "Alt+"~dcharToString(mnemonic); //$NON-NLS-1$ } } } diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/custom/CTabFolderEvent.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/custom/CTabFolderEvent.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/custom/CTabFolderEvent.d Mon Mar 09 14:26:40 2009 +0100 @@ -19,7 +19,6 @@ import org.eclipse.swt.events.TypedEvent; import org.eclipse.swt.widgets.Widget; -import tango.util.Convert; /** * This event is sent when an event is generated in the CTabFolder. @@ -88,12 +87,12 @@ public override String toString() { String string = super.toString (); return string[0.. $ - 1] // remove trailing '}' - ~ " item=" ~ to!(String)(item) - ~ " doit=" ~ to!(String)(doit) - ~ " x=" ~ to!(String)(x) - ~ " y=" ~ to!(String)(y) - ~ " width=" ~ to!(String)(width) - ~ " height=" ~ to!(String)(height) + ~ " item=" ~ String_valueOf(item) + ~ " doit=" ~ String_valueOf(doit) + ~ " x=" ~ String_valueOf(x) + ~ " y=" ~ String_valueOf(y) + ~ " width=" ~ String_valueOf(width) + ~ " height=" ~ String_valueOf(height) ~ "}"; } } diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/custom/DefaultContent.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/custom/DefaultContent.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/custom/DefaultContent.d Mon Mar 09 14:26:40 2009 +0100 @@ -12,6 +12,8 @@ *******************************************************************************/ module org.eclipse.swt.custom.DefaultContent; +import java.lang.all; + import org.eclipse.swt.SWT; import org.eclipse.swt.SWTException; import org.eclipse.swt.internal.Compatibility; @@ -21,13 +23,9 @@ import org.eclipse.swt.custom.StyledTextEvent; import org.eclipse.swt.custom.StyledTextListener; import org.eclipse.swt.custom.StyledText; -import java.lang.all; - -static import tango.io.model.IFile; -static import tango.text.Text; class DefaultContent : StyledTextContent { - private final static String LineDelimiter = tango.io.model.IFile.FileConst.NewlineString; + private final static String LineDelimiter = "\r\n"; StyledTextListener[] textListeners; // stores text listeners for event sending char[] textStore; // stores the actual text diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/custom/PopupList.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/custom/PopupList.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/custom/PopupList.d Mon Mar 09 14:26:40 2009 +0100 @@ -228,7 +228,7 @@ // specified string if (string !is null){ for (int i = 0; i < items.length; i++) { - if ( tango.text.Util.locatePattern( items[i], string) is 0 ){ + if (items[i].startsWith(string)){ int index = list.indexOf(items[i]); list.select(index); break; diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/custom/SashFormData.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/custom/SashFormData.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/custom/SashFormData.d Mon Mar 09 14:26:40 2009 +0100 @@ -14,18 +14,15 @@ import java.lang.all; -static import tango.text.Util; -import tango.util.Convert; - class SashFormData { long weight; String getName () { - String string = this.classinfo.name; - int index = tango.text.Util.locatePrior( string ,'.' ); - if (index is string.length ) return string; - return string[ index + 1 .. $ ]; + String str = this.classinfo.name; + int index = str.lastIndexOf ('.'); + if (index is -1) return str; + return str.substring (index + 1, str.length ()); } /** @@ -35,6 +32,6 @@ * @return a string representation of the event */ public override String toString () { - return getName()~" {weight="~to!(String)(weight)~"}"; //$NON-NLS-2$ + return getName()~" {weight="~String_valueOf(weight)~"}"; //$NON-NLS-2$ } } diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/custom/StackLayout.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/custom/StackLayout.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/custom/StackLayout.d Mon Mar 09 14:26:40 2009 +0100 @@ -14,8 +14,6 @@ import java.lang.all; - - import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.graphics.Rectangle; @@ -23,9 +21,6 @@ import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Layout; -import tango.util.Convert; -static import tango.text.Util; - /** * This Layout stacks all the controls one on top of the other and resizes all controls * to have the same size and location. @@ -136,9 +131,9 @@ String getName () { String string = this.classinfo.name; - int index = tango.text.Util.locatePrior( string ,'.'); - if (index is string.length ) return string; - return string[ index + 1 .. $ ]; + int index = string.lastIndexOf ('.'); + if (index is -1 ) return string; + return string.substring (index + 1, string.length ); } /** @@ -149,10 +144,10 @@ */ public override String toString () { String string = getName ()~" {"; - if (marginWidth !is 0) string ~= "marginWidth="~to!(String)(marginWidth)~" "; - if (marginHeight !is 0) string ~= "marginHeight="~to!(String)(marginHeight)~" "; - if (topControl !is null) string ~= "topControl="~to!(String)(topControl)~" "; - string = tango.text.Util.trim(string); + if (marginWidth !is 0) string ~= "marginWidth="~String_valueOf(marginWidth)~" "; + if (marginHeight !is 0) string ~= "marginHeight="~String_valueOf(marginHeight)~" "; + if (topControl !is null) string ~= "topControl="~String_valueOf(topControl)~" "; + string = string.trim(); string ~= "}"; return string; } diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/custom/StyleRange.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/custom/StyleRange.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/custom/StyleRange.d Mon Mar 09 14:26:40 2009 +0100 @@ -14,7 +14,6 @@ import java.lang.all; - import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.TextStyle; @@ -217,9 +216,8 @@ buffer.append("normal"); } String str = super.toString(); - int index = tango.text.Util.locate( str, '{'); - if( index is str.length ) index = -1; - str = str[ index + 1 .. $ ]; + int index = str.indexOf( '{'); + str = str.substring( index + 1 ); if (str.length > 1) buffer.append(", "); buffer.append(str); return buffer.toString(); diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/custom/StyledText.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/custom/StyledText.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/custom/StyledText.d Mon Mar 09 14:26:40 2009 +0100 @@ -83,11 +83,6 @@ import org.eclipse.swt.custom.ST; import java.lang.Runnable; -static import tango.text.Text; -static import tango.text.Util; -static import tango.io.model.IFile; -static import tango.text.convert.Utf; -import tango.util.Convert; import java.lang.all; /** @@ -150,7 +145,7 @@ alias Canvas.computeSize computeSize; static const char TAB = '\t'; - static const String PlatformLineDelimiter = tango.io.model.IFile.FileConst.NewlineString; + static const String PlatformLineDelimiter = "\r\n"; static const int BIDI_CARET_WIDTH = 3; static const int DEFAULT_WIDTH = 64; static const int DEFAULT_HEIGHT = 64; @@ -702,7 +697,7 @@ printLayout.setText(""); } } else { - printLayout.setText(to!(String)(index)); + printLayout.setText(String_valueOf(index)); } int paintX = x - printMargin - printLayout.getBounds().width; printLayout.draw(gc, paintX, y); @@ -879,7 +874,7 @@ write( string[start .. index ] ); } write("\\u"); - write( to!(String)( cast(short)ch )); + write( String_valueOf( cast(short)ch )); write(' '); // control word delimiter start = index + incr; } else if (ch is '}' || ch is '{' || ch is '\\') { @@ -3998,8 +3993,8 @@ String line = content.getLine(lineIndex); int level; int offset = offsetInLine; - while (offset > 0 && tango.text.Unicode.isDigit(line[offset])) offset--; - if (offset is 0 && tango.text.Unicode.isDigit(line[offset])) { + while (offset > 0 && Character.isDigit(line.dcharAt(offset))) offset--; + if (offset is 0 && Character.isDigit(line.dcharAt(offset))) { level = isMirrored() ? 1 : 0; } else { level = layout.getLevel(offset) & 0x1; @@ -4804,8 +4799,8 @@ if (lineLength is 0) return isMirrored() ? SWT.RIGHT : SWT.LEFT; if (caretAlignment is PREVIOUS_OFFSET_TRAILING && offset > 0) offset--; if (offset is lineLength && offset > 0) offset--; - while (offset > 0 && tango.text.Unicode.isDigit(line[offset])) offset--; - if (offset is 0 && tango.text.Unicode.isDigit(line[offset])) { + while (offset > 0 && Character.isDigit(line.dcharAt(offset))) offset--; + if (offset is 0 && Character.isDigit(line.dcharAt(offset))) { return isMirrored() ? SWT.RIGHT : SWT.LEFT; } TextLayout layout = renderer.getTextLayout(caretLine); @@ -5661,7 +5656,7 @@ if (text !is null) { dchar mnemonic = _findMnemonic (text); if (mnemonic !is '\0') { - shortcut = "Alt+"~tango.text.convert.Utf.toString( [mnemonic] ); //$NON-NLS-1$ + shortcut = "Alt+"~dcharToString(mnemonic); //$NON-NLS-1$ } } } diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/custom/StyledTextRenderer.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/custom/StyledTextRenderer.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/custom/StyledTextRenderer.d Mon Mar 09 14:26:40 2009 +0100 @@ -38,14 +38,8 @@ import org.eclipse.swt.custom.ST; import org.eclipse.swt.custom.StyledTextEvent; -import java.lang.Runnable; import java.lang.all; -static import tango.text.Text; -static import tango.text.Util; -static import tango.text.convert.Utf; -import tango.util.Convert; - /** * A StyledTextRenderer renders the content of a StyledText widget. * This class can be used to render to the display or to a printer. @@ -363,7 +357,7 @@ int type = bullet.type & (ST.BULLET_DOT|ST.BULLET_NUMBER|ST.BULLET_LETTER_LOWER|ST.BULLET_LETTER_UPPER); switch (type) { case ST.BULLET_DOT: string = "\u2022"; break; - case ST.BULLET_NUMBER: string = to!(String)(index); break; + case ST.BULLET_NUMBER: string = String_valueOf(index); break; case ST.BULLET_LETTER_LOWER: string = [cast(char) (index % 26 + 97)]; break; case ST.BULLET_LETTER_UPPER: string = [cast(char) (index % 26 + 65)]; break; default: diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/dnd/DND.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/dnd/DND.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/dnd/DND.d Mon Mar 09 14:26:40 2009 +0100 @@ -17,7 +17,6 @@ import org.eclipse.swt.SWTError; import org.eclipse.swt.SWTException; -import tango.util.Convert; import java.lang.all; /** @@ -265,22 +264,22 @@ /* OS Failure/Limit (fatal, may occur only on some platforms) */ case DND.ERROR_CANNOT_INIT_DRAG:{ String msg = DND.INIT_DRAG_MESSAGE; - if (hresult !is 0) msg ~= " result = "~to!(String)(hresult); //$NON-NLS-1$ + if (hresult !is 0) msg ~= " result = "~String_valueOf(hresult); //$NON-NLS-1$ throw new SWTError (code, msg); } case DND.ERROR_CANNOT_INIT_DROP:{ String msg = DND.INIT_DROP_MESSAGE; - if (hresult !is 0) msg ~= " result = "~to!(String)(hresult); //$NON-NLS-1$ + if (hresult !is 0) msg ~= " result = "~String_valueOf(hresult); //$NON-NLS-1$ throw new SWTError (code, msg); } case DND.ERROR_CANNOT_SET_CLIPBOARD:{ String msg = DND.CANNOT_SET_CLIPBOARD_MESSAGE; - if (hresult !is 0) msg ~= " result = "~to!(String)(hresult); //$NON-NLS-1$ + if (hresult !is 0) msg ~= " result = "~String_valueOf(hresult); //$NON-NLS-1$ throw new SWTError (code, msg); } case DND.ERROR_INVALID_DATA:{ String msg = DND.INVALID_DATA_MESSAGE; - if (hresult !is 0) msg ~= " result = "~to!(String)(hresult); //$NON-NLS-1$ + if (hresult !is 0) msg ~= " result = "~String_valueOf(hresult); //$NON-NLS-1$ throw new SWTException (code, msg); } default: diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/events/TypedEvent.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/events/TypedEvent.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/events/TypedEvent.d Mon Mar 09 14:26:40 2009 +0100 @@ -12,13 +12,11 @@ *******************************************************************************/ module org.eclipse.swt.events.TypedEvent; - import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Widget; import org.eclipse.swt.internal.SWTEventObject; -import tango.text.Util : split; import java.lang.all; /** @@ -90,7 +88,9 @@ */ String getName () { String str = this.classinfo.name; - return split( str, "." )[$-1]; + int index = str.lastIndexOf ('.'); + if (index is -1) return str; + return str.substring (index + 1, str.length ); } /** diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/graphics/Device.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/graphics/Device.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/graphics/Device.d Mon Mar 09 14:26:40 2009 +0100 @@ -37,8 +37,6 @@ import java.lang.System; import java.lang.all; -import tango.util.Convert; -import tango.io.Stdout; /** * This class is the abstract superclass of all device objects, @@ -877,22 +875,22 @@ } if (objectCount !is 0) { String string = "Summary: "; - if (colors !is 0) string ~= to!(String)(colors) ~ " Color(s), "; - if (cursors !is 0) string ~= to!(String)(cursors) ~ " Cursor(s), "; - if (fonts !is 0) string ~= to!(String)(fonts) ~ " Font(s), "; - if (gcs !is 0) string ~= to!(String)(gcs) ~ " GC(s), "; - if (images !is 0) string ~= to!(String)(images) ~ " Image(s), "; - if (paths !is 0) string ~= to!(String)(paths) ~ " Path(s), "; - if (patterns !is 0) string ~= to!(String)(patterns) ~ " Pattern(s), "; - if (regions !is 0) string ~= to!(String)(regions) ~ " Region(s), "; - if (textLayouts !is 0) string ~= to!(String)(textLayouts) ~ " TextLayout(s), "; - if (transforms !is 0) string ~= to!(String)(transforms) ~ " Transforms(s), "; + if (colors !is 0) string ~= String_valueOf(colors) ~ " Color(s), "; + if (cursors !is 0) string ~= String_valueOf(cursors) ~ " Cursor(s), "; + if (fonts !is 0) string ~= String_valueOf(fonts) ~ " Font(s), "; + if (gcs !is 0) string ~= String_valueOf(gcs) ~ " GC(s), "; + if (images !is 0) string ~= String_valueOf(images) ~ " Image(s), "; + if (paths !is 0) string ~= String_valueOf(paths) ~ " Path(s), "; + if (patterns !is 0) string ~= String_valueOf(patterns) ~ " Pattern(s), "; + if (regions !is 0) string ~= String_valueOf(regions) ~ " Region(s), "; + if (textLayouts !is 0) string ~= String_valueOf(textLayouts) ~ " TextLayout(s), "; + if (transforms !is 0) string ~= String_valueOf(transforms) ~ " Transforms(s), "; if (string.length !is 0) { string = string.substring (0, string.length - 2); - Stderr.formatln ( "{}", string); + getDwtLogger().error ( "{}", string); } for (int i=0; i startLength) buffer ~= ", "; buffer ~= "rise="; - buffer ~= to!(String)(rise); + buffer ~= String_valueOf(rise); } if (metrics !is null) { if (buffer.length > startLength) buffer ~= ", "; diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/BidiUtil.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/BidiUtil.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/BidiUtil.d Mon Mar 09 14:26:40 2009 +0100 @@ -18,7 +18,6 @@ import org.eclipse.swt.internal.win32.OS; import org.eclipse.swt.widgets.Control; -import tango.util.Convert; import java.lang.all; import java.lang.Runnable; @@ -468,7 +467,7 @@ if (isBidiPlatform_ is 1) return true; // need to look at system code page for NT & 98 platforms since EnumSystemLanguageGroups is // not supported for these platforms - String codePage = to!(String)(OS.GetACP()); + String codePage = String_valueOf(OS.GetACP()); if (CD_PG_ARABIC==/*eq*/codePage || CD_PG_HEBREW==/*eq*/codePage) { isBidiPlatform_ = 1; } diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/Compatibility.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/Compatibility.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/Compatibility.d Mon Mar 09 14:26:40 2009 +0100 @@ -226,7 +226,7 @@ * @return true when the character is a letter */ public static bool isLetter(dchar c) { - return Unicode.isLetter(c); + return Character.isLetter(c); } /** @@ -236,7 +236,7 @@ * @return true when the character is a letter or a digit */ public static bool isLetterOrDigit(dchar c) { - return Unicode.isLetterOrDigit(c); + return Character.isLetterOrDigit(c); } /** @@ -246,7 +246,7 @@ * @return true when the character is a Unicode space character */ public static bool isSpaceChar(dchar c) { - return Unicode.isSpace(c); + return Character.isSpace(c); } /** @@ -256,7 +256,7 @@ * @return true if the character is whitespace */ public static bool isWhitespace(dchar c) { - return Unicode.isWhitespace(c); + return Character.isWhitespace(c); } /** diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/Library.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/Library.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/Library.d Mon Mar 09 14:26:40 2009 +0100 @@ -12,7 +12,6 @@ *******************************************************************************/ module org.eclipse.swt.internal.Library; -import tango.util.Convert; import java.lang.all; // do it here, so it can be evaluated at compile time @@ -64,18 +63,18 @@ } while (index < length && isDigit(aVersion[index])) index++; try { - if (start < length) major = to!(int)( aVersion[start .. index] ); - } catch (ConversionException e) {} + if (start < length) major = Integer.parseInt( aVersion[start .. index] ); + } catch (NumberFormatException e) {} start = ++index; while (index < length && isDigit(aVersion[index])) index++; try { - if (start < length) minor = to!(int)(aVersion[start .. index]); - } catch (ConversionException e) {} + if (start < length) minor = Integer.parseInt(aVersion[start .. index]); + } catch (NumberFormatException e) {} start = ++index; while (index < length && isDigit(aVersion[index])) index++; try { - if (start < length) micro = to!(int)(aVersion[start .. index]); - } catch (ConversionException e) {} + if (start < length) micro = Integer.parseInt(aVersion[start .. index]); + } catch (NumberFormatException e) {} return buildJAVA_VERSION(major, minor, micro); } diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/image/JPEGDecoder.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/image/JPEGDecoder.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/image/JPEGDecoder.d Mon Mar 09 14:26:40 2009 +0100 @@ -22,7 +22,6 @@ import org.eclipse.swt.graphics.RGB; import java.lang.all; -import tango.util.Convert; public class JPEGDecoder { @@ -5831,7 +5830,7 @@ /* For now, precision must match compiled-in value... */ if (cinfo.data_precision !is BITS_IN_JSAMPLE) - error(" [data precision=" ~ to!(String)(cinfo.data_precision) ~ "]"); + error(" [data precision=" ~ String_valueOf(cinfo.data_precision) ~ "]"); // ERREXIT1(cinfo, JERR_BAD_PRECISION, cinfo.data_precision); /* Check that number of components won't exceed internal array sizes */ diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/mozilla/nsEmbedString.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/mozilla/nsEmbedString.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/mozilla/nsEmbedString.d Mon Mar 09 14:26:40 2009 +0100 @@ -1,6 +1,6 @@ module org.eclipse.swt.internal.mozilla.nsEmbedString; -import Utf = tango.text.convert.Utf; +import java.lang.all; import org.eclipse.swt.internal.mozilla.Common; import org.eclipse.swt.internal.mozilla.nsStringAPI; @@ -39,7 +39,7 @@ char[] toString() { - return Utf.toString(this.toString16()); + return String_valueOf(this.toString16()); } ~this() { diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/mozilla/nsStringAPI.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/mozilla/nsStringAPI.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/mozilla/nsStringAPI.d Mon Mar 09 14:26:40 2009 +0100 @@ -1,6 +1,6 @@ module org.eclipse.swt.internal.mozilla.nsStringAPI; -import Utf = tango.text.convert.Utf; +import java.lang.all; import org.eclipse.swt.internal.mozilla.Common; extern (System): @@ -92,7 +92,7 @@ static char[] toString( nsAString* str ) { - return Utf.toString( nsAString.toString16( str ) ); + return String_valueOf( nsAString.toString16( str ) ); } private: diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/win32/OS.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/win32/OS.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/win32/OS.d Mon Mar 09 14:26:40 2009 +0100 @@ -25,8 +25,6 @@ static import tango.stdc.stdlib; static import tango.stdc.string; -static import tango.text.convert.Utf; -static import tango.io.Console; alias tango.sys.win32.UserGdi WINAPI; alias org.eclipse.swt.internal.win32.WINAPI DWTWINAPI; @@ -3603,7 +3601,6 @@ } // END of OS //----------------------------------------------------------------------------- import tango.sys.win32.CodePage : CodePage; -private import tango.text.convert.Utf; private import tango.stdc.stringz; // convert UTF-8 to MBCS @@ -3616,7 +3613,7 @@ { CHAR[] result; int i; - wchar[] ws = tango.text.convert.Utf.toString16(sc); + wchar[] ws = toWCharArray(sc); result.length = OS.WideCharToMultiByte(codepage, 0, ws.ptr, ws.length, null, 0, null, null); i = OS.WideCharToMultiByte(codepage, 0, ws.ptr, ws.length, result.ptr, result.length, null, null); assert(i == result.length); @@ -3654,7 +3651,7 @@ public wchar[] StrToWCHARs(char[] sc, bool terminated = false ) { wchar[] ret; try{ - ret = tango.text.convert.Utf.toString16(sc); + ret = toWCharArray(sc); }catch(Exception e){ // do nothing ret = ""; @@ -3691,7 +3688,7 @@ wchar[] wcs = _mbcszToWs(pString, _length, codepage); char[] result; try{ - result = .toString(wcs); + result = String_valueOf(wcs); }catch(Exception e){ } return result; @@ -3719,7 +3716,7 @@ char[] result; try{ - result = .toString(wcs); + result = String_valueOf(wcs); }catch(Exception e){ // do nothing } diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/layout/FillLayout.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/layout/FillLayout.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/layout/FillLayout.d Mon Mar 09 14:26:40 2009 +0100 @@ -21,7 +21,6 @@ import org.eclipse.swt.widgets.Scrollable; import org.eclipse.swt.layout.FillData; -import tango.util.Convert; import java.lang.all; /** @@ -238,9 +237,9 @@ override public String toString () { String string = getName () ~ " {"; string ~= "type="~((type is SWT.VERTICAL) ? "SWT.VERTICAL" : "SWT.HORIZONTAL")~" "; - if (marginWidth !is 0) string ~= "marginWidth="~to!(String)(marginWidth)~" "; - if (marginHeight !is 0) string ~= "marginHeight="~to!(String)(marginHeight)~" "; - if (spacing !is 0) string ~= "spacing="~to!(String)(spacing)~" "; + if (marginWidth !is 0) string ~= "marginWidth="~String_valueOf(marginWidth)~" "; + if (marginHeight !is 0) string ~= "marginHeight="~String_valueOf(marginHeight)~" "; + if (spacing !is 0) string ~= "spacing="~String_valueOf(spacing)~" "; string = string.trim(); string ~= "}"; return string; diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/layout/FormData.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/layout/FormData.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/layout/FormData.d Mon Mar 09 14:26:40 2009 +0100 @@ -18,7 +18,6 @@ import org.eclipse.swt.widgets.Control; import org.eclipse.swt.layout.FormAttachment; -import tango.util.Convert; import java.lang.all; /** @@ -336,12 +335,12 @@ */ override public String toString () { String string = getName()~" {"; - if (width !is SWT.DEFAULT) string ~= "width="~to!(String)(width)~" "; - if (height !is SWT.DEFAULT) string ~= "height="~to!(String)(height)~" "; - if (left !is null) string ~= "left="~to!(String)(left)~" "; - if (right !is null) string ~= "right="~to!(String)(right)~" "; - if (top !is null) string ~= "top="~to!(String)(top)~" "; - if (bottom !is null) string ~= "bottom="~to!(String)(bottom)~" "; + if (width !is SWT.DEFAULT) string ~= "width="~String_valueOf(width)~" "; + if (height !is SWT.DEFAULT) string ~= "height="~String_valueOf(height)~" "; + if (left !is null) string ~= "left="~String_valueOf(left)~" "; + if (right !is null) string ~= "right="~String_valueOf(right)~" "; + if (top !is null) string ~= "top="~String_valueOf(top)~" "; + if (bottom !is null) string ~= "bottom="~String_valueOf(bottom)~" "; string = string.trim(); string ~= "}"; return string; diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/layout/FormLayout.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/layout/FormLayout.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/layout/FormLayout.d Mon Mar 09 14:26:40 2009 +0100 @@ -22,7 +22,6 @@ import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Scrollable; -import tango.util.Convert; import java.lang.all; /** @@ -382,13 +381,13 @@ */ override public String toString () { String string = getName ()~" {"; - if (marginWidth !is 0) string ~= "marginWidth="~to!(String)(marginWidth)~" "; - if (marginHeight !is 0) string ~= "marginHeight="~to!(String)(marginHeight)~" "; - if (marginLeft !is 0) string ~= "marginLeft="~to!(String)(marginLeft)~" "; - if (marginRight !is 0) string ~= "marginRight="~to!(String)(marginRight)~" "; - if (marginTop !is 0) string ~= "marginTop="~to!(String)(marginTop)~" "; - if (marginBottom !is 0) string ~= "marginBottom="~to!(String)(marginBottom)~" "; - if (spacing !is 0) string ~= "spacing="~to!(String)(spacing)~" "; + if (marginWidth !is 0) string ~= "marginWidth="~String_valueOf(marginWidth)~" "; + if (marginHeight !is 0) string ~= "marginHeight="~String_valueOf(marginHeight)~" "; + if (marginLeft !is 0) string ~= "marginLeft="~String_valueOf(marginLeft)~" "; + if (marginRight !is 0) string ~= "marginRight="~String_valueOf(marginRight)~" "; + if (marginTop !is 0) string ~= "marginTop="~String_valueOf(marginTop)~" "; + if (marginBottom !is 0) string ~= "marginBottom="~String_valueOf(marginBottom)~" "; + if (spacing !is 0) string ~= "spacing="~String_valueOf(spacing)~" "; string = string.trim(); string ~= "}"; return string; diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/layout/GridData.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/layout/GridData.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/layout/GridData.d Mon Mar 09 14:26:40 2009 +0100 @@ -16,7 +16,6 @@ import org.eclipse.swt.graphics.Point; import org.eclipse.swt.widgets.Control; -import tango.util.Convert; import java.lang.all; /** @@ -532,7 +531,7 @@ case SWT.RIGHT: hAlign = "SWT.RIGHT"; break; case SWT.CENTER: hAlign = "SWT.CENTER"; break; case CENTER: hAlign = "GridData.CENTER"; break; - default: hAlign = "Undefined "~to!(String)(horizontalAlignment); break; + default: hAlign = "Undefined "~String_valueOf(horizontalAlignment); break; } String vAlign = ""; switch (verticalAlignment) { @@ -544,22 +543,22 @@ case SWT.BOTTOM: vAlign = "SWT.BOTTOM"; break; case SWT.CENTER: vAlign = "SWT.CENTER"; break; case CENTER: vAlign = "GridData.CENTER"; break; - default: vAlign = "Undefined "~to!(String)(verticalAlignment); break; + default: vAlign = "Undefined "~String_valueOf(verticalAlignment); break; } String string = getName()~" {"; - string ~= "horizontalAlignment="~to!(String)(hAlign)~" "; - if (horizontalIndent !is 0) string ~= "horizontalIndent="~to!(String)(horizontalIndent)~" "; - if (horizontalSpan !is 1) string ~= "horizontalSpan="~to!(String)(horizontalSpan)~" "; - if (grabExcessHorizontalSpace) string ~= "grabExcessHorizontalSpace="~to!(String)(grabExcessHorizontalSpace)~" "; - if (widthHint !is SWT.DEFAULT) string ~= "widthHint="~to!(String)(widthHint)~" "; - if (minimumWidth !is 0) string ~= "minimumWidth="~to!(String)(minimumWidth)~" "; + string ~= "horizontalAlignment="~String_valueOf(hAlign)~" "; + if (horizontalIndent !is 0) string ~= "horizontalIndent="~String_valueOf(horizontalIndent)~" "; + if (horizontalSpan !is 1) string ~= "horizontalSpan="~String_valueOf(horizontalSpan)~" "; + if (grabExcessHorizontalSpace) string ~= "grabExcessHorizontalSpace="~String_valueOf(grabExcessHorizontalSpace)~" "; + if (widthHint !is SWT.DEFAULT) string ~= "widthHint="~String_valueOf(widthHint)~" "; + if (minimumWidth !is 0) string ~= "minimumWidth="~String_valueOf(minimumWidth)~" "; string ~= "verticalAlignment="~vAlign~" "; - if (verticalIndent !is 0) string ~= "verticalIndent="~to!(String)(verticalIndent)~" "; - if (verticalSpan !is 1) string ~= "verticalSpan="~to!(String)(verticalSpan)~" "; - if (grabExcessVerticalSpace) string ~= "grabExcessVerticalSpace="~to!(String)(grabExcessVerticalSpace)~" "; - if (heightHint !is SWT.DEFAULT) string ~= "heightHint="~to!(String)(heightHint)~" "; - if (minimumHeight !is 0) string ~= "minimumHeight="~to!(String)(minimumHeight)~" "; - if (exclude) string ~= "exclude="~to!(String)(exclude)~" "; + if (verticalIndent !is 0) string ~= "verticalIndent="~String_valueOf(verticalIndent)~" "; + if (verticalSpan !is 1) string ~= "verticalSpan="~String_valueOf(verticalSpan)~" "; + if (grabExcessVerticalSpace) string ~= "grabExcessVerticalSpace="~String_valueOf(grabExcessVerticalSpace)~" "; + if (heightHint !is SWT.DEFAULT) string ~= "heightHint="~String_valueOf(heightHint)~" "; + if (minimumHeight !is 0) string ~= "minimumHeight="~String_valueOf(minimumHeight)~" "; + if (exclude) string ~= "exclude="~String_valueOf(exclude)~" "; string = string.trim(); string ~= "}"; return string; diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/layout/GridLayout.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/layout/GridLayout.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/layout/GridLayout.d Mon Mar 09 14:26:40 2009 +0100 @@ -23,7 +23,6 @@ import java.lang.System; -import tango.util.Convert; import java.lang.all; @@ -743,16 +742,16 @@ */ override public String toString () { String string = getName ()~" {"; - if (numColumns !is 1) string ~= "numColumns="~to!(String)(numColumns)~" "; - if (makeColumnsEqualWidth) string ~= "makeColumnsEqualWidth="~to!(String)(makeColumnsEqualWidth)~" "; - if (marginWidth !is 0) string ~= "marginWidth="~to!(String)(marginWidth)~" "; - if (marginHeight !is 0) string ~= "marginHeight="~to!(String)(marginHeight)~" "; - if (marginLeft !is 0) string ~= "marginLeft="~to!(String)(marginLeft)~" "; - if (marginRight !is 0) string ~= "marginRight="~to!(String)(marginRight)~" "; - if (marginTop !is 0) string ~= "marginTop="~to!(String)(marginTop)~" "; - if (marginBottom !is 0) string ~= "marginBottom="~to!(String)(marginBottom)~" "; - if (horizontalSpacing !is 0) string ~= "horizontalSpacing="~to!(String)(horizontalSpacing)~" "; - if (verticalSpacing !is 0) string ~= "verticalSpacing="~to!(String)(verticalSpacing)~" "; + if (numColumns !is 1) string ~= "numColumns="~String_valueOf(numColumns)~" "; + if (makeColumnsEqualWidth) string ~= "makeColumnsEqualWidth="~String_valueOf(makeColumnsEqualWidth)~" "; + if (marginWidth !is 0) string ~= "marginWidth="~String_valueOf(marginWidth)~" "; + if (marginHeight !is 0) string ~= "marginHeight="~String_valueOf(marginHeight)~" "; + if (marginLeft !is 0) string ~= "marginLeft="~String_valueOf(marginLeft)~" "; + if (marginRight !is 0) string ~= "marginRight="~String_valueOf(marginRight)~" "; + if (marginTop !is 0) string ~= "marginTop="~String_valueOf(marginTop)~" "; + if (marginBottom !is 0) string ~= "marginBottom="~String_valueOf(marginBottom)~" "; + if (horizontalSpacing !is 0) string ~= "horizontalSpacing="~String_valueOf(horizontalSpacing)~" "; + if (verticalSpacing !is 0) string ~= "verticalSpacing="~String_valueOf(verticalSpacing)~" "; string = string.trim(); string ~= "}"; return string; diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/layout/RowData.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/layout/RowData.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/layout/RowData.d Mon Mar 09 14:26:40 2009 +0100 @@ -16,7 +16,6 @@ import org.eclipse.swt.graphics.Point; import org.eclipse.swt.widgets.Control; -import tango.util.Convert; import java.lang.all; /** @@ -121,9 +120,9 @@ */ override public String toString () { String string = getName ()~" {"; - if (width !is SWT.DEFAULT) string ~= "width="~to!(String)(width)~" "; - if (height !is SWT.DEFAULT) string ~= "height="~to!(String)(height)~" "; - if (exclude) string ~= "exclude="~to!(String)(exclude)~" "; + if (width !is SWT.DEFAULT) string ~= "width="~String_valueOf(width)~" "; + if (height !is SWT.DEFAULT) string ~= "height="~String_valueOf(height)~" "; + if (exclude) string ~= "exclude="~String_valueOf(exclude)~" "; string = string.trim(); string ~= "}"; return string; diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/layout/RowLayout.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/layout/RowLayout.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/layout/RowLayout.d Mon Mar 09 14:26:40 2009 +0100 @@ -19,7 +19,6 @@ import org.eclipse.swt.widgets.Layout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.layout.RowData; -import tango.util.Convert; import java.lang.all; @@ -497,17 +496,17 @@ override public String toString () { String string = getName ()~" {"; string ~= "type="~((type !is SWT.HORIZONTAL) ? "SWT.VERTICAL" : "SWT.HORIZONTAL")~" "; - if (marginWidth !is 0) string ~= "marginWidth="~to!(String)(marginWidth)~" "; - if (marginHeight !is 0) string ~= "marginHeight="~to!(String)(marginHeight)~" "; - if (marginLeft !is 0) string ~= "marginLeft="~to!(String)(marginLeft)~" "; - if (marginTop !is 0) string ~= "marginTop="~to!(String)(marginTop)~" "; - if (marginRight !is 0) string ~= "marginRight="~to!(String)(marginRight)~" "; - if (marginBottom !is 0) string ~= "marginBottom="~to!(String)(marginBottom)~" "; - if (spacing !is 0) string ~= "spacing="~to!(String)(spacing)~" "; - string ~= "wrap="~to!(String)(wrap)~" "; - string ~= "pack="~to!(String)(pack)~" "; - string ~= "fill="~to!(String)(fill)~" "; - string ~= "justify="~to!(String)(justify)~" "; + if (marginWidth !is 0) string ~= "marginWidth="~String_valueOf(marginWidth)~" "; + if (marginHeight !is 0) string ~= "marginHeight="~String_valueOf(marginHeight)~" "; + if (marginLeft !is 0) string ~= "marginLeft="~String_valueOf(marginLeft)~" "; + if (marginTop !is 0) string ~= "marginTop="~String_valueOf(marginTop)~" "; + if (marginRight !is 0) string ~= "marginRight="~String_valueOf(marginRight)~" "; + if (marginBottom !is 0) string ~= "marginBottom="~String_valueOf(marginBottom)~" "; + if (spacing !is 0) string ~= "spacing="~String_valueOf(spacing)~" "; + string ~= "wrap="~String_valueOf(wrap)~" "; + string ~= "pack="~String_valueOf(pack)~" "; + string ~= "fill="~String_valueOf(fill)~" "; + string ~= "justify="~String_valueOf(justify)~" "; string = string.trim(); string ~= "}"; return string; diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/ole/win32/OLE.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/ole/win32/OLE.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/ole/win32/OLE.d Mon Mar 09 14:26:40 2009 +0100 @@ -21,7 +21,6 @@ import org.eclipse.swt.internal.win32.OS; import java.lang.all; -import tango.util.Convert; /** * * OLE contains all the constants used to create an ActiveX Control or an OLE Document. @@ -304,59 +303,59 @@ /* SWT Errors (non-fatal) */ case ERROR_CANNOT_CREATE_FILE : { String msg = ERROR_CANNOT_CREATE_FILE_MSG; - if (hresult !is 0) msg ~= " result = "~to!(String)(hresult);//$NON-NLS-1$ + if (hresult !is 0) msg ~= " result = "~String_valueOf(hresult);//$NON-NLS-1$ throw new SWTException (code, msg); } case ERROR_CANNOT_CREATE_OBJECT : { String msg = ERROR_CANNOT_CREATE_OBJECT_MSG; - if (hresult !is 0) msg ~= " result = "~to!(String)(hresult);//$NON-NLS-1$ + if (hresult !is 0) msg ~= " result = "~String_valueOf(hresult);//$NON-NLS-1$ throw new SWTException (code, msg);//$NON-NLS-1$ } case ERROR_CANNOT_OPEN_FILE : { String msg = ERROR_CANNOT_OPEN_FILE_MSG; - if (hresult !is 0) msg ~= " result = "~to!(String)(hresult);//$NON-NLS-1$ + if (hresult !is 0) msg ~= " result = "~String_valueOf(hresult);//$NON-NLS-1$ throw new SWTException (code, msg); } case ERROR_INTERFACE_NOT_FOUND : { String msg = ERROR_INTERFACE_NOT_FOUND_MSG; - if (hresult !is 0) msg ~= " result = "~to!(String)(hresult);//$NON-NLS-1$ + if (hresult !is 0) msg ~= " result = "~String_valueOf(hresult);//$NON-NLS-1$ throw new SWTException (code, msg); } case ERROR_INVALID_CLASSID : { String msg = ERROR_INVALID_CLASSID_MSG; - if (hresult !is 0) msg ~= " result = "~to!(String)(hresult);//$NON-NLS-1$ + if (hresult !is 0) msg ~= " result = "~String_valueOf(hresult);//$NON-NLS-1$ throw new SWTException (code, msg); } case ERROR_CANNOT_ACCESS_CLASSFACTORY : { String msg = ERROR_CANNOT_ACCESS_CLASSFACTORY_MSG; - if (hresult !is 0) msg ~= " result = "~to!(String)(hresult);//$NON-NLS-1$ + if (hresult !is 0) msg ~= " result = "~String_valueOf(hresult);//$NON-NLS-1$ throw new SWTException (code, msg); } case ERROR_CANNOT_CREATE_LICENSED_OBJECT : { String msg = ERROR_CANNOT_CREATE_LICENSED_OBJECT_MSG; - if (hresult !is 0) msg ~= " result = "~to!(String)(hresult);//$NON-NLS-1$ + if (hresult !is 0) msg ~= " result = "~String_valueOf(hresult);//$NON-NLS-1$ throw new SWTException (code, msg); } case ERROR_CANNOT_CHANGE_VARIANT_TYPE : { String msg = ERROR_CANNOT_CHANGE_VARIANT_TYPE_MSG; - if (hresult !is 0) msg ~= " result = "~to!(String)(hresult);//$NON-NLS-1$ + if (hresult !is 0) msg ~= " result = "~String_valueOf(hresult);//$NON-NLS-1$ throw new SWTException (code, msg); } case ERROR_APPLICATION_NOT_FOUND : { String msg = ERROR_APPLICATION_NOT_FOUND_MSG; - if (hresult !is 0) msg ~= " result = "~to!(String)(hresult);//$NON-NLS-1$ + if (hresult !is 0) msg ~= " result = "~String_valueOf(hresult);//$NON-NLS-1$ throw new SWTException (code, msg); } case ERROR_ACTION_NOT_PERFORMED : { String msg = ERROR_ACTION_NOT_PERFORMED_MSG; - if (hresult !is 0) msg ~= " result = "~to!(String)(hresult);//$NON-NLS-1$ + if (hresult !is 0) msg ~= " result = "~String_valueOf(hresult);//$NON-NLS-1$ throw new SWTException (code, msg); } /* OS Failure/Limit (fatal, may occur only on some platforms) */ case ERROR_OUT_OF_MEMORY : { String msg = ERROR_ACTION_NOT_PERFORMED_MSG; - if (hresult !is 0) msg ~= " result = "~to!(String)(hresult); //$NON-NLS-1$ + if (hresult !is 0) msg ~= " result = "~String_valueOf(hresult); //$NON-NLS-1$ throw new SWTError (code, msg); } default: diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/ole/win32/Variant.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/ole/win32/Variant.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/ole/win32/Variant.d Mon Mar 09 14:26:40 2009 +0100 @@ -23,7 +23,6 @@ import org.eclipse.swt.ole.win32.OleAutomation; import org.eclipse.swt.ole.win32.OLE; -import tango.util.Convert; import java.lang.all; /** @@ -1017,21 +1016,21 @@ public String toString () { switch (type) { case COM.VT_BOOL : - return "VT_BOOL{"~to!(String)(booleanData)~"}"; + return "VT_BOOL{"~String_valueOf(booleanData)~"}"; case COM.VT_I1 : - return "VT_I1{"~to!(String)(byteData)~"}"; + return "VT_I1{"~String_valueOf(byteData)~"}"; case COM.VT_I2 : - return "VT_I2{"~to!(String)(shortData)~"}"; + return "VT_I2{"~String_valueOf(shortData)~"}"; case COM.VT_UI2 : return "VT_UI2{"~ dcharToString(charData) ~"}"; case COM.VT_I4 : - return "VT_I4{"~to!(String)(intData)~"}"; + return "VT_I4{"~String_valueOf(intData)~"}"; case COM.VT_I8 : - return "VT_I8{"~to!(String)(longData)~"}"; + return "VT_I8{"~String_valueOf(longData)~"}"; case COM.VT_R4 : - return "VT_R4{"~to!(String)(floatData)~"}"; + return "VT_R4{"~String_valueOf(floatData)~"}"; case COM.VT_R8 : - return "VT_R8{"~to!(String)(doubleData)~"}"; + return "VT_R8{"~String_valueOf(doubleData)~"}"; case COM.VT_BSTR : return "VT_BSTR{"~stringData~"}"; case COM.VT_DISPATCH : @@ -1047,6 +1046,6 @@ if ((type & COM.VT_BYREF) !is 0) { return Format("VT_BYREF|{}{{{}}",(type & ~COM.VT_BYREF), byRefPtr ); } - return "Unsupported Type "~to!(String)(type); + return "Unsupported Type "~String_valueOf(type); } } diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/opengl/GLData.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/opengl/GLData.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/opengl/GLData.d Mon Mar 09 14:26:40 2009 +0100 @@ -12,8 +12,6 @@ *******************************************************************************/ module org.eclipse.swt.opengl.GLData; -import tango.text.Util; -import tango.util.Convert; import java.lang.all; /** @@ -137,12 +135,12 @@ override public String toString() { String string = doubleBuffer ? "doubleBuffer," : ""; string ~= stereo ? "stereo," : ""; - string ~= "r:" ~ to!(String)(redSize) ~ " g:" ~ to!(String)(greenSize) ~ - " b:" ~ to!(String)(blueSize) ~ " a:" ~ to!(String)(alphaSize) ~ "," ~ - "depth:" ~ to!(String)(depthSize) ~ ",stencil:" ~ to!(String)(stencilSize) ~ - ",accum r:" ~ to!(String)(accumRedSize) ~ "g:" ~ to!(String)(accumGreenSize) ~ - "b:" ~ to!(String)(accumBlueSize) ~ "a:" ~ to!(String)(accumAlphaSize) ~ - ",sampleBuffers:" ~ to!(String)(sampleBuffers) ~ ",samples:" ~ to!(String)(samples); + string ~= "r:" ~ String_valueOf(redSize) ~ " g:" ~ String_valueOf(greenSize) ~ + " b:" ~ String_valueOf(blueSize) ~ " a:" ~ String_valueOf(alphaSize) ~ "," ~ + "depth:" ~ String_valueOf(depthSize) ~ ",stencil:" ~ String_valueOf(stencilSize) ~ + ",accum r:" ~ String_valueOf(accumRedSize) ~ "g:" ~ String_valueOf(accumGreenSize) ~ + "b:" ~ String_valueOf(accumBlueSize) ~ "a:" ~ String_valueOf(accumAlphaSize) ~ + ",sampleBuffers:" ~ String_valueOf(sampleBuffers) ~ ",samples:" ~ String_valueOf(samples); return string; } } diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/program/Program.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/program/Program.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/program/Program.d Mon Mar 09 14:26:40 2009 +0100 @@ -18,7 +18,6 @@ import org.eclipse.swt.internal.win32.OS; import java.lang.all; -static import tango.text.convert.Utf; /** * Instances of this class represent programs and @@ -57,12 +56,12 @@ if (length_ !is 0) { TCHAR[] lpDst = NewTCHARs (0, length_); OS.ExpandEnvironmentStrings (pszOut.ptr, lpDst.ptr, length_); - return tango.text.convert.Utf.toString( lpDst[ 0 .. Math.max (0, length_ - 1) ] ); + return String_valueOf( lpDst[ 0 .. Math.max (0, length_ - 1) ] ); } else { return ""; } } else { - return tango.text.convert.Utf.toString( pszOut[ 0 .. Math.max (0, pcchOut [0] - 1)]); + return String_valueOf( pszOut[ 0 .. Math.max (0, pcchOut [0] - 1)]); } } return null; @@ -174,11 +173,11 @@ if (length_ !is 0) { TCHAR[] lpDst = NewTCHARs (0, length_); OS.ExpandEnvironmentStrings (lpData.ptr, lpDst.ptr, length_); - result = tango.text.convert.Utf.toString ( lpDst[0 .. Math.max (0, length_ - 1) ] ); + result = String_valueOf ( lpDst[0 .. Math.max (0, length_ - 1) ] ); } } else { length_ = Math.max (0, lpData.length - 1); - result = tango.text.convert.Utf.toString ( lpData[0 .. length_]); + result = String_valueOf ( lpData[0 .. length_]); } } } @@ -232,7 +231,7 @@ FILETIME ft; int dwIndex = 0, count = 0; while (OS.RegEnumKeyEx (cast(void*)OS.HKEY_CLASSES_ROOT, dwIndex, lpName.ptr, lpcName.ptr, null, null, null, &ft) !is OS.ERROR_NO_MORE_ITEMS) { - String path = tango.text.convert.Utf.toString ( lpName[0 .. lpcName [0]]); + String path = String_valueOf ( lpName[0 .. lpcName [0]]); lpcName [0] = lpName.length ; Program program = getProgram (path, null); if (program !is null) { diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/widgets/DateTime.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/widgets/DateTime.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/widgets/DateTime.d Mon Mar 09 14:26:40 2009 +0100 @@ -24,8 +24,6 @@ import java.lang.all; -import Integer = tango.text.convert.Integer; - //TODO - features not yet implemented: read-only, drop-down calendar for date //TODO - font, colors, background image not yet implemented (works on some platforms) @@ -529,7 +527,7 @@ int size = OS.GetLocaleInfo (OS.LOCALE_USER_DEFAULT, OS.LOCALE_IDATE, tchar.ptr, 4); if (size > 0) { String number = TCHARsToStr(tchar[0..size - 1]); - return Integer.parse (number); + return Integer.parseInt (number); } return 0; } @@ -545,7 +543,7 @@ int size = OS.GetLocaleInfo (OS.LOCALE_USER_DEFAULT, OS.LOCALE_ITIME, tchar.ptr, 4); if (size > 0) { String number = TCHARsToStr(tchar[0..size - 1]); - return Integer.parse (number) !is 0; + return Integer.parseInt (number) !is 0; } return true; } diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/widgets/DirectoryDialog.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/widgets/DirectoryDialog.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/widgets/DirectoryDialog.d Mon Mar 09 14:26:40 2009 +0100 @@ -22,7 +22,6 @@ import org.eclipse.swt.internal.C; import java.lang.all; -static import tango.text.Text; /** * Instances of this class allow the user to navigate diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/widgets/Display.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/widgets/Display.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/widgets/Display.d Mon Mar 09 14:26:40 2009 +0100 @@ -48,12 +48,7 @@ import org.eclipse.swt.widgets.TrayItem; import java.lang.all; -import java.lang.Runnable; -import java.lang.System; import tango.core.Thread; -import tango.stdc.stringz; -import tango.util.Convert; -static import tango.text.convert.Utf; /** * Instances of this class are responsible for managing the @@ -2579,8 +2574,8 @@ threadId = OS.GetCurrentThreadId (); /* Use the character encoding for the default locale */ - windowClass_ = StrToTCHARs ( 0, WindowName ~ to!(String)(WindowClassCount), true ); - windowShadowClass = StrToTCHARs ( 0, WindowShadowName ~ to!(String)(WindowClassCount), true ); + windowClass_ = StrToTCHARs ( 0, WindowName ~ String_valueOf(WindowClassCount), true ); + windowShadowClass = StrToTCHARs ( 0, WindowShadowName ~ String_valueOf(WindowClassCount), true ); WindowClassCount++; /* Register the SWT window class */ @@ -4576,7 +4571,7 @@ if (ch <= 0x7F) return ch; wchar[1] wc; wc[0] = ch; - auto r = StrToMBCSs( tango.text.convert.Utf.toString(wc), codePage ); + auto r = StrToMBCSs( String_valueOf(wc), codePage ); return r[0]; } diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/widgets/Spinner.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/widgets/Spinner.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/widgets/Spinner.d Mon Mar 09 14:26:40 2009 +0100 @@ -27,10 +27,7 @@ import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Shell; - import java.lang.all; -import tango.text.convert.Integer : toString; -import tango.util.Convert; /** * Instances of this class are selectable user interface @@ -331,7 +328,7 @@ RECT rect; int max; OS.SendMessage (hwndUpDown , OS.UDM_GETRANGE32, null, &max); - String string = .toString( max ); + String string = String_valueOf( max ); if (digits > 0) { StringBuffer buffer = new StringBuffer (); buffer.append (string); @@ -1030,9 +1027,9 @@ if (setText) { String string; if (digits is 0) { - string = .toString (value); + string = String_valueOf (value); } else { - string = to!(String)(Math.abs (value)); + string = String_valueOf(Math.abs (value)); String decimalSeparator = getDecimalSeparator (); int index = string.length - digits; StringBuffer buffer = new StringBuffer (); diff -r 2847134a5fc0 -r 950d84783eac org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/widgets/Widget.d --- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/widgets/Widget.d Thu Mar 05 15:12:35 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/widgets/Widget.d Mon Mar 09 14:26:40 2009 +0100 @@ -26,7 +26,6 @@ import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.TypedListener; -import tango.io.Stdout; import tango.core.Thread; import java.lang.all; @@ -124,8 +123,8 @@ } static if (!OS.IsWinCE) { if (OS.COMCTL32_VERSION < OS.VERSION (MAJOR, MINOR)) { - Stdout.formatln ("***WARNING: SWT requires comctl32.dll version {}.{} or greater", MAJOR, MINOR); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - Stdout.formatln ("***WARNING: Detected: {}.{}", OS.COMCTL32_MAJOR, OS.COMCTL32_MINOR); //$NON-NLS-1$ //$NON-NLS-2$ + getDwtLogger().warn ("***WARNING: SWT requires comctl32.dll version {}.{} or greater", MAJOR, MINOR); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + getDwtLogger().warn ("***WARNING: Detected: {}.{}", OS.COMCTL32_MAJOR, OS.COMCTL32_MINOR); //$NON-NLS-1$ //$NON-NLS-2$ } } OS.InitCommonControls ();