public void refreshEditorIconAndTitle() {
        DBPDataSourceContainer dsContainer = getDataSourceContainer();
        setPartName(getEditorName());

        // Update icon
        if (editorImage != null) {
            editorImage.dispose();
        }

        DBPImage bottomLeft;
        DBPImage bottomRight;

        if (getExecutionContext() == null) {
            if (dsContainer instanceof DBPStatefulObject && ((DBPStatefulObject) dsContainer).getObjectState() == DBSObjectState.INVALID) {
                bottomRight = DBIcon.OVER_ERROR;
            } else {
                bottomRight = null;
            }
        } else {
            bottomRight = DBIcon.OVER_SUCCESS;
        }

        if (SQLEditorUtils.isSQLSyntaxParserApplied(getEditorInput())) {
            bottomLeft = null;
        } else {
            bottomLeft = DBIcon.OVER_RED_LAMP;
        }

        if (baseEditorImage == null) {
            baseEditorImage = getTitleImage();
        }
        if (bottomLeft != null || bottomRight != null) {
            DBPImage image = new DBIconComposite(new DBIconBinary(null, baseEditorImage), false, null, null, bottomLeft, bottomRight);
            editorImage = DBeaverIcons.getImage(image, false);
        } else {
            editorImage = new Image(Display.getCurrent(), baseEditorImage, SWT.IMAGE_COPY);
        }
        setTitleImage(editorImage);
    }
Build and update icon and title
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/SQLEditor.java