@Override
 public IPropertyDescriptor[] getPropertyDescriptors() {
   IPropertyDescriptor[] ret = new IPropertyDescriptor[1];
   PropertyDescriptor descriptor =
       new TextPropertyDescriptor(PROPERTY_TEXT, PATTERN_NAME_PROPERTIES_LBL);
   descriptor.setCategory(QBEViewElement.COMMON_CATEGORY_BASIC);
   ret[0] = (IPropertyDescriptor) descriptor;
   return ret;
 }
Example #2
0
 static {
   PropertyDescriptor pValueProp =
       new TextPropertyDescriptor(P_VALUE, LogicMessages.PropertyDescriptor_LED_Value);
   pValueProp.setValidator(LogicNumberCellEditorValidator.instance());
   if (descriptors != null) {
     newDescriptors = new IPropertyDescriptor[descriptors.length + 1];
     for (int i = 0; i < descriptors.length; i++) newDescriptors[i] = descriptors[i];
     newDescriptors[descriptors.length] = pValueProp;
   } else newDescriptors = new IPropertyDescriptor[] {pValueProp};
 }
  static {
    PropertyDescriptor descriptor;

    // resource name
    descriptor =
        new PropertyDescriptor(
            IBasicPropertyConstants.P_TEXT, DLTKUIMessages.ScriptElementProperties_name);
    descriptor.setAlwaysIncompatible(true);
    fgPropertyDescriptors[0] = descriptor;
  }
  public static void createPropertyDescriptors(
      List<IPropertyDescriptor> desc,
      Map<String, Object> defaultsMap,
      String preID,
      String prefix) {
    PropertyDescriptor pd =
        new DoublePropertyDescriptor(preID + PadUtil.PADDING_TOP, Messages.common_top);
    pd.setDescription(Messages.common_top);
    pd.setCategory(prefix);
    desc.add(pd);

    pd = new DoublePropertyDescriptor(preID + PadUtil.PADDING_BOTTOM, Messages.common_bottom);
    pd.setDescription(Messages.common_bottom);
    pd.setCategory(prefix);
    desc.add(pd);

    pd = new DoublePropertyDescriptor(preID + PadUtil.PADDING_LEFT, Messages.common_left);
    pd.setDescription(Messages.common_left);
    pd.setCategory(prefix);
    desc.add(pd);

    pd = new DoublePropertyDescriptor(preID + PadUtil.PADDING_RIGHT, Messages.common_right);
    pd.setDescription(Messages.common_right);
    pd.setCategory(prefix);
    desc.add(pd);

    defaultsMap.put(preID + PadUtil.PADDING_TOP, 0.0d);
    defaultsMap.put(preID + PadUtil.PADDING_BOTTOM, 0.0d);
    defaultsMap.put(preID + PadUtil.PADDING_LEFT, 0.0d);
    defaultsMap.put(preID + PadUtil.PADDING_RIGHT, 0.0d);
  }
Example #5
0
 @Override
 public PropertyDescriptor preparePropertyDescriptor() {
   PropertyDescriptor descriptor = new PropertyDescriptor(getID(), getName());
   descriptor.setLabelProvider(
       new LabelProvider() {
         public String getText(Object element) {
           Point point = (Point) element;
           StringBuffer buf = new StringBuffer();
           buf.append("[");
           buf.append(point.x);
           buf.append(",  ");
           buf.append(point.y);
           buf.append("]");
           return buf.toString();
         }
       });
   return descriptor;
 }
Example #6
0
  /** @see org.eclipse.ui.views.properties.IPropertySource#getPropertyDescriptors() */
  @Override
  public IPropertyDescriptor[] getPropertyDescriptors() {
    if (propertyDescriptors == null) {
      List<IPropertyDescriptor> list = new ArrayList<IPropertyDescriptor>();

      // Create a descriptor and set a category
      final PropertyDescriptor textDescriptor = new PropertyDescriptor(COMMAND_NAME, "Name");
      textDescriptor.setCategory("Label");
      list.add(textDescriptor);
      final PropertyDescriptor descriptionDescriptor =
          new TextPropertyDescriptor(COMMAND_DESCRIPTION, "Description");
      descriptionDescriptor.setCategory("Label");
      list.add(descriptionDescriptor);
      final PropertyDescriptor dynamicDescriptor =
          new CheckboxPropertyDescriptor(COMMAND_DYNAMIC, "Dynamic updates");
      dynamicDescriptor.setCategory("Label");
      list.add(dynamicDescriptor);

      // hmm, is it our moving average?
      if (_operation.getCommand() instanceof SimpleMovingAverageCommand) {
        final SliderPropertyDescriptor windowDescriptor =
            new SliderPropertyDescriptor(AVERAGE_WINDOW, "Window", 1, 20);
        windowDescriptor.setCategory("Calculation");
        list.add(windowDescriptor);
      }

      propertyDescriptors = (IPropertyDescriptor[]) list.toArray(new IPropertyDescriptor[] {});
    }
    return propertyDescriptors;
  }
 /** @see org.eclipse.ui.views.properties.IPropertySource#getPropertyDescriptors() */
 public IPropertyDescriptor[] getPropertyDescriptors() {
   if (descriptors == null) {
     List<IPropertyDescriptor> desc = new ArrayList<IPropertyDescriptor>();
     AttributeDescriptor[] attrs =
         type.getAttributeDescriptors().toArray(new AttributeDescriptor[0]);
     PropertyDescriptor d;
     for (int i = 0; i < attrs.length; i++) {
       String name = attrs[i].getLocalName().toLowerCase();
       name = name.substring(0, 1).toUpperCase() + name.substring(1);
       d = new PropertyDescriptor(Integer.valueOf(i), name);
       if (attrs[i] instanceof GeometryDescriptor)
         d.setCategory(Messages.ScemaDescriptor_geometry);
       else d.setCategory(Messages.ScemaDescriptor_attributeTypes);
       desc.add(d);
     }
     descriptors = new IPropertyDescriptor[desc.size()];
     desc.toArray(descriptors);
   }
   IPropertyDescriptor[] c = new IPropertyDescriptor[descriptors.length];
   System.arraycopy(descriptors, 0, c, 0, c.length);
   return c;
 }
  /** @return a List of PropertyDescriptors of parameters. */
  protected List<IPropertyDescriptor> createParamDescriptors() {
    if (m_paramPropDescList.isEmpty()) {
      PropertyDescriptor propDes;
      //      init Parameters
      final IParamNodePO paramNodePO = (IParamNodePO) getPoNode();
      List<IParamDescriptionPO> paramList = paramNodePO.getParameterList();
      IParamNameMapper activeParamNameMapper = getActiveParamNameMapper();
      for (IParamDescriptionPO paramDescr : paramList) {
        ParamValueSet valueSet =
            ParamTextPropertyDescriptor.getValuesSet(paramNodePO, paramDescr.getUniqueId());
        propDes =
            TestDataControlFactory.createValuePropertyDescriptor(
                new ParameterValueController(this, paramDescr, activeParamNameMapper),
                getParameterNameDescr(paramDescr),
                ParamTextPropertyDescriptor.getValues(valueSet),
                valueSet != null ? valueSet.isCombinable() : false);
        propDes.setCategory(P_PARAMETER_CAT);
        propDes.setLabelProvider(new ParameterValueLabelProvider(INCOMPL_DATA_IMAGE));
        m_paramPropDescList.add(propDes);
      }
    }

    return m_paramPropDescList;
  }
 /** @see org.eclipse.ui.views.properties.IPropertySource#getPropertyDescriptors() */
 public IPropertyDescriptor[] getPropertyDescriptors() {
   propertyDescriptors = super.getPropertyDescriptors();
   Collection descriptors = new Vector();
   for (int i = 0; i < propertyDescriptors.length; i++) {
     descriptors.add(propertyDescriptors[i]);
   }
   String cat = "local";
   // Create a descriptor and set a category
   PropertyDescriptor isReadOnly =
       new ComboBoxPropertyDescriptor(
           Integer.toString(CCMModelPackage.ATTRIBUTE_DEF__IS_READONLY), "is read only ", values);
   isReadOnly.setCategory(cat);
   descriptors.add(isReadOnly);
   PropertyDescriptor idl =
       new IDLtypePropertyDescriptor(
           Integer.toString(CCMModelPackage.ATTRIBUTE_DEF__IDL_TYPE),
           "typed by",
           idlTemp,
           idlTypeNames);
   idl.setCategory(cat);
   descriptors.add(idl);
   propertyDescriptors = (IPropertyDescriptor[]) descriptors.toArray(new IPropertyDescriptor[] {});
   return propertyDescriptors;
 }
Example #10
0
  /** Default constructor */
  public CommonEntityModel() {

    //		TextPropertyDescriptor aType = new TextPropertyDescriptor(P_SZ_TYPE,
    // UMLPlugin.getDefault().getResourceString("property.szType"));
    //		TextPropertyDescriptor aLabel =	new TextPropertyDescriptor(P_SZ_LABEL,
    // UMLPlugin.getDefault().getResourceString("property.szLabel"));
    //		TextPropertyDescriptor aSource = new TextPropertyDescriptor(P_SZ_SOURCE,
    // UMLPlugin.getDefault().getResourceString("property.szSource"));
    //		TextPropertyDescriptor aSourceDec =	new TextPropertyDescriptor(P_SZ_SOURCE_DECORATION,
    // UMLPlugin.getDefault().getResourceString("property.szSourceDecoration"));
    //		TextPropertyDescriptor aTarget = new TextPropertyDescriptor(P_SZ_TARGET,
    // UMLPlugin.getDefault().getResourceString("property.szTarget"));
    //		TextPropertyDescriptor aTargetDec =	new TextPropertyDescriptor(P_SZ_TARGET_DECORATION,
    // UMLPlugin.getDefault().getResourceString("property.szTargetDecoration"));
    //
    //		aType.setCategory("Annotation");
    //		aLabel.setCategory("Annotation");
    //		aSource.setCategory("Annotation");
    //		aSourceDec.setCategory("Annotation");
    //		aTarget.setCategory("Annotation");
    //		aTargetDec.setCategory("Annotation");

    TextPropertyDescriptor STEREO_TYPE =
        new TextPropertyDescriptor(
            StereoTypeModel.P_STEREO_TYPE,
            UMLPlugin.getDefault().getResourceString("property.stereoType"));
    PropertyDescriptor SIMPLE_ENTITY_NAME =
        new PropertyDescriptor(
            P_SIMPLE_ENTITY_NAME, UMLPlugin.getDefault().getResourceString("property.simpleName"));
    TextPropertyDescriptor ENTITY_NAME =
        new TextPropertyDescriptor(
            P_ENTITY_NAME, UMLPlugin.getDefault().getResourceString("property.name"));
    ColorPropertyDescriptor BACKGROUND_COLOR =
        new ColorPropertyDescriptor(
            P_BACKGROUND_COLOR, UMLPlugin.getDefault().getResourceString("property.background"));
    PropertyDescriptor ATTRIBUTES =
        new PropertyDescriptor(
            P_ATTRIBUTES, UMLPlugin.getDefault().getResourceString("property.attributes"));
    PropertyDescriptor OPERATTIONS =
        new PropertyDescriptor(
            P_OPERATIONS, UMLPlugin.getDefault().getResourceString("property.operations"));

    STEREO_TYPE.setCategory("Object properties");
    SIMPLE_ENTITY_NAME.setCategory("Object properties");
    ENTITY_NAME.setCategory("Object properties");
    BACKGROUND_COLOR.setCategory("Object properties");
    ATTRIBUTES.setCategory("Object properties");
    OPERATTIONS.setCategory("Object properties");

    propertyDescriptors =
        new IPropertyDescriptor[] {
          STEREO_TYPE, SIMPLE_ENTITY_NAME, ENTITY_NAME, BACKGROUND_COLOR, ATTRIBUTES, OPERATTIONS,
          //				aType,aLabel,aSource,aSourceDec,aTarget,aTargetDec,
        };
  }
 @Override
 public IPropertyDescriptor[] getPropertyDescriptors() {
   String category = "Info";
   PropertyDescriptor hintsProperty = new PropertyDescriptor(HINTS_ID, "Hints");
   hintsProperty.setCategory(category);
   PropertyDescriptor backendProperty = new PropertyDescriptor(BACKEND_ID, "Backend");
   backendProperty.setCategory(category);
   PropertyDescriptor matchCountProperty = new PropertyDescriptor(FILTERS_ID, "Filters");
   matchCountProperty.setCategory(category);
   return new IPropertyDescriptor[] {backendProperty, hintsProperty, matchCountProperty};
 }
 private void addDescriptor(
     String id, String displayName, String category, List<PropertyDescriptor> descriptors) {
   PropertyDescriptor descriptor = new PropertyDescriptor(id, displayName);
   descriptor.setCategory(category);
   descriptors.add(descriptor);
 }
  {
    PropertyDescriptor descriptor;
    String category = CVSUIMessages.cvs;

    // host
    descriptor =
        new PropertyDescriptor(
            ICVSUIConstants.PROP_HOST, CVSUIMessages.CVSRepositoryLocationPropertySource_host);
    descriptor.setAlwaysIncompatible(true);
    descriptor.setCategory(category);
    propertyDescriptors[0] = descriptor;
    // user
    descriptor =
        new PropertyDescriptor(
            ICVSUIConstants.PROP_USER, CVSUIMessages.CVSRepositoryLocationPropertySource_user);
    descriptor.setAlwaysIncompatible(true);
    descriptor.setCategory(category);
    propertyDescriptors[1] = descriptor;
    // port
    descriptor =
        new PropertyDescriptor(
            ICVSUIConstants.PROP_PORT, CVSUIMessages.CVSRepositoryLocationPropertySource_port);
    descriptor.setAlwaysIncompatible(true);
    descriptor.setCategory(category);
    propertyDescriptors[2] = descriptor;
    // root
    descriptor =
        new PropertyDescriptor(
            ICVSUIConstants.PROP_ROOT, CVSUIMessages.CVSRepositoryLocationPropertySource_root);
    descriptor.setAlwaysIncompatible(true);
    descriptor.setCategory(category);
    propertyDescriptors[3] = descriptor;
    // method
    descriptor =
        new PropertyDescriptor(
            ICVSUIConstants.PROP_METHOD, CVSUIMessages.CVSRepositoryLocationPropertySource_method);
    descriptor.setAlwaysIncompatible(true);
    descriptor.setCategory(category);
    propertyDescriptors[4] = descriptor;
  }
Example #14
0
  public IPropertyDescriptor[] getPropertyDescriptors() {
    ArrayList<IPropertyDescriptor> al = new ArrayList<IPropertyDescriptor>();
    al.addAll(Arrays.asList(super.getPropertyDescriptors()));
    PropertyDescriptor a1 = new NoEditableTextPropertyDescriptor(PROP_DATASET, "数据源");
    a1.setCategory("高级");
    al.add(a1);
    //		PropertyDescriptor a2 = new TextPropertyDescriptor(PROP_POSITION, "位置");
    //		a2.setCategory("高级");
    //		al.add(a2);
    if (formComp.getRenderType() == 1 || formComp.getRenderType() == 3) {
      PropertyDescriptor a3 = new TextPropertyDescriptor(PROP_COLUMNCOUNT, "列数");
      a3.setCategory("高级");
      al.add(a3);
    }
    PropertyDescriptor a4 = new ObjectComboPropertyDescriptor(PROP_RENDERTYPE, "渲染类型", renderType);
    a4.setCategory("高级");
    al.add(a4);
    PropertyDescriptor a5 = new TextPropertyDescriptor(PROP_ROWHEIGHT, "每行高度");
    a5.setCategory("高级");
    al.add(a5);
    PropertyDescriptor a6 =
        new ComboBoxPropertyDescriptor(PROP_WITHFORM, "是否是HTML表单", Constant.ISLAZY);
    a6.setCategory("高级");
    al.add(a6);
    PropertyDescriptor a7 = new TextPropertyDescriptor(PROP_BGCOLOR, "表单背景");
    a7.setCategory("高级");
    al.add(a7);
    PropertyDescriptor a8 =
        new ComboBoxPropertyDescriptor(PROP_RENDERHIDDENELE, "是否渲染隐藏的表单元素", Constant.ISLAZY);
    a8.setCategory("高级");
    al.add(a8);
    PropertyDescriptor a9 = new TextPropertyDescriptor(PROP_ELEWIDTH, "行宽");
    a9.setCategory("高级");
    al.add(a9);

    PropertyDescriptor a10 = new TextPropertyDescriptor(PROP_LABELMINWIDTH, "最小标签宽度");
    a10.setCategory("高级");
    al.add(a10);

    TextPropertyDescriptor captionDes = new TextPropertyDescriptor(PROP_CAPTION, "标题");
    captionDes.setCategory("基本");
    al.add(captionDes);

    return al.toArray(new IPropertyDescriptor[0]);
  }
  static {
    descriptors = new Vector();
    PropertyDescriptor propertyDescriptor;

    ///
    propertyDescriptor = new TextPropertyDescriptor(P_ID_PHONENUMBER, P_PHONENUMBER);
    propertyDescriptor.setCategory(P_CONTACTINFO);
    propertyDescriptor.setHelpContextIds(PHONE_NUMBER_CONTEXT);
    descriptors.addElement(propertyDescriptor);

    ///
    propertyDescriptor = new PropertyDescriptor(P_ID_ADDRESS, P_ADDRESS);
    propertyDescriptor.setCategory(P_CONTACTINFO);
    propertyDescriptor.setHelpContextIds(ADDRESS_CONTEXT);
    descriptors.addElement(propertyDescriptor);

    ///
    propertyDescriptor = new TextPropertyDescriptor(P_ID_EMAIL, P_EMAIL);
    propertyDescriptor.setCategory(P_CONTACTINFO);
    propertyDescriptor.setHelpContextIds(EMAIL_CONTEXT);
    propertyDescriptor.setValidator(new EmailAddressValidator());
    descriptors.addElement(propertyDescriptor);

    ///
    propertyDescriptor = new TextPropertyDescriptor(P_ID_FULLNAME, P_FULLNAME);
    propertyDescriptor.setCategory(P_PERSONELINFO);
    propertyDescriptor.setHelpContextIds(FULL_NAME_CONTEXT);
    descriptors.addElement(propertyDescriptor);

    ///
    propertyDescriptor = new PropertyDescriptor(P_ID_BDAY, P_BDAY);
    propertyDescriptor.setCategory(P_PERSONELINFO);
    propertyDescriptor.setHelpContextIds(BIRTHDAY_CONTEXT);
    descriptors.addElement(propertyDescriptor);

    ///
    propertyDescriptor =
        new ComboBoxPropertyDescriptor(
            P_ID_COOP, P_COOP, new String[] {P_VALUE_TRUE_LABEL, P_VALUE_FALSE_LABEL});
    propertyDescriptor.setCategory(P_PERSONELINFO);
    propertyDescriptor.setHelpContextIds(COOP_CONTEXT);
    propertyDescriptor.setLabelProvider(new BooleanLabelProvider());
    descriptors.addElement(propertyDescriptor);

    ///
    propertyDescriptor = new TextPropertyDescriptor(P_ID_SALARY, P_SALARY);
    // add custom validator to propertyDescriptor limiting salary values to be
    // greator than zero
    propertyDescriptor.setHelpContextIds(new Object[] {SALARY_CONTEXT});
    propertyDescriptor.setFilterFlags(new String[] {IPropertySheetEntry.FILTER_ID_EXPERT});
    propertyDescriptor.setValidator(
        new ICellEditorValidator() {
          public String isValid(Object value) {
            if (value == null) return MessageUtil.getString("salary_is_invalid"); // $NON-NLS-1$
            //
            Float trySalary;
            try {
              trySalary = new Float(Float.parseFloat((String) value));
            } catch (NumberFormatException e) {
              return MessageUtil.getString("salary_is_invalid"); // $NON-NLS-1$
            }
            if (trySalary.floatValue() < 0.0)
              return MessageUtil.getString("salary_must_be_greator_than_zero"); // $NON-NLS-1$
            return null;
          }
        });
    propertyDescriptor.setCategory(P_PERSONELINFO);
    descriptors.addElement(propertyDescriptor);

    /// HairColor
    propertyDescriptor = new ColorPropertyDescriptor(P_ID_HAIRCOLOR, P_HAIRCOLOR);
    propertyDescriptor.setCategory(P_PERSONALINFO);
    propertyDescriptor.setHelpContextIds(HAIR_COLOR__CONTEXT);
    descriptors.addElement(propertyDescriptor);

    /// EyeColor
    propertyDescriptor = new ColorPropertyDescriptor(P_ID_EYECOLOR, P_EYECOLOR);
    propertyDescriptor.setCategory(P_PERSONALINFO);
    propertyDescriptor.setHelpContextIds(EYE_COLOR_CONTEXT);
    descriptors.addElement(propertyDescriptor);

    // gets descriptors from parent, warning name-space collision may occur
    Vector parentDescriptors = OrganizationElement.getDescriptors();
    for (int i = 0; i < parentDescriptors.size(); i++) {
      descriptors.addElement(parentDescriptors.elementAt(i));
    }
  }
  /** {@inheritDoc} */
  protected void initPropDescriptor() {
    if (!getPropertyDescriptorList().isEmpty()) {
      clearPropertyDescriptors();
    }

    // TestCase Name
    if (m_namePropDesc == null) {
      m_namePropDesc =
          new TextPropertyDescriptor(new ExecNameController(), P_REFERNCE_DISPLAY_NAME);
    }
    addPropertyDescriptor(m_namePropDesc);

    // Specification Name
    if (m_specNamePropDesc == null) {
      JBPropertyDescriptor propDes =
          new JBPropertyDescriptor(new SpecNameController(), P_SPECNAME_DISPLAY_NAME);
      propDes.setLabelProvider(new DisabledLabelProvider());
      m_specNamePropDesc = propDes;
    }
    addPropertyDescriptor(m_specNamePropDesc);

    // Comment
    if (m_commentPropDesc == null) {
      m_commentPropDesc =
          new TextPropertyDescriptor(new CommentController(), P_ELEMENT_DISPLAY_COMMENT);
    }
    addPropertyDescriptor(m_commentPropDesc);

    // Data Source
    addPropertyDescriptor(
        getDataSourcePropertyDescr(new ExecTestCaseTestDataSourceController(this)));

    // External data file
    if (m_extDataPropDesc == null) {
      m_extDataPropDesc =
          new TextPropertyDescriptor(new ExternalDataController(this), P_ELEMENT_DISPLAY_DATEFILE);
      m_extDataPropDesc.setCategory(P_TESTDATA_CAT);
    }
    addPropertyDescriptor(m_extDataPropDesc);

    // Referenced Test Data Cube
    if (m_referencedCubePropDesc == null) {
      IProjectPO activeProject = GeneralStorage.getInstance().getProject();
      IContentProposalProvider dataCubeRefProposalProvider = null;
      IValidator dataCubeRefValidator = null;

      if (activeProject != null) {
        dataCubeRefProposalProvider =
            new TestDataCubeRefContentProposalProvider(
                activeProject, (IParameterInterfacePO) getPoNode());
        dataCubeRefValidator = new TestDataCubeReferenceValidator(activeProject);
      }

      m_referencedCubePropDesc =
          new ContentAssistedTextPropertyDescriptor(
              new ReferenceTestDataController(this),
              P_ELEMENT_DISPLAY_REFDATA,
              dataCubeRefProposalProvider,
              dataCubeRefValidator,
              ContentProposalAdapter.PROPOSAL_REPLACE);
      m_referencedCubePropDesc.setCategory(P_TESTDATA_CAT);
    }
    addPropertyDescriptor(m_referencedCubePropDesc);

    // Parameters
    addPropertyDescriptor(createParamDescriptors());
  }
  /** Provides property descriptors for each portion of the Patient object. */
  public IPropertyDescriptor[] getPropertyDescriptors() {
    // TextPropertyDescriptors are selectable even if not editable
    // so use PropertyDescriptors for properties that I do not want
    // the user to be able to pretend to edit.
    // As of April 2008 this is everything because I do not want
    // user to edit patients via the property view.

    if (propertyDescriptors == null) {
      PropertyDescriptor nameDescriptor = new PropertyDescriptor(PROPERTY_NAME, "Full name:");
      nameDescriptor.setCategory("1. Patient Name");
      nameDescriptor.setDescription("Full name of the patient");
      PropertyDescriptor firstDescriptor =
          new PropertyDescriptor(PROPERTY_FIRST_NAME, "First name:");
      firstDescriptor.setCategory("1. Patient Name");
      firstDescriptor.setDescription("First name of the patient");
      PropertyDescriptor lastDescriptor = new PropertyDescriptor(PROPERTY_LAST_NAME, "Last name:");
      lastDescriptor.setCategory("1. Patient Name");
      lastDescriptor.setDescription("Last name of the patient");
      PropertyDescriptor birthDescriptor = new PropertyDescriptor(PROPERTY_BIRTHDATE, "Birthdate:");
      birthDescriptor.setCategory("2. Parameters");
      birthDescriptor.setDescription("Date of birth of the patient");
      PropertyDescriptor mrnDescriptor = new PropertyDescriptor(PROPERTY_MED_REC_NUM, "MRN:");
      mrnDescriptor.setCategory("3. Identifiers");
      mrnDescriptor.setDescription("Medical record number of the patient");
      PropertyDescriptor trialDBDescriptor = new PropertyDescriptor(PROPERTY_TRIALDB, "TrialDB #:");
      trialDBDescriptor.setCategory("3. Identifiers");
      trialDBDescriptor.setDescription("TrialDB number of the patient");
      PropertyDescriptor heightDescriptor = new PropertyDescriptor(PROPERTY_HEIGHT, "Height (cm):");
      heightDescriptor.setCategory("2. Parameters");
      heightDescriptor.setDescription("Height of the patient in centimeters");
      PropertyDescriptor weightDescriptor = new PropertyDescriptor(PROPERTY_WEIGHT, "Weight (kg):");
      weightDescriptor.setCategory("2. Parameters");
      weightDescriptor.setDescription("Weight of the patient in kilograms");
      PropertyDescriptor genderDescriptor = new PropertyDescriptor(PROPERTY_GENDER, "Gender:");
      genderDescriptor.setCategory("2. Parameters");
      genderDescriptor.setDescription("Gender of the patient");
      propertyDescriptors =
          new IPropertyDescriptor[] {
            nameDescriptor,
            firstDescriptor,
            lastDescriptor,
            birthDescriptor,
            mrnDescriptor,
            trialDBDescriptor,
            heightDescriptor,
            weightDescriptor,
            genderDescriptor
          };
    }
    return propertyDescriptors;
  }
  public IPropertyDescriptor[] getPropertyDescriptors() {
    try {
      systemConfig.load();
      userHomeConfig.load();
      repositoryConfig.load();
      effectiveConfig.load();
    } catch (IOException e) {
      showExceptionMessage(e);
    } catch (ConfigInvalidException e) {
      showExceptionMessage(e);
    }

    List<IPropertyDescriptor> resultList = new ArrayList<IPropertyDescriptor>();

    StoredConfig config;
    String category;
    String prefix;
    switch (getCurrentMode()) {
      case EFFECTIVE:
        prefix = EFFECTIVE_ID_PREFIX;
        category = UIText.RepositoryPropertySource_EffectiveConfigurationCategory;
        config = effectiveConfig;
        break;
      case REPO:
        {
          prefix = REPO_ID_PREFIX;
          String location = ""; // $NON-NLS-1$
          if (repositoryConfig instanceof FileBasedConfig) {
            location = ((FileBasedConfig) repositoryConfig).getFile().getAbsolutePath();
          }
          category =
              NLS.bind(UIText.RepositoryPropertySource_RepositoryConfigurationCategory, location);
          config = repositoryConfig;
          break;
        }
      case USER:
        {
          prefix = USER_ID_PREFIX;
          String location = userHomeConfig.getFile().getAbsolutePath();
          category =
              NLS.bind(UIText.RepositoryPropertySource_GlobalConfigurationCategory, location);
          config = userHomeConfig;
          break;
        }
      case SYSTEM:
        {
          prefix = SYSTEM_ID_PREFIX;
          String location = systemConfig.getFile().getAbsolutePath();
          category =
              NLS.bind(UIText.RepositoryPropertySource_GlobalConfigurationCategory, location);
          config = systemConfig;
          break;
        }
      default:
        return new IPropertyDescriptor[0];
    }
    for (String key : config.getSections()) {
      for (String sectionItem : config.getNames(key)) {
        String sectionId = key + "." + sectionItem; // $NON-NLS-1$
        PropertyDescriptor desc = new PropertyDescriptor(prefix + sectionId, sectionId);
        desc.setCategory(category);
        resultList.add(desc);
      }
      for (String sub : config.getSubsections(key)) {
        for (String sectionItem : config.getNames(key, sub)) {
          String sectionId = key + "." + sub + "." + sectionItem; // $NON-NLS-1$ //$NON-NLS-2$
          PropertyDescriptor desc = new PropertyDescriptor(prefix + sectionId, sectionId);
          desc.setCategory(category);
          resultList.add(desc);
        }
      }
    }

    return resultList.toArray(new IPropertyDescriptor[0]);
  }