Package org.eclipse.text.edits

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


              //found ident to change
              ReplaceEdit edit = new ReplaceEdit
                  identNode.getRegion().getOffset(),
                          identNode.getRegion().getLength(),
                          info.getNewName());     
              fileChangeRootEdit.addChild(edit);
              return false;
            }
          }
          return true;
        }
View Full Code Here


              //found token-ident to change
              ReplaceEdit edit = new ReplaceEdit
                  offset,
                  info.getOldName().length(),
                          info.getNewName());     
              fileChangeRootEdit.addChild(edit);                         
            }
          }
          return super.visit(node);
        }
      };
View Full Code Here

              //found ident to change
              ReplaceEdit edit = new ReplaceEdit
                  identNode.getRegion().getOffset(),
                          identNode.getRegion().getLength(),
                          info.getNewName());     
              fileChangeRootEdit.addChild(edit);
              return false;
            }
          }
          return true;
        }
View Full Code Here

              //found token-ident to change
              ReplaceEdit edit = new ReplaceEdit
                  offset,
                  oldJavaName.length(),
                          newJavaName);     
              fileChangeRootEdit.addChild(edit);                         
            }
          }
          return super.visit(node);
        }
      };
View Full Code Here

              //found ident to change
              ReplaceEdit edit = new ReplaceEdit
                  identNode.getRegion().getOffset(),
                          identNode.getRegion().getLength(),
                          info.getNewName());     
              fileChangeRootEdit.addChild(edit);
              return false;
            }
          }
          return true;
        }
View Full Code Here

    try {
      final MultiTextEdit edit = new MultiTextEdit();
      final TextEdit astEdit = astRewrite.rewriteAST();

      if (!this.isEmptyEdit(astEdit))
        edit.addChild(astEdit);
      final TextEdit importEdit = importRewrite
          .rewriteImports(new NullProgressMonitor());
      if (!this.isEmptyEdit(importEdit))
        edit.addChild(importEdit);
      if (this.isEmptyEdit(edit))
View Full Code Here

      if (!this.isEmptyEdit(astEdit))
        edit.addChild(astEdit);
      final TextEdit importEdit = importRewrite
          .rewriteImports(new NullProgressMonitor());
      if (!this.isEmptyEdit(importEdit))
        edit.addChild(importEdit);
      if (this.isEmptyEdit(edit))
        return;

      TextFileChange change = (TextFileChange) this.changes.get(unit);
      if (change == null) {
View Full Code Here

            TextFileChange change = new TextFileChange(drlFile.getName(), drlFile);
            MultiTextEdit mte = new MultiTextEdit();
            change.setEdit(mte);
            while (matcher.find()) {
                ReplaceEdit replace = new ReplaceEdit(matcher.start(), currentName.length(), newName);
                mte.addChild(replace);
            }
            if (change.getEdit().getChildrenSize() > 0)
                changes.add(change);
        }
        if (changes.getChildren().length==0)
View Full Code Here

      // TODO: format the who file in iteration 0 ;-)
   
      int textOffset = 0;
      int textLength = source.length();
      MultiTextEdit textEdit = new MultiTextEdit(textOffset, textLength);
      textEdit
          .addChild(new ReplaceEdit(textOffset, textLength, target));
      //     
      // File tempFile = File.createTempFile("indent", null);
      // //$NON-NLS-1$
      // FileOutputStream ostream = new FileOutputStream(tempFile);
View Full Code Here

              "Rename artifactId's value", newFile,
              deploymentPlanFile);
          MultiTextEdit rootEdit1 = new MultiTextEdit();
          ReplaceEdit edit1 = new ReplaceEdit(offset1, oldName1
              .length(), "/" + newName);
          rootEdit1.addChild(edit1);
          change1.setEdit(rootEdit1);
          result.add(change1);
        }
      }
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.