| Summary: | Wishing an action and a key to Rebuild Last Target when editing a file | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Mathieu Roger <rogma.boami> |
| Component: | cdt-build | Assignee: | cdt-build-inbox <cdt-build-inbox> |
| Status: | NEW --- | QA Contact: | Jonah Graham <jonah> |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | aegges |
| Version: | 7.0 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Mathieu Roger
Hmm, it is supposed to work from editor. Looks like there is a bug there and F9 in editor is not activated after starting of eclipse. If you run F9 from C/C++ Project view it then starts working from editor as well. Ha, interesting, I completely missed that!
In fact it works as you describe but only for direct child file of a directory.
I use the following structure :
Module/
file1.h
Implementation/
file1.cpp
Tests
test_file1.h
test_file1.cpp
And I have only set targets for 'Module' directory.
So when pressing F9 in file1.h : ok, launches the latest Module target.
And when pressing F9 in file1.cpp : it opens the Build Target menu for Implementation, which is empty. Same for other files.
So, Ok, my structure is a bit unusual, except, maybe, for Test sub-directory.
My wish is to launch the first available target by getting recursively up, i.e., skipping directories that have no associated build targets until we get one, and if none, existing behaviour.
There is also a preference to use make target from project root, see Preferences->C/C++->Build->Make Targets - Rebuild Last Target "from project root". You can try that as an option. Thanks for pointing out this option. It is still not satisfactory because my projects have several modules, so I would need to select the appropriate build target whereas this target is implicitly defined by the current opened file. I still wish to be able to rebuild the last target by searching recursively up, for example as a third option in Preferences->C/C++->Build->Make Targets - Rebuild Last Target, which would do no harm. (In reply to comment #4) > Thanks for pointing out this option. > > It is still not satisfactory because my projects have several modules, so I > would need to select the appropriate build target whereas this target is > implicitly defined by the current opened file. > > I still wish to be able to rebuild the last target by searching recursively up, > for example as a third option in Preferences->C/C++->Build->Make Targets - > Rebuild Last Target, which would do no harm. In bug #333113 I added to Rebuild Last Target an option so that it will use the actual last target of the current project irrespective of the currently selected resource. Would this option help you? |