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.

View | Details | Raw Unified | Return to bug 168360
Collapse All | Expand All

(-)a/cnd.modelimpl/src/org/netbeans/modules/cnd/modelimpl/csm/core/DeepReparsingUtils.java (+18 lines)
Lines 81-86 Link Here
81
            for (CsmFile parent : coherence) {
81
            for (CsmFile parent : coherence) {
82
                if (!topParents.contains(parent)) {
82
                if (!topParents.contains(parent)) {
83
                    invalidateFileAndPreprocState(project, parent);
83
                    invalidateFileAndPreprocState(project, parent);
84
                } else {
85
                    clearFileStateCache(parent);
84
                }
86
                }
85
            }
87
            }
86
            if (scheduleParsing) {
88
            if (scheduleParsing) {
Lines 112-117 Link Here
112
            for (CsmFile parent : coherence) {
114
            for (CsmFile parent : coherence) {
113
                if (!topParents.contains(parent)) {
115
                if (!topParents.contains(parent)) {
114
                    invalidateFileAndPreprocState(project, parent);
116
                    invalidateFileAndPreprocState(project, parent);
117
                } else {
118
                    clearFileStateCache(parent);
115
                }
119
                }
116
            }
120
            }
117
            if (scheduleParsing) {
121
            if (scheduleParsing) {
Lines 142-147 Link Here
142
                } else {
146
                } else {
143
                    coherenceLibrary.add(parent);
147
                    coherenceLibrary.add(parent);
144
                }
148
                }
149
            } else {
150
                clearFileStateCache(parent);
145
            }
151
            }
146
        }
152
        }
147
        if (!TraceFlags.DEEP_REPARSING_OPTIMISTIC) {
153
        if (!TraceFlags.DEEP_REPARSING_OPTIMISTIC) {
Lines 198-203 Link Here
198
                    } else {
204
                    } else {
199
                        coherenceLibrary.add(parent);
205
                        coherenceLibrary.add(parent);
200
                    }
206
                    }
207
                } else {
208
                    clearFileStateCache(parent);
201
                }
209
                }
202
            }
210
            }
203
            if (!TraceFlags.DEEP_REPARSING_OPTIMISTIC) {
211
            if (!TraceFlags.DEEP_REPARSING_OPTIMISTIC) {
Lines 324-329 Link Here
324
        for (CsmFile incl : coherence) {
332
        for (CsmFile incl : coherence) {
325
            if (!topParents.contains(incl)) {
333
            if (!topParents.contains(incl)) {
326
                invalidateFileAndPreprocState(project, incl);
334
                invalidateFileAndPreprocState(project, incl);
335
            } else {
336
                clearFileStateCache(incl);
327
            }
337
            }
328
        }
338
        }
329
        try {
339
        try {
Lines 367-372 Link Here
367
    private static void invalidateFileAndPreprocState(final ProjectBase project, final CsmFile parent) {
377
    private static void invalidateFileAndPreprocState(final ProjectBase project, final CsmFile parent) {
368
        if (parent.getProject() == project) {
378
        if (parent.getProject() == project) {
369
            FileImpl parentImpl = (FileImpl) parent;
379
            FileImpl parentImpl = (FileImpl) parent;
380
            clearFileStateCache(parentImpl);
370
            project.invalidatePreprocState(parentImpl.getBuffer().getFile());
381
            project.invalidatePreprocState(parentImpl.getBuffer().getFile());
371
            parentImpl.markReparseNeeded(false);
382
            parentImpl.markReparseNeeded(false);
372
            if (TraceFlags.USE_DEEP_REPARSING_TRACE) {
383
            if (TraceFlags.USE_DEEP_REPARSING_TRACE) {
Lines 380-385 Link Here
380
            CsmProject project = parent.getProject();
391
            CsmProject project = parent.getProject();
381
            if (project instanceof ProjectBase) {
392
            if (project instanceof ProjectBase) {
382
                FileImpl parentImpl = (FileImpl) parent;
393
                FileImpl parentImpl = (FileImpl) parent;
394
                clearFileStateCache(parentImpl);
383
                ((ProjectBase) project).invalidatePreprocState(parentImpl.getBuffer().getFile());
395
                ((ProjectBase) project).invalidatePreprocState(parentImpl.getBuffer().getFile());
384
                parentImpl.markReparseNeeded(false);
396
                parentImpl.markReparseNeeded(false);
385
                if (TraceFlags.USE_DEEP_REPARSING_TRACE) {
397
                if (TraceFlags.USE_DEEP_REPARSING_TRACE) {
Lines 388-391 Link Here
388
            }
400
            }
389
        }
401
        }
390
    }
402
    }
403
404
    private static void clearFileStateCache(final CsmFile parent){
405
        if (parent instanceof FileImpl){
406
            ((FileImpl)parent).clearStateCache();
407
        }
408
    }
391
}
409
}
(-)a/cnd.modelimpl/src/org/netbeans/modules/cnd/modelimpl/csm/core/ProjectImpl.java (-1 / +1 lines)
Lines 144-150 Link Here
144
                }
144
                }
145
            }
145
            }
146
            file.setBuffer(buf);
146
            file.setBuffer(buf);
147
            file.clearStateCache();
147
            //file.clearStateCache();
148
            // no need for deep parsing util call here, because it will be called as external notification change anyway
148
            // no need for deep parsing util call here, because it will be called as external notification change anyway
149
//            DeepReparsingUtils.reparseOnEdit(file, this);
149
//            DeepReparsingUtils.reparseOnEdit(file, this);
150
        }
150
        }

Return to bug 168360