Package org.cfeclipse.cfml.editors

Examples of org.cfeclipse.cfml.editors.ICFDocument.replace()


        StringBuffer currentIndent = XmlDocumentFormatter.getLeadingWhitespace(region.getOffset(), document);
        String formattedText = keyWordsToUpper(regionText);
        int lineOffset = document.getLineInformationOfOffset(region.getOffset()).getOffset();
        if (formattedText != null && !formattedText.equals(regionText)) {
          int newLength = region.getLength() + (region.getOffset() - lineOffset);
          document.replace(lineOffset, newLength, formattedText);
        }
      } catch (BadLocationException e) {
        e.printStackTrace();
      }
    } else {
View Full Code Here


        // Here is where we actually do the insertion

        if (thisEdit instanceof ITextEditor) {
          try {
            ICFDocument cfd = (ICFDocument) doc;
            cfd.replace(selection.getOffset(), selection.getLength(), tf.getTagStart());
          } catch (BadLocationException e) {
            e.printStackTrace();
          }
          thisEdit.setFocus();
        }
View Full Code Here

        }
        int lineOffset = document.getLineInformationOfOffset(region.getOffset()).getOffset();
        // String formattedText = format(regionText, "");
        if (formattedText != null && !formattedText.equals(regionText)) {
          int newLength = region.getLength() + (region.getOffset() - lineOffset);
          document.replace(lineOffset, newLength, formattedText);
          // ITextEditor editor =
          // (ITextEditor)CFMLPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
          // IDocument doc =
          // editor.getDocumentProvider().getDocument(editor.getEditorInput());
          // TextSelection selection = new TextSelection(doc,
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.