Package org.eclipse.ui.texteditor

Examples of org.eclipse.ui.texteditor.IDocumentProvider.connect()


          IEditorInput editorInput = editorPart.getEditorInput();
          if (editorPart instanceof ITextEditor && lineNumber >= 0) {
            ITextEditor textEditor = (ITextEditor) editorPart;
            IDocumentProvider provider = textEditor
                .getDocumentProvider();
            provider.connect(editorInput);
            IDocument document = null;
            document = provider.getDocument(editorInput);
            try {
              IRegion line = document
                  .getLineInformation(lineNumber - 1);
View Full Code Here


    if (htmlDocument == null) {
      IFile htmlFile = cache.getHtmlEntry().getFile();
      if (htmlFile != null) {
        htmlInput = new FileEditorInput(cache.getHtmlEntry().getFile());
        htmlProvider = new TextFileDocumentProvider();
        htmlProvider.connect(htmlInput);
        htmlDocument = htmlProvider.getDocument(htmlInput);
        cache.getHtmlEntry().setDocument(htmlDocument);
      }
    }
    try {
View Full Code Here

      if (wodDocument == null) {
        IFile wodFile = cache.getWodEntry().getFile();
        if (wodFile != null) {
          wodInput = new FileEditorInput(cache.getWodEntry().getFile());
          wodProvider = new WodFileDocumentProvider();
          wodProvider.connect(wodInput);
          wodDocument = wodProvider.getDocument(wodInput);
          cache.getWodEntry().setDocument(wodDocument);
        }
      }
      try {
View Full Code Here

        IEditorPart editorPart = EditorUtility.openInEditor(sourceElement);
        if (editorPart instanceof ITextEditor && lineNumber >= 0) {
          ITextEditor textEditor = (ITextEditor) editorPart;
          IDocumentProvider provider = textEditor.getDocumentProvider();
          IEditorInput input = part.getEditorInput();
          provider.connect(input);
          IDocument document = provider.getDocument(input);
          try {
            IRegion line = document.getLineInformation(lineNumber);
            textEditor.selectAndReveal(line.getOffset(), line.getLength());
          } catch (BadLocationException e) {
View Full Code Here

    ITextEditor textEditor = getTextEditor(editor);
    if (textEditor != null && line > 0) {
      IDocumentProvider provider = textEditor.getDocumentProvider();
      IEditorInput input = editor.getEditorInput();
      try {
        provider.connect(input);
      }
      catch (CoreException e) {
        return;
      }
      IDocument document = provider.getDocument(input);
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.