class DataModelerScreenPresenter extends KieEditor<String> {

    public void onSafeRename() {

        if (context.getEditorModelContent().getOriginalClassName() != null) {
            //if we are about to rename a .java file that could be parsed without errors, and we can calculate the
            //className we can check for class usages prior to renaming and we can also suggest to perform an automatic
            // class renaming.

            final String className = context.getEditorModelContent().getOriginalClassName();

            showAssetUsagesDisplayer.showAssetUsages(Constants.INSTANCE.modelEditor_confirm_renaming_of_used_class(className),
                                                     versionRecordManager.getCurrentPath(),
                                                     className,
                                                     ResourceType.JAVA,
                                                     () -> rename(),
                                                     () -> {
                                                     });
        } else {
            //we couldn't parse the class, so no check can be done. Just proceed with the standard
            //file renaming procedure.
            rename();
        }
    }

    @Inject public  DataModelerScreenPresenter(DataModelerScreenView baseView,
                                      SessionInfo sessionInfo);

}