Robotics StackExchange | Archived questions

Eclipse does not autocomplete classes (Solved)

I am using eclipse Juno and a few weeks ago I build the project with the command: make eclipse-project. Without modifying anything in the project, now I found the problem that eclipse does not autocomplete any class and all the instructions appears with the broken red line and the message Function/Symbol/Type '*' could not be resolved. It is estrange that if I click on the headers files while I am holding ctrl I can open the header file, and also I can compile the project. Then, I am running eclipse from the terminal, I regenerate the project with make, I delete and import again the project with the new build, but the problem persist. Any idea about what can I do?

Edit: I already solved my problem just using Eclipse Helios. When I generate my project with cmake -G"Eclipse CDT4 - Unix Makefiles" cmake said Could not determine Eclipse version, assuming at least 3.6 (Helios). Adjust CMAKE_ECLIPSE_VERSION if this is wrong. so just by changing from Juno to Helios everything works.

Asked by roleiland on 2013-03-19 15:48:51 UTC

Comments

Answers

Hi Roleiland

The project files in ROS wont work directly with eclipse without some modification, check out this tutorial for making ros packages work with eclipse.

as for autocompletion in eclipse there is a plugin you can install that supplements the CDT C++ plugin for eclipse it is in your

help -> add new software

work with: Indigo Update Site - http://download.eclipse.org/releases/indigo/

and in the tree below that appears, select

Programming Languages +
 -     C/C++ Library API Documentation Hover Help (Incubation)  0.3.0.201202152032

This hover help will aid you in selecting and seeing the appropriate methods and elements contained in your functions. I find that is a good/sufficient setup that works.

Asked by PeterMilani on 2013-03-19 19:26:15 UTC

Comments

I am using Eclipse Juno, with CDT C/C++ so all the code is properly highlighted. When I started to program my project I followed that tutorial, and at that moment everything was working well. Then, I moved to other things, and now I want to continue again with this project, and the surprise for me was to see how suddenly Eclipse does not autocomplete any class, and every line appears with an error, but I can build the project with the build function of Eclipse without any problem.

I think that the problem can come because I reinstalled ROS due a problem with rviz. I am using Ubuntu 12.04 so I install everything using the repository, then I think should not be any problem... So now I am wondering if do I need any command to update my packages? I used rosinstall . to update setup.bash when I moved my ros workspace to other computer, so is not there anything similar for packages?

Asked by roleiland on 2013-03-20 16:21:00 UTC

Comments