Examples of IDocumentAdapter


Examples of org.eclipse.jface.text.IDocumentAdapter

        PHPStructuredEditor phpEditor = (PHPStructuredEditor) editor;
        boolean isDirty = phpEditor.isDirty();
        if (phpEditor.getTextViewer() instanceof PHPStructuredTextViewer) {
          PHPStructuredTextViewer textViewer = (PHPStructuredTextViewer) phpEditor
              .getTextViewer();
          IDocumentAdapter documentAdapter = textViewer
              .getDocumentAdapter();
          IDocument document = phpEditor.getDocument();
          String content = document.get();
          if (documentAdapter != null) {
            documentAdapter.replaceTextRange(0, content.length(),
                ""); //$NON-NLS-1$
            documentAdapter.replaceTextRange(0, 0, content);
          }

        }
        if (!isDirty) {
          phpEditor.doSave(null);
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.