Re: HELP!!! swt + mozilla (adtional questions)
jml <[email protected]> Sat, 04 Jan 2003 16:37:22 +0800
| Newsgroups | gmane.comp.mozilla.devel.java,gmane.comp.mozilla.devel.embedding,gmane.comp.mozilla.devel.xpcom |
|---|---|
| Organization | Another Netscape Collabra Server User |
| Message-ID | <[email protected]> |
David Bradley wrote: > jml wrote: > >> I found the code, but that is not generating the java code I needed. I >> also try to read the source code to see whether I can change it, then >> soon I got lost -- seemed I need to understand libIDL, then I need to >> understand glib ... Is there any document for this part? > > > libIDL is a CORBA IDL yacc based parser. It's supported outside of > Mozilla. Search for libidl using a search engine and you should be able > to find some info. The library provides hooks, as the parse tree is > traversed. The callbacks Mozilla implements and then digs into the parse > tree information. > > I seem to recall someone had been maintaining a separate copy of the > xpidl_java.c and was looking into merging that back into the tree. > Doesn't look like it's been done, and don't remember the details of who, > when, where, why. > I got the code of xpidl_java.c and libIDL, but feel very hard to read and understand all those C++ pointers, only the StateTree has made me quit. Also, I have only experience of debugging C/C++ program in VC++, so without a VC++ project file, I even can't start. My latest approach is using "xpidl -m java" to generate java code from IDL. Then compile all the java codes into class files, then using the java reflect API to load those classes and reading method and fields from them, and then generate the code I needed from that. Paintful, isn't it? So now I am waiting for someone to write a xpidl_xml.c file to generate xml from IDL, then programmer from any language may benefit. As moving between C and Java, I believe for those hardcore C/C++ programers who only use emacs and gcc/gdb, maybe yes. But for a java guy like me who depend on an IDE so much, forget it. > > David Bradley > jml