Examples of IPropertySheetPage


Examples of org.eclipse.ui.views.properties.IPropertySheetPage

    // show properties
    try {
      IViewPart part = page.showView(IPageLayout.ID_PROP_SHEET);
      if (part instanceof PropertySheet) {
        IPropertySheetPage propPage = (IPropertySheetPage) ((PropertySheet) part)
            .getCurrentPage();
        if (propPage instanceof PropertySheetPage) {
          ((PropertySheetPage) propPage).refresh();
        } else if (propPage instanceof TabbedPropertySheetPage) {
          ((TabbedPropertySheetPage) propPage).refresh();
View Full Code Here

Examples of org.eclipse.ui.views.properties.IPropertySheetPage

  public void selectionChanged(IWorkbenchPart part, ISelection selection) {
    PropertySheet propertySheet = getPropertySheet();
    if (propertySheet == null) {
      return;
    }
    IPropertySheetPage answer = null;
    Object first = Selections.getFirstSelection(selection);
    if (first instanceof IAdaptable) {
      IAdaptable adaptable = (IAdaptable) first;
      answer = (IPropertySheetPage) adaptable.getAdapter(IPropertySheetPage.class);
    }
    if (answer == null) {
      answer = new PropertySheetPage();
    }
    Class<?> newPageType = answer.getClass();
    boolean isNew;
    if (compareInstances) {
      isNew = !Objects.equal(answer, oldPage);
    } else {
      isNew = newPageType != oldPageType;
View Full Code Here

Examples of org.eclipse.ui.views.properties.IPropertySheetPage

      propertySheet.partClosed(part);
      propertySheet.partActivated(part);

      // lets check if we have created and initialised a different page instance in the activation...
      IPage currentPage = propertySheet.getCurrentPage();
      IPropertySheetPage selectionPage = page;
      if (currentPage instanceof IPropertySheetPage) {
        selectionPage = (IPropertySheetPage) currentPage;

        // now lets dispose the old page we are not using
        page.dispose();
      }

      if (selectionPage instanceof TabFolderSupport2) {
        TabFolderSupport2 tfs = (TabFolderSupport2) selectionPage;
        tfs.init(propertySheet);
      } else {
        boolean initSelectionPage = false;
        if (selectionPage instanceof Page) {
          Page p = (Page) selectionPage;
          Activator.getLogger().debug("Current page: "+ p + " has Site: " + p.getSite());
          if (initSelectionPage) {
            IViewSite viewSite = propertySheet.getViewSite();
            p.init(new PageSite(viewSite));
          }
        }
      }
      if (selection != null) {
        selectionPage.selectionChanged(part, selection);
      }

    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.