Package org.eclipse.jface.text

Examples of org.eclipse.jface.text.FindReplaceDocumentAdapter.replace()


        final String template = codeTemplate.get(htmlSnippet);
        if (template == null) {
          return;
        }
        String replace = (superRegion != null ? ";" : "{") + lineDelimiter + "add(new " + template + "(\"" + wicketId + "\"));";
        frda.replace(replace, false);
        marker.delete();
      }
    } catch (Exception e) {
    }
  }
View Full Code Here


         
          FindReplaceDocumentAdapter finder = new FindReplaceDocumentAdapter(doc);
         
          // Find and replace the closing comment first so that it doesn't get messed up with positions
          finder.find(closeCommentStart, closeComment, true, false, false, false);
          finder.replace("", false);
         
          // Find and replace the opening comment so that it doesn't affect the closing comment replace
          finder.find(openCommentStart, openComment, true, false, false, false);
          finder.replace("", false);
          selectionLength = selection.length() - openComment.length() - closeComment.length() + 1;
View Full Code Here

          finder.find(closeCommentStart, closeComment, true, false, false, false);
          finder.replace("", false);
         
          // Find and replace the opening comment so that it doesn't affect the closing comment replace
          finder.find(openCommentStart, openComment, true, false, false, false);
          finder.replace("", false);
          selectionLength = selection.length() - openComment.length() - closeComment.length() + 1;
        } else {
          if(selectioner.getText().endsWith("\n") && !selectioner.getText().startsWith("\n")){           
            // add newlines if this looks like a newline-to-newline comment, to be pretty
            openComment = openComment.concat("\n");
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.