Package org.eclipse.ui.views.properties

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


      annotationsTable.setSorter(new ViewerSorter());
      annotationsTable.setInput(matchingAnnotations);

      final Sash sash = new Sash(annotationsComposite, SWT.HORIZONTAL);

      final PropertySheetPage propertySheet = new PropertySheetPage();
      propertySheet.createControl(annotationsComposite);
      propertySheet.setPropertySourceProvider(new IPropertySourceProvider() {
        public IPropertySource getPropertySource(Object object) {
          if (object instanceof Annotation) {
            IPropertySource annotationPropertySource = new AnnotationPropertySource(((Annotation) object));
            return annotationPropertySource;
          }
          return null;
        }
      });

      annotationsTable.addSelectionChangedListener(new ISelectionChangedListener() {
        public void selectionChanged(SelectionChangedEvent event) {
          propertySheet.selectionChanged(null, event.getSelection());
        }
      });

      final FormLayout form = new FormLayout();
      annotationsComposite.setLayout(form);

      FormData tableData = new FormData();
      tableData.top = new FormAttachment(0, 0);
      tableData.bottom = new FormAttachment(sash, 2);
      tableData.left = new FormAttachment(0, 0);
      tableData.right = new FormAttachment(100, 0);
      annotationsTable.getControl().setLayoutData(tableData);

      FormData propertiesData = new FormData();
      propertiesData.top = new FormAttachment(sash, 2);
      propertiesData.left = new FormAttachment(0, 0);
      propertiesData.right = new FormAttachment(100, 0);
      propertiesData.bottom = new FormAttachment(100, 0);
      propertySheet.getControl().setLayoutData(propertiesData);

      final FormData sashData = new FormData();
      sashData.top = new FormAttachment(60, 0);
      sashData.left = new FormAttachment(0, 0);
      sashData.right = new FormAttachment(100, 0);
View Full Code Here


    public IStatus runInUIThread(IProgressMonitor monitor) {
      Object[] pages = propertySheetPages.toArray();
      propertySheetPages.clear();

      for (int i = 0; i < pages.length; i++) {
        PropertySheetPage page = (PropertySheetPage) pages[i];
        if ((page != null) && (page.getControl() != null) && !page.getControl().isDisposed()) {
          page.refresh();
        }
      }

      return Status.OK_STATUS;
    }
View Full Code Here

  /**
   * @return
   */
  private PropertySheetPage getPropertySheetPage() {
    if (null == _propertySheetPage) {
      _propertySheetPage = new PropertySheetPage();
      _propertySheetPage.setPropertySourceProvider(new IPropertySourceProvider() {

        @Override
        public IPropertySource getPropertySource(final Object object) {
          return new ScannedMapPropertySource((ScannedMap) object);
View Full Code Here

  /**
   * @return
   */
  private PropertySheetPage getPropertySheetPage() {
    if (null == _propertySheetPage) {
      _propertySheetPage = new PropertySheetPage();
      _propertySheetPage.setPropertySourceProvider(new IPropertySourceProvider() {

        @Override
        public IPropertySource getPropertySource(final Object object) {
          return new ScannedMapPropertySource((ScannedMap) object);
View Full Code Here

    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);
View Full Code Here

    this.propertySourceProvider = propertySourceProvider;
  }

  @Override
  protected IPage createPage() {
    PropertySheetPage propertySheet = new PropertySheetPage();
    propertySheet.setPropertySourceProvider(propertySourceProvider);
    return propertySheet;
  }
View Full Code Here

  @Override
  public Object getAdapter(Class adapter) {
    // integrate with Properties view
    if (adapter == IPropertySheetPage.class) {
      PropertySheetPage page = new PropertySheetPage();
      page
          .setPropertySourceProvider(new RepositoryPropertySourceProvider(
              page));
      return page;
    }
    return super.getAdapter(adapter);
View Full Code Here

/**
* Returns the property sheet.
*/
protected IPropertySheetPage getPropertySheet() {
  if (this.propertyPage == null) {
    this.propertyPage = new PropertySheetPage();
  }
    return this.propertyPage;
}
View Full Code Here

    }
    return super.getAdapter(type);
  }

  protected IPropertySheetPage getPropertySheetPage() {
    PropertySheetPage page = new PropertySheetPage();
    page.setRootEntry(new UndoablePropertySheetEntry(getCommandStack()));
    return page;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.views.properties.PropertySheetPage

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.