mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-20 23:45:23 +02:00
Bug 412081 - Exception enabling mark occurrences on an external file
This commit is contained in:
parent
8b12c2d474
commit
f04e9026a7
1 changed files with 11 additions and 7 deletions
|
@ -3576,13 +3576,17 @@ public class CEditor extends TextEditor implements ICEditor, ISelectionChangedLi
|
|||
};
|
||||
SelectionListenerWithASTManager.getDefault().addListener(this, fPostSelectionListenerWithAST);
|
||||
if (forceUpdate && getSelectionProvider() != null) {
|
||||
ICElement inputCElement = getInputCElement();
|
||||
if (inputCElement instanceof ITranslationUnit) {
|
||||
fForcedMarkOccurrencesSelection= getSelectionProvider().getSelection();
|
||||
ASTProvider.getASTProvider().runOnAST(getInputCElement(), ASTProvider.WAIT_NO, getProgressMonitor(), new ASTRunnable() {
|
||||
ASTProvider.getASTProvider().runOnAST(inputCElement, ASTProvider.WAIT_NO, getProgressMonitor(), new ASTRunnable() {
|
||||
@Override
|
||||
public IStatus runOnAST(ILanguage lang, IASTTranslationUnit ast) throws CoreException {
|
||||
updateOccurrenceAnnotations((ITextSelection) fForcedMarkOccurrencesSelection, ast);
|
||||
return Status.OK_STATUS;
|
||||
}});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (fOccurrencesFinderJobCanceler == null) {
|
||||
|
|
Loading…
Add table
Reference in a new issue