コード例 #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();
 }