@Override
    public <T> T getAdapter(Class<T> adapter)
    {
        if (BinaryContent.class.isAssignableFrom(adapter)) {
            return adapter.cast(manager.getContent());
        } else if (HexManager.class.isAssignableFrom(adapter)) {
            return adapter.cast(manager);
        } else {
            return super.getAdapter(adapter);
        }
    }
@see org.eclipse.ui.part.EditorPart#doSaveAs()
plugins/org.jkiss.dbeaver.ui.editors.hex/src/org/jkiss/dbeaver/ui/editors/binary/BinaryEditor.java