This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 119142 - When parsing "orphan" headers, project and folder -I and -D options should be taken into account
Summary: When parsing "orphan" headers, project and folder -I and -D options should be...
Status: RESOLVED WORKSFORME
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 6.x
Hardware: Sun All
: P4 blocker (vote)
Assignee: Vladimir Kvashin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-16 23:06 UTC by Vladimir Kvashin
Modified: 2008-09-16 23:33 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Kvashin 2007-10-16 23:06:32 UTC
Now, when there is an "orphan" header in project - i.e. header that is not included in any source file - such header is
nevertheless parsed. And that's right thing to do: if, for example, I create a design of my project classes, I first
write  a lot of headers without any sources - and still want to use code assistance features. Another example is writing
template library (which, except for testing code, often does not contain source files).

When parsing such orphan headers, project and folder options (include paths and macros) aren't taken into account.

As soon as a header is included in some source file, project/folder options are taken into account when parsing header.

The point is rather arguable - since generally that's *source* files that -I  and -D are applicable to... 
But I believe the current situation is inconvenient for user.
Comment 1 Alexander Simon 2007-10-23 08:27:57 UTC
At least orphan header should have source's roots as user include paths.
More clever algorithm can detect user include paths by sources in the same folder.
Next suggestion is: try to detect union of sources user include paths if project level does not have user paths.
Comment 2 Vladimir Kvashin 2008-09-16 23:33:30 UTC
Project-level -I and -D options are now taken into account when parsing orphans.
Folder-level options are not.