Package org.eclipse.ui

Examples of org.eclipse.ui.IPageListener


        update(CoolBarItem.CLOSE_ALL, null, part, false);
      }
    };

    /* Add Selection Listener to Workbench Pages */
    fWindow.addPageListener(new IPageListener() {
      public void pageOpened(IWorkbenchPage page) {
        page.addSelectionListener(selectionListener);
        page.addPartListener(partListener);

        IWorkbenchPart activePart = page.getActivePart();
View Full Code Here


   *
   * @param configurer
   */
  private void hookTitleUpdateListeners(IWorkbenchWindowConfigurer configurer) {
    // hook up the listeners to update the window title
    configurer.getWindow().addPageListener(new IPageListener() {
      public void pageActivated(IWorkbenchPage page) {
        updateTitle(false);
      }

      public void pageClosed(IWorkbenchPage page) {
View Full Code Here

     * Notifies the listener that a part has been activated.
     */
    public void firePageActivated(final IWorkbenchPage page) {
        Object[] array = getListeners();
        for (int i = 0; i < array.length; i++) {
            final IPageListener l = (IPageListener) array[i];
            fireEvent(new SafeRunnable() {
                public void run() {
                    l.pageActivated(page);
                }
            }, l, page, "activated::"); //$NON-NLS-1$
        }
    }
View Full Code Here

     * Notifies the listener that a part has been closed
     */
    public void firePageClosed(final IWorkbenchPage page) {
        Object[] array = getListeners();
        for (int i = 0; i < array.length; i++) {
            final IPageListener l = (IPageListener) array[i];
            fireEvent(new SafeRunnable() {
                public void run() {
                    l.pageClosed(page);
                }
            }, l, page, "closed::"); //$NON-NLS-1$
        }
    }
View Full Code Here

     * Notifies the listener that a part has been opened.
     */
    public void firePageOpened(final IWorkbenchPage page) {
        Object[] listeners = getListeners();
        for (int i = 0; i < listeners.length; i++) {
            final IPageListener l = (IPageListener) listeners[i];
            fireEvent(new SafeRunnable() {
                public void run() {
                    l.pageOpened(page);
                }
            }, l, page, "opened::"); //$NON-NLS-1$
        }
    }
View Full Code Here

     *
     * @param configurer
     */
    private void hookTitleUpdateListeners( IWorkbenchWindowConfigurer configurer )
    {
        configurer.getWindow().addPageListener( new IPageListener()
        {
            public void pageActivated( IWorkbenchPage page )
            {
                updateTitle( false );
            }
View Full Code Here

     *
     * @param configurer
     */
    private void hookTitleUpdateListeners( IWorkbenchWindowConfigurer configurer )
    {
        configurer.getWindow().addPageListener( new IPageListener()
        {
            public void pageActivated( IWorkbenchPage page )
            {
                updateTitle( false );
            }
View Full Code Here

     * Hooks the listeners needed on the window
     * @param configurer
     */
    private void hookTitleUpdateListeners(IWorkbenchWindowConfigurer configurer) {
      // hook up the listeners to update the window title
      configurer.getWindow().addPageListener(new IPageListener() {
        public void pageActivated(IWorkbenchPage page) {
          updateTitle();
        }
       
        public void pageClosed(IWorkbenchPage page) {
View Full Code Here

     *
     * @param listener
     */
    public static void addToAllPartListener(final IPartListener listener) {
        // listens to new windows and pages
        final IPageListener pageListener = new IPageListener() {
            public void pageOpened(IWorkbenchPage page) {
                page.addPartListener(listener);
            }
           
            public void pageClosed(IWorkbenchPage page) {
View Full Code Here

    IWorkbench wb = PlatformUI.getWorkbench();
    wb.addWindowListener(listener);
  }

  private void createPageListener(IWorkbenchWindow window) {
    IPageListener listener = new IPageListener() {
      @Override
      public void pageActivated(IWorkbenchPage page) {
      }

      @Override
View Full Code Here

TOP

Related Classes of org.eclipse.ui.IPageListener

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.