Package org.eclipse.ui.views.properties

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


    };
  }
 
  private static IPropertySource createSpreadsheetPropertySource(final SpreadsheetEntry spreadsheet)
  {
    return new IPropertySource() {
      public IPropertyDescriptor[] getPropertyDescriptors()
      {
        return new IPropertyDescriptor[] {
          new PropertyDescriptor("author", "Author"),
          new PropertyDescriptor("document", "Document"),
View Full Code Here


    };
  }
 
  private static IPropertySource createDocumentPropertySource(final DocumentListEntry document)
  {
    return new IPropertySource() {
      public IPropertyDescriptor[] getPropertyDescriptors()
      {
        return new IPropertyDescriptor[] {
          new PropertyDescriptor("author", "Author"),
          new PropertyDescriptor("document", "Document"),
View Full Code Here

            if (value instanceof IPropertySource){
                return createChildren((IPropertySource) value);
            }
        } else if (Platform.getAdapterManager().hasAdapter(parentElement,
                "org.eclipse.ui.views.properties.IPropertySource")) { //$NON-NLS-1$
            IPropertySource source = (IPropertySource) Platform.getAdapterManager().getAdapter(
                    parentElement, "org.eclipse.ui.views.properties.IPropertySource"); //$NON-NLS-1$
            return createChildren(source);
        }
        return null;
    }
View Full Code Here

        super.dispose();
    }

    public void selectionChanged(IWorkbenchPart part, ISelection selection) {
        this.sourcePart = part;
        IPropertySource newSource = getSource(selection);
        if (areObjectsEqual(source, newSource)) {
            return;
        }
        if (source instanceof GraphElement) {
            ((GraphElement) source).removePropertyChangeListener(this);
View Full Code Here

            ((GraphElement) source).addPropertyChangeListener(this);
        }
        updateChildren();
    }
    private IPropertySource getSource(ISelection selection) {
        IPropertySource source = null;
        if (selection instanceof IStructuredSelection) {
            IStructuredSelection structuredSelection = (IStructuredSelection) selection;
            if (!structuredSelection.isEmpty()) {
                Object sel = structuredSelection.getFirstElement();
                if (sel instanceof IPropertySource) {
View Full Code Here

    //
  }

  public IPropertySource getPropertySource(Object object) {
    Element model = null;
    IPropertySource source = null;

    if ((model = DesignerPropertyTool.getElementNode(object)) != null) {
      source = (IPropertySource) ((INodeNotifier) (model))
          .getAdapterFor(IPropertySource.class);
      if (source == null) {
View Full Code Here

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

    if (fSelectedEntries != null) {
      Object[] entries = fSelectedEntries;
      ISelection selection = fInput;
      boolean needsRefresh = false;
      if (selection != null && !selection.isEmpty() && selection instanceof IStructuredSelection) {
        IPropertySource source = getConfiguration().getPropertySourceProvider(this).getPropertySource(((IStructuredSelection) selection).getFirstElement());
        if (source != null && source instanceof IPropertySourceExtension) {
          for (int i = 0; i < entries.length; i++) {
            if (entries[i] instanceof IPropertySheetEntry) {
              IPropertySheetEntry entry = (IPropertySheetEntry) entries[i];
              needsRefresh = true;
View Full Code Here

  public static IPropertySource asPropertySource(Object object) {
    if (object instanceof IPropertySource) {
      return (IPropertySource) object;
    }
    IPropertySource answer = null;
    if (object instanceof IPropertySourceProvider) {
      IPropertySourceProvider provider = (IPropertySourceProvider) object;
      answer = provider.getPropertySource(object);
    }
    if (answer == null && object != null) {
View Full Code Here

   */
  public static <T> List<IPropertySource> toPropertySourceList(List<T> list) {
    List<IPropertySource> answer = new ArrayList<IPropertySource>();
    if (list != null) {
      for (T object : list) {
        IPropertySource propertySource = PropertySources.asPropertySource(object);
        if (propertySource != null) {
          answer.add(propertySource);
        }
      }
    }
View Full Code Here

TOP

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

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.