The Cross Plattform DWT

Frank Benoit keinfarbton at googlemail.com
Mon Jan 21 08:21:10 PST 2008


doob schrieb:
> I haven't looked at your source code yet so what is it to think about 
> when I do the port, how should I port the data types. I read that you 
> use char[] instead of String, what about boolean? The previous DWT used 
> boolean as an alias to int, is there anything else?

I prepared the original SWT source like this

1. make an eclipse project and load the sources.
2. switch to flat package view
3. select all packages and do 'organize imports'
4. load all files into gvim
5. remove all tabs with ":bufdo retab", having tabstop=4
6. do some global search replace
	":bufdo %s:==:is:g"
	":bufdo %s:!=:!is:g"
	":bufdo %s:\<boolean\>:bool:g"
	":bufdo %s:\<org.eclipse.swt\>:dwt:g"
	":bufdo %s:\<SWT\>:DWT:g"
	":bufdo %s:\<package\>:module:"
	":bufdo %s;\<implements\>;:;"
	":bufdo %s;\<extends\>;:;"

7. save all files
	":wall"
8. rename all .java to .d

Now you have files, that are good for making diffs and merges with your 
later ported code.

Keep those files for later, if you want to merge a newer
JFace version, than you can follow the same steps and make a three-way merge

The String to char[] replacements should be done interactively. So you 
can let them be unchanged in javadoc comments.

Frank


More information about the Digitalmars-d-dwt mailing list