Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Refreshing the file list
Refreshing the file list [message #1138242] Tue, 15 October 2013 02:09 Go to next message
Chris Stankevitz is currently offline Chris StankevitzFriend
Messages: 52
Registered: September 2011
Member
Hello,

I use cmake to generate my Eclipes CDT projects. I sometimes add files to my project. After I add a file, but before I "finish" compiling, the new files are invisible. I cannot open them with CTRL-SHIFT-R. I cannot double-click them in the error console to jump to a line number. I just "finish" a compile (even if it fails).

Is there a keyboard (or mouse if necessary) way I can ask Eclipse to refresh the files without compiling? (I'm looking for something faster than running the compiler/linker/cmake/etc).

Thank you,

Chris
Re: Refreshing the file list [message #1139095 is a reply to message #1138242] Tue, 15 October 2013 14:35 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
F5

Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Refreshing the file list [message #1142696 is a reply to message #1139095] Thu, 17 October 2013 20:07 Go to previous messageGo to next message
Chris Stankevitz is currently offline Chris StankevitzFriend
Messages: 52
Registered: September 2011
Member
Axel,

I tried this:

1. Open an existing eclipse CDT project

2. Use CTRL-SHIFT-r to search for the file test.cpp

3. Verify that test.cpp does not exist

4. using bash, 'touch test.cpp' inside the source tree

5. Press F5 in eclipse

6. Use CTRL-SHIFT-r to search for the file test.cpp

7. test.cpp does not exist

8. Press CTRL-B to start a compile. Await completion.

9. Use CTRL-SHIFT-r to search for the file test.cpp

10. test.cpp does exist!

Based on your response, I was expecting at step 7 to find test.cpp in the file list. I conclude that F5 does not work with my setup (Eclipse Kepler under linux).

Thank you,

Chris
Re: Refreshing the file list [message #1148700 is a reply to message #1142696] Mon, 21 October 2013 17:39 Go to previous messageGo to next message
Chris Stankevitz is currently offline Chris StankevitzFriend
Messages: 52
Registered: September 2011
Member
I confirmed that F5 does not work on Eclipse 3.8 or Eclipse Kepler.
Re: Refreshing the file list [message #1152561 is a reply to message #1148700] Thu, 24 October 2013 03:46 Go to previous messageGo to next message
Marc-Andre Laperle is currently offline Marc-Andre LaperleFriend
Messages: 171
Registered: July 2009
Senior Member
Are you clicking on the project first in Project Explorer? You have to select a folder containing your file in the Project Explorer first then F5 will refresh what you selected recursively.
Re: Refreshing the file list [message #1153233 is a reply to message #1152561] Thu, 24 October 2013 13:18 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
You should enable the following:
Preferences: General->Workspace: enable "Refresh using native hooks"

Refreshing is then much faster.


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Refreshing the file list [message #1167057 is a reply to message #1152561] Sat, 02 November 2013 11:13 Go to previous messageGo to next message
Chris Stankevitz is currently offline Chris StankevitzFriend
Messages: 52
Registered: September 2011
Member
Marc-Andre Laperle wrote on Wed, 23 October 2013 23:46
Are you clicking on the project first in Project Explorer? You have to select a folder containing your file in the Project Explorer first then F5 will refresh what you selected recursively.


Marc-Andre,

No. I did not use the Project Explorer to select a folder containing my file before pressing F5. I do not even keep open a "Project Explorer" View. I will open a "Project Explorer" View and try your F5 method again.

Unfortunately for me, I dislike using the mouse while writing code. If use of the mouse and project explorer is required for a quick file refresh, I'll stick with the slow 10-step method I outlined earlier.

Thank you for your help,

Chris
Re: Refreshing the file list [message #1167058 is a reply to message #1153233] Sat, 02 November 2013 11:15 Go to previous message
Chris Stankevitz is currently offline Chris StankevitzFriend
Messages: 52
Registered: September 2011
Member
Axel Mueller wrote on Thu, 24 October 2013 09:18
You should enable the following:
Preferences: General->Workspace: enable "Refresh using native hooks"


Ahh yes, thank you! I been using eclipse 40 hours a week for years and I just now found this! Thank you!

Chris
Previous Topic:Eclipse for C: Launch failed no binaries
Next Topic:printf not accepting %Lf
Goto Forum:
  


Current Time: Thu Dec 18 07:23:28 GMT 2014

Powered by FUDForum. Page generated in 0.03110 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software