Package org.eclipse.ui

Examples of org.eclipse.ui.IPartService


        action.updateActionBars();
    }

    private void createListeners()
    {
        IPartService ps = (IPartService) getViewSite().getService(IPartService.class);
        ps.addPartListener(new EditorViewPartListener(this));
        viewer.getGraphControl().addControlListener(new ControlAdapter()
        {
            @Override
            public void controlResized(ControlEvent e)
            {
View Full Code Here


        // FIXME new_model
    }

    private IWorkbenchPart getActivePart() {
        final IWorkbenchWindow window = getSite().getWorkbenchWindow();
        final IPartService service = window.getPartService();
        final IWorkbenchPart part = service.getActivePart();
        return part;
    }
View Full Code Here

     * @param site the part site
     */
    public FindReplaceDialogStub(IWorkbenchPartSite site) {
      this(site.getShell());
      fWindow= site.getWorkbenchWindow();
      IPartService service= fWindow.getPartService();
      service.addPartListener(this);
      partActivated(service.getActivePart());
    }
View Full Code Here

    if (resource == null) {
      IWorkbench workbench = SSEUIPlugin.getDefault().getWorkbench();
      if (workbench != null) {
        IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
        if (window != null) {
          IPartService service = window.getPartService();
          if (service != null) {
            Object part = service.getActivePart();
            if (part != null && part instanceof IEditorPart) {
              editorPart = (IEditorPart) part;
              if (editorPart != null) {
                IStructuredModel model = null;
                ITextEditor textEditor = null;
View Full Code Here

    if (resource == null) {
      IWorkbench workbench = SSEUIPlugin.getDefault().getWorkbench();
      if (workbench != null) {
        IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
        if (window != null) {
          IPartService service = window.getPartService();
          if (service != null) {
            Object part = service.getActivePart();
            if (part != null && part instanceof IEditorPart) {
              editorPart = (IEditorPart) part;
              if (editorPart != null) {
                IStructuredModel model = null;
                ITextEditor textEditor = null;
View Full Code Here

  }

 
  public Object getService(Class api) {
    if (api == IPartService.class) {
      return new IPartService() {

       
        public void addPartListener(IPartListener listener) {

        }
View Full Code Here

    IWorkbenchWindow wndo = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
    if (null == wndo) {
      return null;
    }

    IPartService srvc = wndo.getPartService();
    return getAcceptableEditor(srvc.getActivePart());
  }
View Full Code Here

     
    });
    createManaCurveChart();
   
    IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
    IPartService service = window.getPartService();
    service.addPartListener(this);

    IWorkbenchPartReference aref = service.getActivePartReference();
    if(aref != null) {
      IWorkbenchPart apart = aref.getPart(false);
      if (apart instanceof EditorPart) {
        installUpdateListener(apart);
      }
View Full Code Here

  public void dispose() {
    if (monitoredDeck != null) {
      uninstallUpdateListener();
    }
    IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
    IPartService service = window.getPartService();
    service.removePartListener(this);

    super.dispose();
  }
View Full Code Here

    tooltip.setRespectDisplayBounds(true);
    tooltip.setPopupDelay(2500);
    tooltip.activate();

    IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
    IPartService service = window.getPartService();
    service.addPartListener(this);

    IWorkbenchPartReference aref = service.getActivePartReference();
    if (aref != null) {
      IWorkbenchPart apart = aref.getPart(false);
      installSelectionListener(apart);
    }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.IPartService

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.