Package org.eclipse.text.edits

Examples of org.eclipse.text.edits.MultiTextEdit.addChildren()


        }

      IDocument document= new Document(buffer.getString());
        MultiTextEdit edit= new MultiTextEdit(0, document.getLength());
        edit.addChildren((TextEdit[]) positions.toArray(new TextEdit[positions.size()]));
        edit.addChildren((TextEdit[]) edits.toArray(new TextEdit[edits.size()]));
        edit.apply(document, TextEdit.UPDATE_REGIONS);

    positionsToVariables(positions, variables);
View Full Code Here


        }

      IDocument document= new Document(buffer.getString());
        MultiTextEdit edit= new MultiTextEdit(0, document.getLength());
        edit.addChildren((TextEdit[]) positions.toArray(new TextEdit[positions.size()]));
        edit.addChildren((TextEdit[]) edits.toArray(new TextEdit[edits.size()]));
        edit.apply(document, TextEdit.UPDATE_REGIONS);

    positionsToVariables(positions, variables);

        buffer.setContent(document.get(), variables);
View Full Code Here

      try {
        for (Iterator it= map.keySet().iterator(); it.hasNext();) {
          IDocument d= (IDocument) it.next();
          TextEdit edit= new MultiTextEdit(0, d.getLength());
          edit.addChildren((TextEdit[]) ((List) map.get(d)).toArray(new TextEdit[0]));
          map.put(d, edit);
        }

        return map;
      } catch (MalformedTreeException x) {
View Full Code Here

      MultiTextEdit multiEdit = new MultiTextEdit();
      NodeList nodes = document.getElementsByTagName("bean");
      for (int i = 0; i < nodes.getLength(); i++) {
        Set<TextEdit> edits = createConstructorTextEdits(nodes.item(i), affectedElement, newName, file);
        if (edits != null) {
          multiEdit.addChildren(edits.toArray(new TextEdit[edits.size()]));
        }
      }
      if (multiEdit.hasChildren()) {
        TextFileChange change = new TextFileChange("", file);
        change.setEdit(multiEdit);
View Full Code Here

      NodeList nodes = document.getElementsByTagName("bean");
      for (int j = 0; j < affectedElements.length; j++) {
        for (int i = 0; i < nodes.getLength(); i++) {
          Set<TextEdit> edits = createMethodTextEdits(nodes.item(i), affectedElements[j], newNames[j], file);
          if (edits != null) {
            multiEdit.addChildren(edits.toArray(new TextEdit[edits.size()]));
          }
        }
      }
      if (multiEdit.hasChildren()) {
        TextFileChange change = new TextFileChange("", file);
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.