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.
Summary: | Massive reparse if clean&build removes then regenerates headers | ||
---|---|---|---|
Product: | cnd | Reporter: | Vladimir Kvashin <vkvashin> |
Component: | Code Model | Assignee: | Vladimir Kvashin <vkvashin> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 8.0 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
test project
proposed patch (should be reviewed and polished) proposed patch (should be reviewed and polished) - the previous one erroneously included hs_err file |
Investigation shows that events processing is rather complicated. For now it is as follows: *** Event sources (classes that fire events) are four: - CndIndexer (1 instance) - NativeProjectListener (an instance per project) - FileChangeListener (1 instance) - NativeProjectRegistry (1 instance) *** Events, threads and Request Processors (RPs) Code model owns a single static 1-thread RP called Model RP ** NativeProjectRegistry (1 global instance) - closes projects in the same thread it's caled (MakeProject.RP - 1-thread RP per project) - opens projects in its own static 1-thread RP ** CndIndexer (1 global instance) Calls ProjectBase.checkForRemoved in Model RP ProjectBase.onFileImplExternalChange in Model RP ProjectBase.onFileObjectExternalCreate in Model RP ** SuspendableFileChangeListener (1 global instance) Wraps ExternalUpdateListener, folds remove-create events, calls ExternalUpdateListener in its own 1-thread RP ** ExternalUpdateListener (1 global instance) Also folds remove-create events Calls ProjectBase.checkForRemoved in Model RP ProjectBase.onFileImplExternalChange in Model RP ProjectBase.onFileObjectExternalCreate in Model RP ** NativeProjectListenerImpl (instance per project) Calls RepositoryUtils.onProjectDeleted in RequestProcessor.getDefault() ProjectBase.onFileItemsAdded in Model RP ProjectBase.onFileItemsRemoved in Model RP ProjectBase.onFileItemRenamed in Model RP ProjectBase.onFileItemsPropertyChanged in Model RP Created attachment 146714 [details]
proposed patch (should be reviewed and polished)
Created attachment 146715 [details]
proposed patch (should be reviewed and polished) - the previous one erroneously included hs_err file
Pushed changes into cnd-main; to restore old behaviour use -J-Dcnd.model.merge.events=false (TraceFlags.MERGE_EVENTS) http://hg.netbeans.org/cnd-main/rev/b45362ca9870 Additional fixes in cnd-main: http://hg.netbeans.org/cnd-main/rev/21295d1d076e http://hg.netbeans.org/cnd-main/rev/6737f92ab770 http://hg.netbeans.org/cnd-main/rev/586ebcef4877 http://hg.netbeans.org/cnd-main/rev/01ff6a7b2443 One more fix after review with AS http://hg.netbeans.org/cnd-main/rev/b3cc9c184ae5 Integrated into 'main-silver', will be available in build *201404180001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/b45362ca9870 User: Vladimir Kvashin <vkvashin@netbeans.org> Log: fixing #243650 - Massive reparse if clean&build removes then regenerates headers Integrated into 'releases/release80', will be available in build *201404240045* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/4afc0de46f6a User: Vladimir Kvashin <vkvashin@netbeans.org> Log: fixing #243650 - Massive reparse if clean&build removes then regenerates headers (transplanted from b45362ca987064bed7b29c591f09645b1fc9147c) |
Created attachment 146621 [details] test project In the attachecd project, "generated.h" file is regenerated during build (removed on clean, then generated again before build). This causes parsing of most files in the project - although regenerated header content is the same. This is incorrect.