Contribution

Contribution is very welcome.

To get the latest sources use mercurial:

hg clone http://hg.dsource.org/projects/dwt-linux

To port snippets or examples use the prepared sources: dwt-linux-jsrc-3.3.zip, it contains the SWT, examples and snippets. General replacements are made and file extensions changed to .d.

Before you start

Formatting: Please check your editor to not use tabs. Please use 4 spaces for indention.
File Format: Please make sure you always work with unix file format, even on windows. Mercurial does no line ending convertion. Editors changing this accidentally cause Mercurial to see the whole file changed. This make further merges/diffs difficult and increases the repository.
VIM settings:

set expandtab
set shiftwidth=4
set tabstop=4
set softtabstop=4
autocmd BufRead,BufNewFile *.d set encoding=utf-8
autocmd BufRead,BufNewFile *.d set fileformat=unix

Commits

For doing commits please configure your Mercurial setting file:

  • Linux: .hgrc in your home folder ~/.hgrc
  • Windows: On windows this file is called mercurial.ini and is located on my machine in C:\Documents and Settings\frank\mercurial.ini

My ~/.hgrc look like this:

[ui]
username = Frank Benoit <benoit@tionex.de>
editor = gvim -f

[extensions]
extdiff=

Note: Please use your full real name and an email address you expect to be reachable for a long time. Acquiring "commit rights" is equivalent to "taking responsibility" for the work you do on the project. In this way, it should be possible to contact you for a sufficient period after you have discontinued contributions to this project.

However, if you desire to contribute anonymously, using only a nickname, you can send changes to a project member. This can be done by a patch or with an hg bundle (prefered). The project member will then create a diff and make a commit with his/her name. Your nickname will then be mentioned in the commit message to give you credit. But the project member will make the commit and take responsibility for the change.

Bundles

The repository is only writeable by me. So if you do commits please send me bundles. (Don't forget to commit first) I will do the upload then.

To create a bundle, use

hg bundle --base <rev> <file>
  • <rev> is the last revision that was pulled from the server (see "hg view" or "hg log -l 10" )
  • <file> the name of the file, that hg will create containing the bundle data

I try to collect some experience about porting Java in the Porting page.

Frank