Interface IDEViewModelRegistry

  • All Known Implementing Classes:
    IDEViewModelRegistryImpl

    public interface IDEViewModelRegistry
    The View Model registry handling the update of open view model editors.
    Author:
    Eugen Neufeld
    • Method Detail

      • register

        void register​(java.lang.String ecorePath,
                      VView viewModel)
        Register an ECore with a VView.
        Parameters:
        ecorePath - the path to the ECore connected to the VView
        viewModel - the VView
      • unregister

        void unregister​(java.lang.String registeredEcorePath,
                        VView viewModel)
        Unregister a VView from an ECore. eg when the root class changes.
        Parameters:
        registeredEcorePath - the path to the ECore connected to the VView
        viewModel - the VView
      • registerViewModelEditor

        void registerViewModelEditor​(VView viewModel,
                                     ViewModelEditorCallback viewModelEditor)
                              throws java.io.IOException
        Register a view model editor with a view.
        Parameters:
        viewModel - the VView
        viewModelEditor - the view model editor
        Throws:
        java.io.IOException - if a resource cannot be loaded
      • unregisterViewModelEditor

        void unregisterViewModelEditor​(VView viewModel,
                                       ViewModelEditorCallback viewModelEditor)
        Unregister a view model editor, called when the view model editor closes.
        Parameters:
        viewModel - the VView
        viewModelEditor - the view model editor
      • registerViewModel

        void registerViewModel​(VView view,
                               java.lang.String viewPath)
        Register a view with its absolute path.
        Parameters:
        view - the VView
        viewPath - the path to the view file