Package org.eclipse.ui

Examples of org.eclipse.ui.IEditorSite


  /**
   * Activate contributions.
   */
  public void activate(IEditorPart editor) {
    editor.setFocus();
    IEditorSite site = editor.getEditorSite();
    CompositeEditorActionBars actionBars = (CompositeEditorActionBars) site.getActionBars();
    actionBars.partChanged(editor);
    actionBars.activate(true);
    ((CompositeEditorSite) site).activate();
  }
View Full Code Here


   */
  public void deactivate(IEditorPart editor) {
    if (editor != null) {
      CompositeEditorActionBars actionBars = (CompositeEditorActionBars) editor.getEditorSite().getActionBars();
      actionBars.deactivate(true);
      IEditorSite site = editor.getEditorSite();
      ((CompositeEditorSite) site).deactivate();
    }
  }
View Full Code Here

    }
   
  }
 
  private void showPopUp(Vector<OutlineElement> definitionList,HdlEditor editor,Point position){ 
    IEditorSite control=editor.getEditorSite();
   
    if(m_ProposalShell == null){
      m_ProposalShell= new Shell(control.getShell(), SWT.ON_TOP);
      m_ProposalShell.setFont(JFaceResources.getDefaultFont());
      GridLayout layout= new GridLayout();
      layout.marginWidth= 0;
      layout.marginHeight= 0;
      layout.verticalSpacing= 1;   
View Full Code Here

    return apiEditor;
  }

  public void createTab() {
    apiEditor = new ApiEditor();
    IEditorSite apiSite = this.getComponentEditorPart().publicCreateSite(apiEditor);
    try {
      apiEditor.init(apiSite, apiInput);
    } catch (PartInitException e) {
      ComponenteditorPlugin.getDefault().log(e);
    }
View Full Code Here

    return htmlPreviewEditor;
  }

  public void createTab() {
    htmlPreviewEditor = new HtmlPreviewEditor();
    IEditorSite htmlSite = this.getComponentEditorPart().publicCreateSite(htmlPreviewEditor);
    try {
      htmlPreviewEditor.init(htmlSite, htmlInput);
    } catch (PartInitException e) {
      ComponenteditorPlugin.getDefault().log(e);
    }
View Full Code Here

    return wodEditor;
  }
 
  public void createTab() {
    templateEditor = new TemplateEditor();
    IEditorSite htmlSite = this.getComponentEditorPart().publicCreateSite(templateEditor);
    try {
      templateEditor.init(htmlSite, htmlInput);
    } catch (PartInitException e) {
      ComponenteditorPlugin.getDefault().log(e);
    }
    _templateContainer = createInnerPartControl(getParentSashForm(), templateEditor);
    templateEditor.addPropertyListener(new IPropertyListener() {
      public void propertyChanged(Object source, int propertyId) {
        HtmlWodTab.this.getComponentEditorPart().publicHandlePropertyChange(propertyId);
      }
    });
    if (wodInput != null && ((ComponentEditorFileEditorInput)wodInput).getFile().exists()) {
      wodEditor = new WodEditor();
      IEditorSite wodSite = this.getComponentEditorPart().publicCreateSite(wodEditor);
      try {
        wodEditor.init(wodSite, wodInput);
      } catch (PartInitException e) {
        ComponenteditorPlugin.getDefault().log(e);
      }
View Full Code Here

    return wooEditor;
  }

  public void createTab() {
    wooEditor = new WooEditor();
    IEditorSite wooSite = this.getComponentEditorPart().publicCreateSite(wooEditor);
    try {
      wooEditor.init(wooSite, wooInput);
    } catch (PartInitException e) {
      ComponenteditorPlugin.getDefault().log(e);
    }
View Full Code Here

    /*
     * Workaround: send out a text selection
     * XXX: Needs to be improved, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=32214
     */
    if (editor != null) {
      IEditorSite site= editor.getEditorSite();
      if (site == null)
        return;

      ISelectionProvider provider= editor.getEditorSite().getSelectionProvider();
      if (provider == null)
View Full Code Here

        .applyTo(viewer.getControl());

    MenuManager manager = new MenuManager();
    addEditorActions(manager);
    Menu menu = manager.createContextMenu(viewer.getTextWidget());
    IEditorSite site = getEditorSite();
    site.setSelectionProvider(viewer);
    site.registerContextMenu(
        AbstractTextEditor.COMMON_EDITOR_CONTEXT_MENU_ID, manager,
        viewer, true);
    site.registerContextMenu(
        AbstractTextEditor.DEFAULT_EDITOR_CONTEXT_MENU_ID, manager,
        viewer, true);
    viewer.getTextWidget().setMenu(menu);

    formatDiff();
View Full Code Here

        return queryTableViewer;
    }

    @Override
    protected IEditorSite createSite(IEditorPart editor) {
        IEditorSite site = null;
        site = super.createSite(editor);
        return site;
    }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.IEditorSite

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.