Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,11 @@ private boolean isNonTrivialSelection(ITextSelection selection) {


private ClipboardData getClipboardData(ITypeRoot inputElement, int offset, int length) {
CompilationUnit astRoot= SharedASTProviderCore.getAST(inputElement, SharedASTProviderCore.WAIT_ACTIVE_ONLY, null);
// Since this call happens in the UI thread, pass WAIT_NO as parameter
// so that the call can not reach the wait call that causes UI freezes.
// The cost of doing so is that the method could return null from time
// to time and therefore the imports may not be copied to the clipboard
CompilationUnit astRoot= SharedASTProviderCore.getAST(inputElement, SharedASTProviderCore.WAIT_NO, null);
if (astRoot == null) {
return null;
}
Expand Down
Loading