Пример #1
0
 protected void okPressed() {
   UserPropertyDefn def = new UserPropertyDefn();
   def.setName(nameEditor.getText().trim());
   switch (style) {
     case USER_PROPERTY:
       def.setType(PROPERTY_TYPES[typeChooser.getSelectionIndex()]);
       break;
     case NAMED_EXPRESSION:
       def.setType(EXPRESSION_TYPE);
       def.setDefault(ExpressionButtonUtil.getExpression(defaultValueEditor));
       break;
   }
   setResult(def);
   super.okPressed();
 }
Пример #2
0
 static {
   List typeList = new ArrayList(UserPropertyDefn.getAllowedTypes());
   EXPRESSION_TYPE = DEUtil.getMetaDataDictionary().getPropertyType(PropertyType.EXPRESSION_TYPE);
   typeList.remove(EXPRESSION_TYPE);
   PROPERTY_TYPES = (PropertyType[]) typeList.toArray(new PropertyType[0]);
 }