# How to access IModelService

ACTF Editors provides access to model of content through IModelService interface. This section introduces how to obtain IModelService.

1. from org.eclipse.actf.model.ui.util.ModelServiceUtils
   - getActiveModelService() : returns active implementation of IModelService
   - launch(URL)/launch(URL, EditorID) : launch (or activate) and return IEditorPart
   ACTF Editors implement IModelServiceHolder, then you can obtain IModelService implementation by

       ((IModelServiceHolder)editor).getModelServise();

2. from org.eclipse.actf.mediator.MediatorEvent
   - implement IACTFReportGenerator or IACTFReportViewer to your views
   - implement IMediatorEventListener and register it to Mediator.
     (MediatorEvent contains related IModelServiceHolder.)

# Related topics

- Difference between LiveDocument and Document