Difference between revisions of "Using kdevelop4"

From Yade

(added description of too long line problem and link to solution)
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
[[Image:kdev4_1.png|600px|thumb|Passing the pointer on members will display informations and links to navigate in the sources.]]
 
[[Image:kdev4_1.png|600px|thumb|Passing the pointer on members will display informations and links to navigate in the sources.]]
   
  +
Importing the sources of Yade in a kdevelop project is straighforward. It is recommended to type the cmake command once before that. Then the steps are as follows:
Yade sources come with a yade.kdev4 project file that you can open with kdevelop4. If for some reasons this file does not work for you, you can easily generate a new Yade project : delete first the existing file yade.kdev4, with the (hidden) folder .kdev4; start empty kdevelop sesion and "import" a project, then select the yade directory, but don't give any "project" file *.kdev4 (the old yade.kdevelop project for kdev3 cannot be read either), as it will have to be generated automaticaly; do not select anything on this first window, and go directly to next one. Select project type "custom build", then go to project configuration and set build executable "scons".
 
   
  +
1. Project -> Open/Import project
Yade can be compiled and debbuged from kdevelop. It gives nice error output with links to where the errors are, etc. There is also a rich class and member description, auto-completion, display of functions signatures,... as shown in screenshots.
 
  +
  +
2. Select the trunk directory
  +
  +
3. Keep "Cmake Project Manager" as the build system (default)
  +
  +
4. Click "Finish"
  +
  +
5. In order to build from inside kdevelop, set the build directory (where the cmake command has been executed) in project options (e.g. right-click the project in the LHS "Project" tab, and select "open configuration").
  +
  +
6. Options like "-jN" can be also defined in the build configuration
  +
 
Yade can be compiled and debbuged from inside kdevelop. It gives nice error output with links to where the errors are, etc. There is also a rich class and member description, auto-completion, display of functions signatures,... as shown in screenshots.
   
 
Also check page on [https://yade-dem.org/wiki/Debugging_using_Kdevelop debugging].
 
Also check page on [https://yade-dem.org/wiki/Debugging_using_Kdevelop debugging].
   
  +
'''WARNING:''' Kdevelop embedded editor is removing trailing spaces by default when it opens a file. While this is generally usefull, it is not desirable if you plan to commit your work (it would clutter commits with a lot of empty lines attributed to you). This option has to be turned off in two different places : editor->configure->editing->general->remove trailing spaces AND editor->configure->open/save->general->remove trailing spaces.
[[Image:kdev4_2.png|800px|Compiling from kdevelop will display links to where the errors are, as well as different formated listings of warningsn FIXMEs, TODOs,...]]
 
  +
 
[[Image:kdev4_2.png|800px|Compiling from kdevelop will display links to where the errors are, as well as different formated listings of warnings FIXMEs, TODOs,...]]
  +
  +
There is a known problem with KDevelop (originally kate text editor which is used in KDevelop by default) concerning '''too long lines'''. If a line has more than 1024 characters a warning usually a is raised and the file is set on read-only. In fact it is no good programming using such long lines but it has been observed that even long lines that are wrapped cause problems. For that reason follow you can disable the character checking and remove the read-only attribute that KDevelop set. [http://olezfdtd.wordpress.com/2012/04/05/open-files-with-long-lines-in-kwrite-kate-and-kile/ see here]

Latest revision as of 12:42, 23 July 2014

Passing the pointer on members will display informations and links to navigate in the sources.

Importing the sources of Yade in a kdevelop project is straighforward. It is recommended to type the cmake command once before that. Then the steps are as follows:

1. Project -> Open/Import project

2. Select the trunk directory

3. Keep "Cmake Project Manager" as the build system (default)

4. Click "Finish"

5. In order to build from inside kdevelop, set the build directory (where the cmake command has been executed) in project options (e.g. right-click the project in the LHS "Project" tab, and select "open configuration").

6. Options like "-jN" can be also defined in the build configuration

Yade can be compiled and debbuged from inside kdevelop. It gives nice error output with links to where the errors are, etc. There is also a rich class and member description, auto-completion, display of functions signatures,... as shown in screenshots.

Also check page on debugging.

WARNING: Kdevelop embedded editor is removing trailing spaces by default when it opens a file. While this is generally usefull, it is not desirable if you plan to commit your work (it would clutter commits with a lot of empty lines attributed to you). This option has to be turned off in two different places : editor->configure->editing->general->remove trailing spaces AND editor->configure->open/save->general->remove trailing spaces.

Compiling from kdevelop will display links to where the errors are, as well as different formated listings of warnings FIXMEs, TODOs,...

There is a known problem with KDevelop (originally kate text editor which is used in KDevelop by default) concerning too long lines. If a line has more than 1024 characters a warning usually a is raised and the file is set on read-only. In fact it is no good programming using such long lines but it has been observed that even long lines that are wrapped cause problems. For that reason follow you can disable the character checking and remove the read-only attribute that KDevelop set. see here