XES - Project Plan - Class Library Translation

This proposed enhancement is in the Sourceforge feature request system.

At the moment the program can help to translate the syntax of one language to another. However, until now there is no attempt to translate the class libraries which the program calls.

For example the java program might contain a the following call:

System.out.println("apperanceBean.writeJava:" + e);

If we are translating the program into a .net language we would want to translate it as follows:

Console.WriteLine("apperanceBean.writeJava:" + e);

So what I am suggesting is to give XES the ability to read in a large table containing a column for each class library and a row for each possible class library call:

Java .net Qt3
System.out.println Console.WriteLine QErrorMessage

XES would then substitute the appropriate text in the program from the table.

Of course such a simplistic translation cannot correctly handle all possible differences between the class libraries but it should provide a starting point for manual translation.

The advantages of this method are:

Implementation Issues

If we take the above example, can we just replace the 'System.out.println' entry in the symbol table with 'Console.WriteLine' and so on. This would seem to be the quickest approach and I think this would work well in most cases. The only possible problem would be that it would be replaced regardless of whether the text is a library call, an include path, a comment, a string constant, etc. I think it would add a lot of complexity as the symbol table would have to have an extra column to determine if the entry is a library call, an include path, a comment, a string constant, a method name, a class name, a variable name etc. So I suggest that we just do a global replace for the first implementation and then refine that later if that proves necessary.

User Interface

I suggest adding a new 'library translation' tab. This tab would allow the table to be loaded, displayed, modified and saved. There would also be buttons to select the input and output library and a button to do the translation.

Further Stages

In order to make the work manageable this does not include everything required, I propose the following follow on projects:

This enhancement needs to be further extended as described here.

Also a table needs to generated in order to use this feature to translate class library names as described here.

metadata block
see also:


Correspondence about this page

Book Shop - Further reading.

Where I can, I have put links to Amazon for books that are relevant to the subject, click on the appropriate country flag to get more details of the book or to buy it from them.

cover The Java Developer's Guide to Eclipse.

Other Java books

Commercial Software Shop

Where I can, I have put links to Amazon for commercial software, not directly related to this site, but related to the subject being discussed, click on the appropriate country flag to get more details of the software or to buy it from them.


cover EOVIA Carrara Studio 2 (Windows) - This is a commercial 3D modelling tool with some Physics simulation. I think it is aimed at games and animations, not for accurate physics simulation. Eovia (http://www.eovia.com).

See carrara site for information about version 3 launch in Sept 2003.

cover Carrara 3D Basics - A simpler low cost version

This site may have errors. Don't use for critical systems.

Copyright (c) 1998-2015 Martin John Baker - All rights reserved - privacy policy.