Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 338045 - AST should start building when an editor becomes active
Summary: AST should start building when an editor becomes active
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-editor (show other bugs)
Version: 7.0.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: Anton Leherbauer CLA
QA Contact: Anton Leherbauer CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 319480 338047
  Show dependency tree
 
Reported: 2011-02-23 22:37 EST by Marc-André Laperle CLA
Modified: 2011-02-25 20:00 EST (History)
3 users (show)

See Also:


Attachments
Reconcile on editor activation (1.26 KB, patch)
2011-02-24 04:04 EST, Anton Leherbauer CLA
aleherb+eclipse: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marc-André Laperle CLA 2011-02-23 22:37:05 EST
When activating an editor, the AST doesn't start building unless something triggers it (source hover, etc).

Features like hyperlinks might not want to wait for the AST to be built in order to prevent the UI from blocking. Fortunately, there is a non AST-based fallback for the Open Element hyperlink in 7.0.2, see bug 326418. But this method does not handle overloaded operators, see bug 338004. Also, for other features, it might not be possible to have such a fall-back, for example bug 319480. 

Starting to build the AST when the editor gets activated will remove the need to trigger the AST build manually. There would still be a delay for the features to become available while the AST is being computed but it would still be an improvement.
Comment 1 Anton Leherbauer CLA 2011-02-24 04:04:34 EST
Created attachment 189677 [details]
Reconcile on editor activation

This patch makes the editor reconcile on (re-)activation.  Originally this was avoided because it seemed not necessary, but things have changed.
Comment 2 Marc-André Laperle CLA 2011-02-24 23:37:21 EST
I'm surprised that it's only a one line change. It works great, thank you.
Comment 3 Anton Leherbauer CLA 2011-02-25 03:09:33 EST
Committed the one line change.
Comment 4 CDT Genie CLA 2011-02-25 03:23:22 EST
*** cdt cvs genie on behalf of aleherbau ***
Bug 338045 - AST should start building when an editor becomes active

[*] CReconciler.java 1.13 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CReconciler.java?root=Tools_Project&r1=1.12&r2=1.13