Examples of FieldItem


Examples of edu.hawaii.ics.csdl.jupiter.file.FieldItem

   * Updates the filter item folder.
   *
   * @param fieldItemId the field item id.
   */
  private void updateFilterItems(String fieldItemId) {
    FieldItem fieldItem = this.fieldItemIdFieldItemMap.get(fieldItemId);
    if (fieldItem != null) {
      List<String> itemNameList = fieldItem.getEntryNameList();
      if (fieldItemId.equals(PropertyConstraints.ATTRIBUTE_VALUE_TYPE)) {
        String currentType = this.typeFilterCombo.getText();
        this.typeFilterCombo.setItems(itemNameList.toArray(new String[] {}));
        this.typeFilterCombo.setText(currentType);
      }
View Full Code Here

Examples of edu.hawaii.ics.csdl.jupiter.file.FieldItem

   * Updates the default items folder.
   *
   * @param fieldItemId the field item id.
   */
  private void updateDefaultItems(String fieldItemId) {
    FieldItem fieldItem = this.fieldItemIdFieldItemMap.get(fieldItemId);
    if (fieldItem != null) {
      List<String> itemNameList = fieldItem.getEntryNameList();
      if (fieldItemId.equals(PropertyConstraints.ATTRIBUTE_VALUE_TYPE)) {
        String currentType = this.defaultTypeCombo.getText();
        this.defaultTypeCombo.setItems(itemNameList.toArray(new String[] {}));
        this.defaultTypeCombo.setText(currentType);
      }
View Full Code Here

Examples of edu.hawaii.ics.csdl.jupiter.file.FieldItem

   *
   * @param fieldItemId the field item id.
   */
  private void fillItemTable(String fieldItemId) {
    removeAllItemsInItemListTable();
    FieldItem fieldItem = this.fieldItemIdFieldItemMap.get(fieldItemId);
    if (fieldItem != null) {
      for (Iterator<String> i = fieldItem.getEntryNameList().iterator(); i.hasNext();) {
        String itemEntry = ReviewI18n.getString(i.next());
        TableItem item = new TableItem(this.itemListTable, SWT.NONE);
        item.setText(itemEntry);
      }
    }
View Full Code Here

Examples of edu.hawaii.ics.csdl.jupiter.file.property.FieldItem

   
    String id = reader.getAttributeValue(null, PropertyConstraints.ATTRIBUTE_ID);
    String defaultValue = reader
        .getAttributeValue(null, PropertyConstraints.ATTRIBUTE_DEFAULT);

    FieldItem fieldItem = new FieldItem();
    fieldItem.setId(id);
    fieldItem.setDefault(defaultValue);

    boolean endFound = false;

    while (!endFound) {
      if (reader.hasNext()) {
        int eventType = reader.next();

        if (eventType == XMLStreamConstants.START_ELEMENT) {
          QName elementQName = reader.getName();
          String elementName = elementQName.toString();

          if (PropertyConstraints.ELEMENT_ENTRY.equals(elementName)) {
            // this is an entry for field item
            String name = reader.getAttributeValue(null, PropertyConstraints.ATTRIBUTE_NAME);

            FieldItem.Entry entry = new FieldItem.Entry();
            entry.setName(name);

            fieldItem.getEntry().add(entry);
          }
        }
        else if (eventType == XMLStreamConstants.END_ELEMENT) {
          QName elementQName = reader.getName();
View Full Code Here

Examples of edu.hawaii.ics.csdl.jupiter.file.property.FieldItem

    FieldItems fieldItems = review.getFieldItems();
    if (fieldItems != null) {
      FieldItems copiedFieldItems = new FieldItems();
      List<FieldItem> fieldItemList = fieldItems.getFieldItem();
      for (FieldItem fieldItem : fieldItemList) {
        FieldItem copiedFieldItem = new FieldItem();
        copiedFieldItem.setDefault(fieldItem.getDefault());
        copiedFieldItem.setId(fieldItem.getId());

        List<FieldItem.Entry> entryList = fieldItem.getEntry();
        for (FieldItem.Entry entry : entryList) {
          FieldItem.Entry copiedFieldItemEntry = new FieldItem.Entry();
          copiedFieldItemEntry.setName(entry.getName());
          copiedFieldItem.getEntry().add(copiedFieldItemEntry);
        }
        copiedFieldItems.getFieldItem().add(copiedFieldItem);
      }
      copiedReview.setFieldItems(copiedFieldItems);
    }
View Full Code Here

Examples of etch.compiler.opt.ToString.FieldItem

    if (!isExcept)
      fmts.add( new StringItem( name().name+"(" ) );

    if (hasExtends)
    {
      fmts.add( new FieldItem( isExcept ? "super.getMessage()" : "super.toString()" ) );
      fmts.add( new StringItem( "; " ) );
    }
   
    boolean first = true;
    for (Parameter p: list)
    {
      if (first)
      {
        first = false;
        fmts.add( new StringItem( p.name().name+"=" ) );
      }
      else
      {
        fmts.add( new StringItem( "; "+p.name().name+"=" ) );
      }
      fmts.add( new FieldItem( p.name().name ) );
    }
   
    if (!isExcept)
      fmts.add( new StringItem( ")" ) );
View Full Code Here

Examples of etch.compiler.opt.ToString.FieldItem

  {
    for (FmtItem i: fmts)
    {
      if (i instanceof FieldItem)
      {
        FieldItem fi = (FieldItem) i;
        if (!hasParameter( fi.value() ))
          throw new ParseException( String.format(
            "ToString: format list specifies parameter (%s) which does not exist at line %d",
            fi.value(), lineno ) );
      }
    }
  }
View Full Code Here

Examples of etch.compiler.opt.ToString.FieldItem

    for(int i=0;i<list.size();i++) {
      FmtItem item = list.get( i );

      if (item.value().contains( "super.getMessage()" )) {
        list.remove( i );
        list.add(i, new FieldItem"base.GetMessage()" ) );
      }
      if (item.value().contains( "super.toString()" )) {
        list.remove( i );
        list.add(i, new FieldItem"base.ToString()" ) );
      }
    }
  }
View Full Code Here

Examples of etch.compiler.opt.ToString.FieldItem

    for(int i=0;i<list.size();i++) {
      FmtItem item = list.get( i );

      if (item.value().contains( "super.getMessage()" )) {
        list.remove( i );
        list.add(i, new FieldItem"base.GetMessage()" ) );
      }
      if (item.value().contains( "super.toString()" )) {
        list.remove( i );
        list.add(i, new FieldItem"base.ToString()" ) );
      }
    }
  }
View Full Code Here

Examples of etch.compiler.opt.ToString.FieldItem

    if (!isExcept)
      fmts.add( new StringItem( name().name+"(" ) );

    if (hasExtends)
    {
      fmts.add( new FieldItem( isExcept ? "super.getMessage()" : "super.toString()" ) );
      fmts.add( new StringItem( "; " ) );
    }
   
    boolean first = true;
    for (Parameter p: list)
    {
      if (first)
      {
        first = false;
        fmts.add( new StringItem( p.name().name+"=" ) );
      }
      else
      {
        fmts.add( new StringItem( "; "+p.name().name+"=" ) );
      }
      fmts.add( new FieldItem( p.name().name ) );
    }
   
    if (!isExcept)
      fmts.add( new StringItem( ")" ) );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.