How to open editor in version 7?

I have used the following code previously in version 6 to open my custom editor window. But in v7 WindowManager is deprecated.

    MyEntity editedItem = dataManager.load(loadContext);
    WindowManager wm = App.getInstance().getWindowManager();
    WindowConfig wc = AppBeans.get(WindowConfig.NAME);
    wm.openEditor(wc.getWindowInfo("myproject$MyEntity.edit"), editedItem, WindowManager.OpenType.DIALOG).setSizeAuto();

My Editor screen extends an AbstractEditor like this:

public class MyEntityEdit extends AbstractEditor<MyEntity>

Hi,

It is here in documentation: Opening Screens.

Example:

@Inject
private ScreenBuilders screenBuilders;

private void editSelectedEntity(Customer entity) {
    screenBuilders.editor(Customer.class, this)
            .editEntity(entity)
            .build()
            .show();
}