Hi,

About a week or so ago I tried again to import the OpenOffice source code into Eclipse. The last time I tried that, a few years ago, this did not work at all. Our source code was just to big and too complex. This time however, it worked out of the box. If you do it right :-) The developers of the CDT (the C/C++ Development Tooling) have made great progress in the last years.

As this allows newcomers a much easier way to become OpenOffice developers and also can make the work of experienced developers more productive I would like to share how to set up Eclipse for OpenOffice. This process is still a bit rough around the edges. Any help is appreciated.

I have started a Wiki page [1] which explains the manual setup. It should work on all platforms but at the moment only Windows is described. Maybe you can help to fill in missing values for other platforms. I am working on a few Eclipse plugins to automate this process:

- A wizard for setting up an Eclipse workspace. The prototype has just to be pointed to the (compiled) source code. It will then collect all the necessary include paths and set the necessary compiler defines so that the indexer can resolve even the platform dependent definitions. This is important because even something as simple as sal_Int16 will not be recognized without the indexer being told about platform specific preprocessor defines.

- The idea of CDT about how C/C++ files are built is different from how OpenOffice does it. Therefore I am developing a short term solution that provides a couple of buttons/menu entries/whatever will be appropriate to build the current module, directory or file and then deploy the new libraries into an installed office.


Here are some highlight of what Eclipse and CDT allow us to do:

- Easily switch between header and implementation file.

- Follow header inclusion (just Ctrl-click on an #include statement and the referenced header file is opened in the editor.

- Get information about variables and classes by simply hovering over their names. A popup box shows you the variable definition or the class implementation. That is something you have to see to believe it.

- Find out from where a function or method is called

- Explore the type hierarchy of a class.

- Macro expansion. Hover over a macro use and see the expansion of it, several iterations if necessary. Ever wanted to know how IMPL_LINK is defined? Just move your mouse pointer over it.

- Code assist while typing.  Define a variable, eg.
  ::rtl::OUString sText
Then type "sText.", wait a little (default is 500ms) and a box shows you all the available methods of OUString.

- An overview at the right side shows you all the functions, methods, includes, macro defines etc, that are made in the currently edited file. Click on one and jump to the corresponding source code.


All of this may sound familiar to Java developers. But for C++, especially for OpenOffice, I think this is quite remarkable.


Best regards,
Andre


[1] https://wiki.openoffice.org/wiki/OpenOffice_and_Eclipse

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org

Reply via email to