Developing LifeV inside Eclipse
Make sure you have a working environment before starting this tutorial (see here and here). Set up the Eclipse indexerYou will need to set up the indexer in order to allow Eclipse to correctly navigate through your LifeV source tree. Right-click the project in the Project Explorer tab and choose Properties.
In other cases, you may want to specify the paths of the included code, for instance when you are working with different versions of some libraries (say, you have both Trilinos 8 and Trilinos 9 installed on your computer). In that case, the indexer may fail in tracking the correct path of the headers, unless you specify the include paths. The Editor and the Outline tool
Once the indexer is trained, your source file behaves like a hyper-text, with anchors and external links to the included headers. Try to open a file in the library and play with the Text Editor (at the center of the screen) and the Outline tab (in the right-hand side of the screen). You can open declarations of the variables by highlighting them, right-clicking and choosing Open Declaration from the pop-up menu. A shortcut for this operation is highlighting the variable name and pressing F3; or simply CTRL-clicking the variable name. Amongst many other things, you can comment/uncomment code lines by simply highlighting them, right-clicking them and Source --> Comment/Uncomment them. Try to play with all these tools and be comfortable with them. They help a lot in managing a large and complex code like LifeV. Notes about code formattingThe Text Editor has a code formatter able to automatically set up indentation on selected code regions. Please, don't apply Eclipse default formatting style to the code you are editing. LifeV source code was written in a distributed environment, following specific Coding Standards, to which the Eclipse default formatting style does not conform exactly. The point is, there's no need to reformat the whole code each time you work on it. Simply plug in your corrections / add-ons following the pre-existing format. In most cases, Eclipse Text Editor will suggest the correct choice while you're typing (e. g. the indentation of a new line will be in most of the cases compatible with the pre-existing code). If you're starting a new application, and committing brand new files, you should make sure that your code follows the LifeV Coding Standards.
Document Actions |
|
