Search in sources :

Example 1 with DocumentChangeListenerToTextEdit

use of org.eclipse.wst.jsdt.web.core.javascript.DocumentChangeListenerToTextEdit in project webtools.sourceediting by eclipse.

the class AddJavaDocStubOperation method getJavaDocumentFromNode.

protected IDocument getJavaDocumentFromNode() {
    if (copy == null) {
        IJsTranslation tran = node.getTranslation();
        copy = new Document(tran.getJsText());
        textEditListener = new DocumentChangeListenerToTextEdit();
        copy.addDocumentListener(textEditListener);
    }
    return copy;
}
Also used : IJsTranslation(org.eclipse.wst.jsdt.web.core.javascript.IJsTranslation) DocumentChangeListenerToTextEdit(org.eclipse.wst.jsdt.web.core.javascript.DocumentChangeListenerToTextEdit) Document(org.eclipse.jface.text.Document) IDocument(org.eclipse.jface.text.IDocument) IStructuredDocument(org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument)

Aggregations

Document (org.eclipse.jface.text.Document)1 IDocument (org.eclipse.jface.text.IDocument)1 DocumentChangeListenerToTextEdit (org.eclipse.wst.jsdt.web.core.javascript.DocumentChangeListenerToTextEdit)1 IJsTranslation (org.eclipse.wst.jsdt.web.core.javascript.IJsTranslation)1 IStructuredDocument (org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument)1