The Java 2 CSharp translator is a proposed open source project under the Eclipse Technology Project.
This proposal is in the Project Proposal Phase (as defined in the Eclipse Development Process document) and is written to declare its intent and scope. This proposal is written to solicit additional participation and input from the Eclipse community. You are invited to comment on and/or join the project. Please send all feedback to the http://www.eclipse.org/newsportal/thread.php?group=eclipse.technology.c-sharp newsgroup.
With the .NET market growing, many Java developers and vendors want to offer a true native .NET version of their software. Since there is not a viable solution to have a single source policy for both platforms, and since the Java and CSharp languages are very similar, there is a growing need for conversion tool.
Some solutions already exist, but most of them are too limited (i.e, to JDK1.3), have a "one shot" behavior, or are not well integrated in the development environment.
Eclipse's highly flexible JDT framework, in particular its refactoring capability, has been an excellent start point for the Java 2 CSharp project.
The The Java 2 CSharp translator is an extensible framework for translating Java code to any similar language and an exemplary tool to translate Java to CSharp. It is built on top of the JDT; it uses and extends the powerful refactoring capability and it is integrated in the Eclipse user interface.
The Java 2 CSharp translator goal is to allow automatic translation of Java source files into CSharp source files.
By design it's extensible (you can add your own "transformations"), customizable (you can add or modify the way a Java construct is mapped on a CSharp construct) and robust (already used in industrial environment at ILOG to produce the Rules for .NET business rules engine).
As the user experience is important, translating code must be simple for a developer. The tool is integrated in the Eclipse UI via wizards and popup menus. The typical development phase workflow is as follows: write the Java code normally in Eclipse as normal, execute tests, and when needed, use a wizard to produce the C# version, compile it, and run tests. If needed, the UI integration helps the developer with customization, e.g., adding translator-aware Javadoc comments).
For real-life projects, with many thousands of lines of code, a command line version is available to allow fully automatic translation using standard tools such as Maven.
* JDK6/Generics support
* UI Integration
* Tests translation (from junit/testng to NUnit)
* Project translation
* Command line version
The initial committers are:
* Alexandre FAU (ILOG): project lead
The following companies have expressed interest in this project. Key contacts listed.
* EMF4.NET : Reinhold Bihler
* ILOG : Alexandre FAU
* SCORT : Thomas Colin de Verdiere
The project is already available at Sourceforge (http://sourceforge.net/projects/j2cstranslator/) with a developers/users community.
* Modify the tool to allow translating Java to other Java-like languages
* Eclipse 3.4 support
* Re-work the Maven integration
* Improve the mapping language to match AST subtrees instead of strings
* Look at the extension point mechanism for the extensibility
* Keep up with Java and CSharp evolution
* Ed Merks
* Chris Aniszcyzk
Back to the top