@Override
        public IStatus runInUIThread(IProgressMonitor monitor) {
            tickCount++;
            StyledText editorControl = getEditorControl();
            if (editorControl == null || editorControl.isDisposed()) {
                stopped = true;
            }

            if (!stopped) {
                setTitleImage(DBeaverIcons.getImage(UIIcon.LOADING.get(tickCount % UIIcon.LOADING.size())));
                schedule(100);
            } else {
                if (oldCursor != null) {
                    if (editorControl != null && !editorControl.isDisposed()) {
                        editorControl.setCursor(oldCursor);
                    }
                }
                refreshEditorIconAndTitle();
            }
            return Status.OK_STATUS;
        }
Build and update icon and title
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/SQLEditor.java