Exemplo n.º 1
0
  public void writeNode(final Writer out, final String nodeName, final String indent)
      throws IOException {
    out.write(indent);
    out.write(Frame2Plugin.getString("Frame2Model.tagStart")); // $NON-NLS-1$
    out.write(nodeName);
    out.write(Frame2Plugin.getString("Frame2Model.tagFinish")); // $NON-NLS-1$
    final String nextIndent =
        indent + Frame2Plugin.getString("Frame2Model.indentTabValue"); // $NON-NLS-1$
    if (this.httpRequestProcessor != null) {
      this.httpRequestProcessor.writeNode(
          out,
          Frame2Plugin.getString("Frame2Model.http-request-processor"), // $NON-NLS-1$
          nextIndent);
    }
    if (this.soapRequestProcessor != null) {
      this.soapRequestProcessor.writeNode(
          out,
          Frame2Plugin.getString("Frame2Model.soap-request-processor"), // $NON-NLS-1$
          nextIndent);
    }

    writeRemainingComments(out, indent);
    out.write(indent);
    out.write(
        Frame2Plugin.getString("Frame2Model.endTagStart")
            + nodeName
            + Frame2Plugin.getString("Frame2Model.tagFinish")); // $NON-NLS-1$ //$NON-NLS-2$
  }
Exemplo n.º 2
0
 public void readNode(final Node node) {
   final NodeList children = node.getChildNodes();
   for (int i = 0, size = children.getLength(); i < size; ++i) {
     final Node childNode = children.item(i);
     final String childNodeName =
         (childNode.getLocalName() == null
             ? childNode.getNodeName().intern()
             : childNode.getLocalName().intern());
     if (childNodeName.equals(
         Frame2Plugin.getString("Frame2Model.http-request-processor"))) { // $NON-NLS-1$
       this.httpRequestProcessor = new HttpRequestProcessor();
       this.httpRequestProcessor.readNode(childNode);
     } else if (childNodeName.equals(
         Frame2Plugin.getString("Frame2Model.soap-request-processor"))) { // $NON-NLS-1$
       this.soapRequestProcessor = new SoapRequestProcessor();
       this.soapRequestProcessor.readNode(childNode);
     } else {
       // Found extra unrecognized childNode
       if (childNodeName.equals(Frame2Plugin.getString("Frame2Model.comment"))) { // $NON-NLS-1$
         recordComment(childNode, i);
       }
     }
   }
 }