org.eclipse.emf.ecp.ide.view.internal.service
Class IDEViewModelRegistryImpl

java.lang.Object
  extended by org.eclipse.emf.ecp.ide.view.internal.service.IDEViewModelRegistryImpl
All Implemented Interfaces:
IDEViewModelRegistry

public class IDEViewModelRegistryImpl
extends Object
implements IDEViewModelRegistry

An implementation of the IDEViewModelRegistry.

Author:
Eugen Neufeld, Alexandra Buzila

Constructor Summary
IDEViewModelRegistryImpl()
           
 
Method Summary
 void register(String ecorePath, VView viewModel)
          Register an ECore with a VView.
 void registerViewModel(VView view, String path)
          Register a view with its absolute path.
 void registerViewModelEditor(VView viewModel, ViewModelEditorCallback viewModelEditor)
          Register a view model editor with a view.
 void unregister(String registeredEcorePath, VView viewModel)
          Unregister a VView from an ECore.
 void unregisterViewModelEditor(VView viewModel, ViewModelEditorCallback viewModelEditor)
          Unregister a view model editor, called when the view model editor closes.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IDEViewModelRegistryImpl

public IDEViewModelRegistryImpl()
Method Detail

register

public void register(String ecorePath,
                     VView viewModel)
Description copied from interface: IDEViewModelRegistry
Register an ECore with a VView.

Specified by:
register in interface IDEViewModelRegistry
Parameters:
ecorePath - the path to the ECore connected to the VView
viewModel - the VView

unregister

public void unregister(String registeredEcorePath,
                       VView viewModel)
Description copied from interface: IDEViewModelRegistry
Unregister a VView from an ECore. eg when the root class changes.

Specified by:
unregister in interface IDEViewModelRegistry
Parameters:
registeredEcorePath - the path to the ECore connected to the VView
viewModel - the VView

registerViewModelEditor

public void registerViewModelEditor(VView viewModel,
                                    ViewModelEditorCallback viewModelEditor)
                             throws IOException
Description copied from interface: IDEViewModelRegistry
Register a view model editor with a view.

Specified by:
registerViewModelEditor in interface IDEViewModelRegistry
Parameters:
viewModel - the VView
viewModelEditor - the view model editor
Throws:
IOException - if a resource cannot be loaded

unregisterViewModelEditor

public void unregisterViewModelEditor(VView viewModel,
                                      ViewModelEditorCallback viewModelEditor)
Description copied from interface: IDEViewModelRegistry
Unregister a view model editor, called when the view model editor closes.

Specified by:
unregisterViewModelEditor in interface IDEViewModelRegistry
Parameters:
viewModel - the VView
viewModelEditor - the view model editor

registerViewModel

public void registerViewModel(VView view,
                              String path)
Description copied from interface: IDEViewModelRegistry
Register a view with its absolute path.

Specified by:
registerViewModel in interface IDEViewModelRegistry
Parameters:
view - the VView
path - the path to the view file


Copyright © 2015. All Rights Reserved.