/** * The <code>TextPropertyDescriptor</code> implementation of this * <code>IPropertyDescriptor</code> method creates and returns a new * <code>TextCellEditor</code>. * <p> * The editor is configured with the current validator if there is one. * </p> */ public CellEditor createPropertyEditor(Composite parent) { CellEditor editor = new TextCellEditor(parent); if (getValidator() != null) { editor.setValidator(getValidator()); } return editor; } }
private IPropertyDescriptor createDefaultPropertyDescriptor(String attributeName, boolean hideOnFilter) { // The descriptor class used here is also used in // updatePropertyDescriptors() TextPropertyDescriptor descriptor = new TextPropertyDescriptor(attributeName, attributeName); descriptor.setCategory(getCategory(null)); descriptor.setDescription(attributeName); if (hideOnFilter && fSetExpertFilter) { descriptor.setFilterFlags(new String[]{IPropertySheetEntry.FILTER_ID_EXPERT}); } return descriptor; }
TextPropertyDescriptor tpd = new TextPropertyDescriptor(id, name); if (category != null) { tpd.setCategory(category);
protected IPropertyDescriptor createDefaultPropertyDescriptor(String attributeName) { TextPropertyDescriptor descriptor = new TextPropertyDescriptor(attributeName, attributeName); return descriptor; }
public IPropertyDescriptor createAttributePropertyDescriptor(Attr attr) { IPropertyDescriptor result = null; String attributeName = attr.getName(); ModelQuery mq = ModelQueryUtil.getModelQuery(attr.getOwnerDocument()); CMAttributeDeclaration ad = null; if (mq != null) { ad = mq.getCMAttributeDeclaration(attr); } if (ad != null) { result = createPropertyDescriptorHelper(attributeName, attr.getOwnerElement(), ad); } if (result == null) { result = new TextPropertyDescriptor(attributeName, attributeName); } return result; }
private IPropertyDescriptor createTextPropertyDescriptor(CMAttributeDeclaration attrDecl) { TextPropertyDescriptor descriptor = new TextPropertyDescriptor(attrDecl.getAttrName(), attrDecl.getAttrName()); descriptor.setCategory(getCategory(attrDecl)); descriptor.setDescription(attrDecl.getAttrName()); if ((attrDecl.getUsage() != CMAttributeDeclaration.REQUIRED) && fSetExpertFilter) { descriptor.setFilterFlags(new String[]{IPropertySheetEntry.FILTER_ID_EXPERT}); } return descriptor; }
/** * The <code>TextPropertyDescriptor</code> implementation of this * <code>IPropertyDescriptor</code> method creates and returns a new * <code>TextCellEditor</code>. * <p> * The editor is configured with the current validator if there is one. * </p> */ @Override public CellEditor createPropertyEditor(Composite parent) { CellEditor editor = new TextCellEditor(parent); if (getValidator() != null) { editor.setValidator(getValidator()); } return editor; } }
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); } } if (result == null) { result = new TextPropertyDescriptor(HACK, HACK); } return result; } }
/** * The <code>TextPropertyDescriptor</code> implementation of this * <code>IPropertyDescriptor</code> method creates and returns a new * <code>TextCellEditor</code>. * <p> * The editor is configured with the current validator if there is one. * </p> */ @Override public CellEditor createPropertyEditor(Composite parent) { CellEditor editor = new TextCellEditor(parent); if (getValidator() != null) { editor.setValidator(getValidator()); } return editor; } }
public IPropertyDescriptor createTextPropertyDescriptor(Text text) { IPropertyDescriptor result = null; Node parentNode = text.getParentNode(); if ((parentNode != null) && (parentNode.getNodeType() == Node.ELEMENT_NODE)) { Element parentElement = (Element) parentNode; ModelQuery mq = ModelQueryUtil.getModelQuery(text.getOwnerDocument()); CMElementDeclaration ed = null; if (mq != null) { ed = mq.getCMElementDeclaration(parentElement); } if (ed != null) { result = createPropertyDescriptorHelper(HACK, parentElement, ed); } else { result = createDefaultPropertyDescriptor(parentElement.getNodeName()); } } if (result == null) { result = new TextPropertyDescriptor(HACK, HACK); } return result; }