Esempio n. 1
0
 /**
  * @see org.eclipse.ui.forms.editor.FormEditor#init(org.eclipse.ui.IEditorSite,
  *     org.eclipse.ui.IEditorInput)
  */
 public void init(IEditorSite site, IEditorInput input) throws PartInitException {
   if (input.getAdapter(RepositoryCommit.class) == null)
     throw new PartInitException("Input could not be adapted to commit object"); // $NON-NLS-1$
   super.init(site, input);
   setPartName(input.getName());
   setTitleToolTip(input.getToolTipText());
 }
Esempio n. 2
0
 @Override
 public void dispose() {
   disposeScheduleAction();
   if (headerImage != null) {
     headerImage.dispose();
   }
   if (editorBusyIndicator != null) {
     editorBusyIndicator.stop();
   }
   if (activateAction != null) {
     activateAction.dispose();
   }
   if (menuService != null) {
     if (leftToolBarManager != null) {
       menuService.releaseContributions(leftToolBarManager);
     }
     if (toolBarManager instanceof ContributionManager) {
       menuService.releaseContributions((ContributionManager) toolBarManager);
     }
   }
   if (textSupport != null) {
     textSupport.dispose();
   }
   if (messageHyperLinkListener instanceof IDisposable) {
     ((IDisposable) messageHyperLinkListener).dispose();
   }
   super.dispose();
 }
Esempio n. 3
0
 @Override
 public void setFocus() {
   IFormPage page = getActivePageInstance();
   if (page != null) {
     page.setFocus();
   } else {
     super.setFocus();
   }
 }
Esempio n. 4
0
  @Override
  public void init(IEditorSite site, IEditorInput input) throws PartInitException {
    if (!(input instanceof TaskEditorInput)) {
      throw new PartInitException(
          "Invalid editor input \"" + input.getClass() + "\""); // $NON-NLS-1$ //$NON-NLS-2$
    }

    super.init(site, input);

    this.taskEditorInput = (TaskEditorInput) input;
    this.task = taskEditorInput.getTask();

    // initialize selection
    site.getSelectionProvider().setSelection(new StructuredSelection(task));

    setPartName(input.getName());

    // activate context
    IContextService contextSupport = (IContextService) site.getService(IContextService.class);
    if (contextSupport != null) {
      contextSupport.activateContext(ID_EDITOR);
    }
  }
Esempio n. 5
0
 public void dispose() {
   refListenerHandle.remove();
   super.dispose();
 }
Esempio n. 6
0
 @Override
 protected void createPages() {
   super.createPages();
   TaskEditorBloatMonitor.editorOpened(this);
 }