예제 #1
0
  @Override
  public void createPartControl(Composite parent) {

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

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

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