Open Bug 1001175 (eclipse-cdt-projgen) Opened 6 years ago Updated 11 months ago

[meta] Eclipse C++ project generation issues


(Firefox Build System :: Developer Environment Integration, defect)

Not set


(Not tracked)


(Reporter: botond, Unassigned)


(Depends on 1 open bug)


(Keywords: meta)

I am trying out the Eclipse C++ project generation feature that BenWa implemented (bug 973770), and I'm running into a number of issues with it. I am going to collect these issues in this bug, and eventually file individual bugs for them and hopefully fix them.
Generated projects do not have any of the  "<XXX> Built-in Compiler Settings" providers enabled. As a result, some system includes do not get processed.
Even when I manually enable a "Built-in Compiler Settings" provider, the "Command to get compiler specs" does not contain "-std=c++11" or similar, and as a result files get badly misparsed (outside of C++11 mode, MOZ_FINAL expands to '__final', which CDT does not recognize, causing CDT to fail to parse entire class definitions).
The "Mark occurrences" setting (Preferences -> C/C++ -> Editor -> Mark Occurrences" is not enabled by default.
The "Automatically update the index" and "Update index immediately after every file-save" settings (Preferences -> C/C++ -> Indexer -> Indexing strategy) are not enabled by default. These settings are critical to get accurate parsing as you're editing code. For example, if you add a new field to a class in a header file, and then write code in the cpp file that uses the new field, if these settings aren't enabled then Eclipse won't know about the new field until a full reindex.
Depends on: 1013348
Depends on: 973770, 1005989, 1062726
The "Remove trailing whitespace in edited lines" save action (Preferences -> C/C++ -> Editor -> Save Actions) is not enabled by default. This setting is very useful for appeasing Those Who R- Patches For Having Trailing Whitespace.
As far as I'm aware, the workflow on B2G is to cd into your objdir and then run 

  path/to/gecko-source-dir/mach build-backend -b CppEclipse

We should make this a bit nicer, e.g. we should allow using the 'mach' command in the root of the b2g directory tree rather than having to cd into the objdir.
The default perspective when opening the generated project appears to be "Resource". It would be better to make it the "C/C++" perspective (the set of views in the workspace is more relevant then).
Depends on: 1132056
Depends on: 1189833
Depends on: 1325490
Depends on: 1408795
Depends on: 1408810
Depends on: 1409121
Alias: eclipse-cdt-projgen
Depends on: 1409194
Depends on: 1411546
Depends on: 1413227
Depends on: 1432919
Product: Core → Firefox Build System
Component: General → Developer Environment Integration
Depends on: 1470494
You need to log in before you can comment on or make changes to this bug.