Package org.eclipse.ui.part

Examples of org.eclipse.ui.part.IPage


    for (IViewReference ref : references) {   
      if (ref.getId().equals(IConsoleConstants.ID_CONSOLE_VIEW)) {
        IWorkbenchPart part = ref.getPart(false);
        if (part != null && part instanceof PageBookView) {
          PageBookView view = (PageBookView) part;
          IPage page = view.getCurrentPage();
          if (page instanceof TextConsolePage) {
            TextConsolePage textConsolePage = (TextConsolePage) page;
            return textConsolePage.getViewer().getTextWidget();
          }
        }
View Full Code Here


    boolean isForeignSelection = true;
   
    if (part instanceof ContentOutline) {
      ContentOutline contentOutline = (ContentOutline) part;
     
      IPage currentPage = contentOutline.getCurrentPage();
     
      if (currentPage instanceof OutlinePageBook) {
        OutlinePageBook pageBook = (OutlinePageBook) currentPage;
        isForeignSelection = pageBook.getCasViewPage() != this;
      }
View Full Code Here

        // Create the page book.
        book = new PageBook(parent, SWT.NONE);

        // Create the default page rec.
        IPage defaultPage = createDefaultPage(book);
        defaultPageRec = new PageRec<K>(null, defaultPage);
        preparePage(defaultPageRec);

        // Show the default page
        showPageRec(defaultPageRec);
View Full Code Here

     * to the current page, if it implements <code>IAdaptable</code>.
     */
    @SuppressWarnings("unchecked")
    public Object getAdapter( Class key ) {
        // delegate to the current page, if supported
        IPage page = getCurrentPage();
        Object adapter = Util.getAdapter(page, key);
        if (adapter != null) {
            return adapter;
        }
        // if the page did not find the adapter, look for one provided by
View Full Code Here

        /*
         * (non-Javadoc) Method declared on ISelectionProvider.
         */
        public ISelection getSelection() {
            // get the selection provider from the current page
            IPage currentPage = getCurrentPage();
            // during workbench startup we may be in a state when
            // there is no current page
            if (currentPage == null) {
                return StructuredSelection.EMPTY;
            }
View Full Code Here

        /*
         * (non-Javadoc) Method declared on ISelectionProvider.
         */
        public void setSelection( ISelection selection ) {
            // get the selection provider from the current page
            IPage currentPage = getCurrentPage();
            // during workbench startup we may be in a state when
            // there is no current page
            if (currentPage == null) {
                return;
            }
View Full Code Here

                editManager.addListener(editListener);
                editSelection = new StructuredSelection(editManager.getEditFeature());
            }
        }
        // pass the selection to the page
        IPage page = getCurrentPage(); // We are expecting a FeaturePanelPage
                                       // here
        if (page != null && page instanceof ISelectionListener) {
            ISelectionListener notifyPage = (ISelectionListener) page;
            notifyPage.selectionChanged(part, editSelection);
        }
View Full Code Here

            PageRec rec = new PageRec(part, page);
            return rec;
        }
        setContributor(part);
        IPage page = (IPage) new FeaturePanelPage(this);
        initPage((IPageBookViewPage) page);
        page.createControl(getPageBook());
        return new PageRec(part, page);
    }
View Full Code Here

    /* (non-Javadoc)
     * Method declared on PageBookView.
     */
    protected void doDestroyPage(IWorkbenchPart part, PageRec rec) {
      IPage page = (IPage) rec.page;
        page.dispose();
        rec.dispose();
    }
View Full Code Here

   *
   * @see org.eclipse.ui.part.PageBookView#doDestroyPage(org.eclipse.ui.IWorkbenchPart,
   *      org.eclipse.ui.part.PageBookView.PageRec)
   */
  protected void doDestroyPage(IWorkbenchPart part, PageRec rec) {
    IPage page = (IPage) rec.page;
    page.dispose();
    rec.dispose();
  }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.part.IPage

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.