Package org.epic.perleditor.templates.ui

Examples of org.epic.perleditor.templates.ui.LinkedPositionManager$Replace


      // make sure line delimiters match to what's supposed to be used in the document.
      templateString = templateString.replaceAll("\\r\\n|\\r|\\n", TextUtilities.getDefaultLineDelimiter(document));
      document.replace(start, end - start, templateString)

      // translate positions
      LinkedPositionManager manager = new LinkedPositionManager(document);
      TemplatePosition[] variables = templateBuffer.getVariables();
      for (int i = 0; i < variables.length; i++)
            {
        TemplatePosition variable = variables[i];

        if (variable.isResolved()) continue;

        int[] offsets = variable.getOffsets();
        int length = variable.getLength();

        for (int j = 0; j < offsets.length; j++)
          manager.addPosition(offsets[j] + start, length);
      }

      LinkedPositionUI editor = new LinkedPositionUI(viewer, manager);
      editor.setFinalCaretOffset(getCaretOffset(templateBuffer) + start);
      editor.enter();
View Full Code Here


    // insert template string
  //  String templateString = fTemplate; // fTemplateBuffer.getString(); 
    document.replace(start, end - start, fTemplate);

    // translate positions
    LinkedPositionManager manager = new LinkedPositionManager(document);
    //      TemplatePosition[] variables= fTemplateBuffer.getVariables();
    //      for (int i= 0; i != variables.length; i++) {
    //        TemplatePosition variable= variables[i];
    //
    //        if (variable.isResolved())
View Full Code Here

      // insert template string
    //  String templateString = fTemplate; // fTemplateBuffer.getString(); 
      document.replace(start, end - start, fTemplate);

      // translate positions
      LinkedPositionManager manager = new LinkedPositionManager(document);
      //      TemplatePosition[] variables= fTemplateBuffer.getVariables();
      //      for (int i= 0; i != variables.length; i++) {
      //        TemplatePosition variable= variables[i];
      //
      //        if (variable.isResolved())
View Full Code Here

     
      int start = documentOffset - len;
     
      try {
        document.replace(start, len, replacementText);
        LinkedPositionManager manager = new LinkedPositionManager(document);
        LinkedPositionUI editor = new LinkedPositionUI(fViewer, manager);
        editor.setFinalCaretOffset(replacementText.length() + start);
        editor.enter();
       
      } catch (BadLocationException e) {
View Full Code Here

TOP

Related Classes of org.epic.perleditor.templates.ui.LinkedPositionManager$Replace

Copyright © 2018 www.massapicom. 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.