Community
Participate
Working Groups
This was originally reported in https://bugs.eclipse.org/bugs/show_bug.cgi?id=219834 but not exactly related to that bug so opening a new one. org.eclipse.cdt.internal.ui.editor.CElementHyperlinkDetector.detectHyperlinks(ITextViewer, IRegion, boolean) and org.eclipse.cdt.internal.ui.text.folding.DefaultCFoldingStructureProvider.computeFoldingStructure(FoldingStructureComputationContext) can both be called from the main UI thread. They both call org.eclipse.cdt.internal.ui.editor.ASTProvider.runOnAST(ICElement, WAIT_FLAG, IProgressMonitor, ASTRunnable), passing the WAIT_YES flag. If the TU has not yet been parsed, it will do that parse from the UI thread, "freezing" Eclipse for however long that takes. Normally this is fast anyway, but for large files it can take some time. Combine that with another CPU intensive task running (like the indexer), it can really take a while and make the IDE appear to be frozen. The hyperlink detector is invoked as soon as you press the ctrl key when an editor is in focus. The folding structure provider is invoked when a new editor window is opened.
*** Bug 324232 has been marked as a duplicate of this bug. ***