Package org.eclipse.ui.views.properties

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


        treeContentHelper.setNodeValue((Node) item.getData(), value.toString(), getControl().getShell());
      }
    }

    public CellEditor getCellEditor(Object o, int col) {
      IPropertyDescriptor pd = propertyDescriptorFactory.createPropertyDescriptor(o);
      return pd != null ? pd.createPropertyEditor(XMLTableTreeViewer.this.getTree()) : null;
    }
View Full Code Here


      }
      // enableNodeSelectionListener(true);
    }

    public CellEditor getCellEditor(Object o, int col) {
      IPropertyDescriptor pd = propertyDescriptorFactory.createPropertyDescriptor(o);
      return pd != null ? pd.createPropertyEditor(control) : null;
    }
View Full Code Here

        Constraint constraint = vertex.getConstraint();
        if ( constraint == null ) {
            return;
        }
        IPropertyDescriptor prop = new PropertyDescriptor( CONSTRAINT,
                                                           CONSTRAINT_CAP );
        addProperty( prop,
                     constraint.toString(),
                     descriptorList,
                     valueMap );
View Full Code Here

        Constraint constraint = vertex.getConstraint();
        if ( constraint == null ) {
            return;
        }
        IPropertyDescriptor prop = new PropertyDescriptor( CONSTRAINT,
                                                           CONSTRAINT_CAP );
        addProperty( prop,
                     constraint.toString(),
                     descriptorList,
                     valueMap );
View Full Code Here

    // from PropertyChangeListener
    public void propertyChange(PropertyChangeEvent evt) {
        boolean propFound = false;
        for (TreeItem item: tree.getItems()) {
            IPropertyDescriptor descriptor = (IPropertyDescriptor) item.getData(PROPERTY_DESCRIPTOR_KEY);
            if (evt.getPropertyName().equals(descriptor.getId())) {
                CellEditorListener cellEditorListener = (CellEditorListener) item.getData(CELL_EDITOR_LISTENER_KEY);
                Object value = source.getPropertyValue(descriptor.getId());
                if (cellEditorListener != null) {
                    cellEditorListener.updateValueInView(value);
                } else {
                    item.setText(1, getStringValue(descriptor, value));
                }
View Full Code Here

        if (source == null) {
            return;
        }
        IPropertyDescriptor[] descriptors = source.getPropertyDescriptors();
        for (int i = 0; i < descriptors.length; i++) {
            IPropertyDescriptor descriptor = descriptors[i];
            Object value = source.getPropertyValue(descriptor.getId());

            final TreeItem item = new TreeItem(tree, SWT.NONE, i);
            item.setText(0, descriptor.getDisplayName());
            item.setText(1, getStringValue(descriptor, value));

            CellEditor cellEditor = descriptor.createPropertyEditor(tree);
            CellEditorListener cellEditorListener = null;
            if (cellEditor != null) {
                cellEditor.setValue(value);
                cellEditorListener = new CellEditorListener(item, descriptor, cellEditor);
                cellEditor.addListener(cellEditorListener);
View Full Code Here

     
      if (tagregResolver != null) { //relies on getTagEntity() having been called to have setup the _element
        final ITagElement tag = tagregResolver.getTagElement(_element);
        if (tag != null) {
          for (final ITagAttribute attr : tag.getAttributes().values()) {
            final IPropertyDescriptor pd = getAttrPropertyDescriptor(attr
                .getName());
            if (pd != null)
              result.add(new PropertyDescriptorWrapper(_element,
                  pd));// ,
              // getStatusLineManager()));
            else {
              final PropertyDescriptor pd1 = new TextPropertyDescriptor(
                  attr.getName(), attr.getName());
              pd1.setDescription(attr.getDescription());
              pd1.setCategory(ITabbedPropertiesConstants.OTHER_CATEGORY);
              result.add(new PropertyDescriptorWrapper(_element,
                  pd1));// ,
              // getStatusLineManager()));
            }

          }
        }
      }
     
      if (result.size() == 0) {// for JSP and HTML cases
                            // this is still
                            // necessary
        final IPropertyDescriptor[] descs = _innerSource.getPropertyDescriptors();
        for (int i = 0; i < descs.length; i++) {
          final IPropertyDescriptor pd = getAttrPropertyDescriptor((String) descs[i]
              .getId());
          if (pd != null)
            result.add(new PropertyDescriptorWrapper(_element, pd));// ,
          // getStatusLineManager()));
          else {
View Full Code Here

     
      if (tagregResolver != null) { //relies on getTagEntity() having been called to have setup the _element
        final ITagElement tag = tagregResolver.getTagElement(_element);
        if (tag != null) {
          for (final ITagAttribute attr : tag.getAttributes().values()) {
            final IPropertyDescriptor pd = getAttrPropertyDescriptor(attr
                .getName());
            if (pd != null)
              result.add(new PropertyDescriptorWrapper(_element,
                  pd));// ,
              // getStatusLineManager()));
            else {
              final PropertyDescriptor pd1 = new TextPropertyDescriptor(
                  attr.getName(), attr.getName());
              pd1.setDescription(attr.getDescription());
              pd1.setCategory(ITabbedPropertiesConstants.OTHER_CATEGORY);
              result.add(new PropertyDescriptorWrapper(_element,
                  pd1));// ,
              // getStatusLineManager()));
            }

          }
        }
      }
     
      if (result.size() == 0) {// for JSP and HTML cases
                            // this is still
                            // necessary
        final IPropertyDescriptor[] descs = _innerSource.getPropertyDescriptors();
        for (int i = 0; i < descs.length; i++) {
          final IPropertyDescriptor pd = getAttrPropertyDescriptor((String) descs[i]
              .getId());
          if (pd != null)
            result.add(new PropertyDescriptorWrapper(_element, pd));// ,
          // getStatusLineManager()));
          else {
View Full Code Here

    return result;
  }

  public IPropertyDescriptor createAttributePropertyDescriptor(Attr attr) {
    IPropertyDescriptor result = null;

    String attributeName = attr.getName();
    ModelQuery mq = ModelQueryUtil.getModelQuery(attr.getOwnerDocument());

    CMAttributeDeclaration ad = null;
View Full Code Here

    return result;
  }

  public IPropertyDescriptor createElementPropertyDescriptor(Element element) {
    IPropertyDescriptor result = null;
    List list = treeContentHelper.getElementTextContent(element);
    if (list != null) {
      Text text = treeContentHelper.getEffectiveTextNodeForCombinedNodeList(list);
      if (text != null) {
        result = createTextPropertyDescriptor(text);
View Full Code Here

TOP

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

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.