Add an entry to a POT file.

@param tag     The XML element name.
@param source  The original source string.
@param potFile The POT file to add to.
346830
protected void addPOTEntry(final String tag, final String source, final StringBuilder potFile) {
        addPOEntry(tag, source, "", false, potFile);
    }
394955
public void startElement(String tag, HashMap h)
    {
        if ( !foundRoot ) {
            if (!tag.equals("xfdf")) {
                throw new RuntimeException("Root element is not Bookmark.");
            }
            else { 
            	foundRoot = true;
            }
        }

        if ( tag.equals("xfdf") ){
    		
    	} else if ( tag.equals("f") ) {
    		fileSpec = (String)h.get( "href" );
    	} else if ( tag.equals("fields") ) {
            fields = new HashMap();		// init it!
            listFields = new HashMap();
    	} else if ( tag.equals("field") ) {
    		String	fName = (String) h.get( "name" );
    		fieldNames.push( fName );
    	} else if ( tag.equals("value") ) {
    		fieldValues.push( "" );
    	}
    }
88763
public void writeTag(Tag<?> tag) throws IOException {
        String name = tag.getName();
        byte[] nameBytes = name.getBytes(NBTConstants.CHARSET.name());

        os.writeByte(tag.getType().getId());
        os.writeShort(nameBytes.length);
        os.write(nameBytes);

        if (tag.getType() == TagType.TAG_END) {
            throw new IOException("Named TAG_End not permitted.");
        }

        writeTagPayload(tag);
    }
996209
private void writeTagValue(TagValue tag) throws IOException {
    int id = tag.getId();

    // Write tag value
    for (abstractTiffType tt : tag.getValue()) {
      if (id == 700) {
        // XMP
        XMP xmp = (XMP)tt;
        try {
          xmp.write(data);
        }catch (Exception ex) {
          XmlType xml = (XmlType)tt;
          try {
            xml.writeXml(data);
          } catch (Exception exx) {
            exx.printStackTrace();
            throw new IOException();
          }
        }
      } else if (id == 33723) {
        // IPTC
        abstractTiffType att = tag.getValue().get(0);
        if (att instanceof IPTC) {
          IPTC iptc = (IPTC) att;
          iptc.write(data);
          //for (int i = 0; i < iptc.getOriginal().size(); i++) data.put(iptc.getOriginal().get(i).toByte());
          //data.put((byte) 0);
        } else {
          for (int i = 0; i < tag.getValue().size(); i++) {
            data.put(tag.getValue().get(i).toByte());
          }
          data.put((byte) 0);
        }
      } else if (id == 330) {
        // SubIFD
        IFD subifd = ((IFD) tag.getValue().get(0));
        writeIFD(subifd);
      } else if (id == 34665) {
        // EXIF
        IFD exif = (IFD) tag.getValue().get(0);
        writeIFD(exif);
      } else if (id == 34675) {
        // ICC
        for (int off = tag.getReadOffset(); off < tag.getReadOffset() + tag.getReadlength(); off++) {
          data.put(input.readByte(off).toByte());
        }
        data.put((byte) 0);
      } else {
        switch (tag.getType()) {
          case 3:
            data.putShort((short) tt.toInt());
            break;
          case 8:
            data.putSShort((SShort) tt);
            break;
          case 4:
            data.putLong((Long) tt);
            break;
          case 9:
            data.putSLong((SLong) tt);
            break;
          case 11:
            data.putFloat((Float) tt);
            break;
          case 13:
            data.putInt(tt.toInt());
            break;
          case 5:
            data.putRational((Rational) tt);
            break;
          case 10:
            data.putSRational((SRational) tt);
            break;
          case 12:
            data.putDouble((Double) tt);
            break;
          case 2:
            data.put(tt.toByte());
            break;
          default:
            data.put(tt.toByte());
            break;
        }
      }
    }
  }
951784
public void addEntry(File srcFile, File destFile) {
        entries.add(new Entry(srcFile,destFile));
    }
1001753
public void addFile(String sourceFolder, String name, ClassLoaderFile file) {
		Assert.notNull(sourceFolder, "SourceFolder must not be null");
		Assert.notNull(name, "Name must not be null");
		Assert.notNull(file, "File must not be null");
		removeAll(name);
		getOrCreateSourceFolder(sourceFolder).add(name, file);
	}
1273888
public void setTag(String tagName, long tagValue) {
    tagTable.put(tagName, Long.valueOf(tagValue));
  }
53047
protected void addJavadocTag(JavaElement javaElement, boolean markAsDoNotDelete) {
        StringBuilder sb = new StringBuilder();
        sb.append(" * ");
        sb.append(MergeConstants.NEW_ELEMENT_TAG);
        if (markAsDoNotDelete) {
            sb.append(" do_not_delete_during_merge");
        }
        javaElement.addJavaDocLine(sb.toString());
    }
823476
public Input addFileField(String tag, 
                              String label)
    {
        Input i = new Input(Input.File,tag);
        addField(label,i);
        return i;
    }
434969
protected function insertTag(Tag $tag)
	{
		if (!$this->tagStackIsSorted)
		{
			$this->tagStack[] = $tag;
		}
		else
		{
			// Scan the stack and copy every tag to the next slot until we find the correct index
			$i = count($this->tagStack);
			while ($i > 0 && self::compareTags($this->tagStack[$i - 1], $tag) > 0)
			{
				$this->tagStack[$i] = $this->tagStack[$i - 1];
				--$i;
			}
			$this->tagStack[$i] = $tag;
		}
	}
1103189
function (sourceBuffer, aNode, tagNameVariable) {
        var props = aNode.props;
        var bindDirective = aNode.directives.bind;
        var tagName = aNode.tagName;

        if (tagName) {
            sourceBuffer.joinString('<' + tagName);
        }
        else if (tagNameVariable) {
            sourceBuffer.joinString('<');
            sourceBuffer.joinRaw(tagNameVariable + ' || "div"');
        }
        else {
            sourceBuffer.joinString('<div');
        }

        // index list
        var propsIndex = {};
        each(props, function (prop) {
            propsIndex[prop.name] = prop;

            if (prop.name !== 'slot' && prop.expr.value != null) {
                sourceBuffer.joinString(' ' + prop.name + '="' + prop.expr.segs[0].literal + '"');
            }
        });

        each(props, function (prop) {
            if (prop.name === 'slot' || prop.expr.value != null) {
                return;
            }

            if (prop.name === 'value') {
                switch (tagName) {
                    case 'textarea':
                        return;

                    case 'select':
                        sourceBuffer.addRaw('$selectValue = '
                            + compileExprSource.expr(prop.expr)
                            + ' || "";'
                        );
                        return;

                    case 'option':
                        sourceBuffer.addRaw('$optionValue = '
                            + compileExprSource.expr(prop.expr)
                            + ';'
                        );
                        // value
                        sourceBuffer.addRaw('if ($optionValue != null) {');
                        sourceBuffer.joinRaw('" value=\\"" + $optionValue + "\\""');
                        sourceBuffer.addRaw('}');

                        // selected
                        sourceBuffer.addRaw('if ($optionValue === $selectValue) {');
                        sourceBuffer.joinString(' selected');
                        sourceBuffer.addRaw('}');
                        return;
                }
            }

            switch (prop.name) {
                case 'readonly':
                case 'disabled':
                case 'multiple':
                    if (prop.raw === '') {
                        sourceBuffer.joinString(' ' + prop.name);
                    }
                    else {
                        sourceBuffer.joinRaw('boolAttrFilter("' + prop.name + '", '
                            + compileExprSource.expr(prop.expr)
                            + ')'
                        );
                    }
                    break;

                case 'checked':
                    if (tagName === 'input') {
                        var valueProp = propsIndex.value;
                        var valueCode = compileExprSource.expr(valueProp.expr);

                        if (valueProp) {
                            switch (propsIndex.type.raw) {
                                case 'checkbox':
                                    sourceBuffer.addRaw('if (contains('
                                        + compileExprSource.expr(prop.expr)
                                        + ', '
                                        + valueCode
                                        + ')) {'
                                    );
                                    sourceBuffer.joinString(' checked');
                                    sourceBuffer.addRaw('}');
                                    break;

                                case 'radio':
                                    sourceBuffer.addRaw('if ('
                                        + compileExprSource.expr(prop.expr)
                                        + ' === '
                                        + valueCode
                                        + ') {'
                                    );
                                    sourceBuffer.joinString(' checked');
                                    sourceBuffer.addRaw('}');
                                    break;
                            }
                        }
                    }
                    break;

                default:
                    var onlyOneAccessor = false;
                    var preCondExpr;

                    if (prop.expr.type === ExprType.ACCESSOR) {
                        onlyOneAccessor = true;
                        preCondExpr = prop.expr;
                    }
                    else if (prop.expr.segs.length === 1) {
                        var interpExpr = prop.expr.segs[0];
                        var interpFilters = interpExpr.filters;

                        if (!interpFilters.length
                            || interpFilters.length === 1 && interpFilters[0].args.length === 0
                        ) {
                            onlyOneAccessor = true;
                            preCondExpr = prop.expr.segs[0].expr;
                        }
                    }

                    if (onlyOneAccessor) {
                        sourceBuffer.addRaw('if (' + compileExprSource.expr(preCondExpr) + ') {');
                    }

                    sourceBuffer.joinRaw('attrFilter("' + prop.name + '", '
                        + (prop.x ? 'escapeHTML(' : '')
                        + compileExprSource.expr(prop.expr)
                        + (prop.x ? ')' : '')
                        + ')'
                    );

                    if (onlyOneAccessor) {
                        sourceBuffer.addRaw('}');
                    }

                    break;
            }
        });

        if (bindDirective) {
            sourceBuffer.addRaw(
                '(function ($bindObj) {for (var $key in $bindObj) {'
                + 'var $value = $bindObj[$key];'
            );

            if (tagName === 'textarea') {
                sourceBuffer.addRaw(
                    'if ($key === "value") {'
                    + 'continue;'
                    + '}'
                );
            }

            sourceBuffer.addRaw('switch ($key) {\n'
                + 'case "readonly":\n'
                + 'case "disabled":\n'
                + 'case "multiple":\n'
                + 'case "multiple":\n'
                + 'html += boolAttrFilter($key, escapeHTML($value));\n'
                + 'break;\n'
                + 'default:\n'
                + 'html += attrFilter($key, escapeHTML($value));'
                + '}'
            );

            sourceBuffer.addRaw(
                '}})('
                + compileExprSource.expr(bindDirective.value)
                + ');'
            );
        }

        sourceBuffer.joinString('>');
    }
224616
public void add(TagLibTag libTag, Tag tag, FunctionLib[] flibs, SourceCode cfml) {
	tags.add(new TagData(libTag, tag, flibs, cfml));
    }
915
public void addHeaderEntry( final Tag tag, final String value) {
	    format.getHeader().createEntry(tag, value);
	}
885440
public void buildTagInfo(XMLNode node, Content propertyDocTree) {
        writer.addTags((MethodDoc) properties.get(currentPropertyIndex), propertyDocTree);
    }
733665
protected void updateFileSet(FileSet value, String xmlTag, Counter counter, Element element)
   {
      boolean shouldExist = value != null;
      Element root = updateElement(counter, element, xmlTag, shouldExist);
      if (shouldExist)
      {
         Counter innerCount = new Counter(counter.getDepth() + 1);
         findAndReplaceSimpleElement(innerCount, root, "directory", value.getDirectory(), null);
         findAndReplaceSimpleLists(innerCount, root, value.getIncludes(), "includes", "include");
         findAndReplaceSimpleLists(innerCount, root, value.getExcludes(), "excludes", "exclude");
      }
   }
667252
public <T extends MvpPresenter> void add(String tag, T instance) {
		mPresenters.put(tag, instance);
	}
1307830
@SuppressWarnings("unchecked")
    public <T extends WebLocatorAbstractBuilder> T setTag(final String tag) {
        pathBuilder.setTag(tag);
        return (T) this;
    }