@Override
  public void createPartControl(Composite parent) {

    PageUtil.getPage(getSite()).addSelectionListener(this);

    modelEditor = new GeneratorModelViewer(PageUtil.getPage(getSite()));
    modelEditor.createPartControl(parent);

    getSite().setSelectionProvider(modelEditor);
  }
 @Override
 public void dispose() {
   if (modelEditor != null) modelEditor.dispose();
   if (PageUtil.getPage() != null) PageUtil.getPage().removeSelectionListener(this);
   super.dispose();
 }