Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: javax/ide/model/text/TextDocument.java


1   package javax.ide.model.text;
2   
3   import java.io.IOException;
4   
5   import javax.ide.model.Document;
6   import javax.ide.model.spi.TextDocumentImpl;
7   
8   /**
9    *  The <CODE>TextDocument</CODE> class.
10   */
11  public class TextDocument extends Document 
12  {
13    private TextDocumentImpl getTextDocumentImpl()
14    {
15      return (TextDocumentImpl)getElementImpl();
16    }
17  
18    /**
19     * Fetches the document contents. This calls opens the document and loads 
20     * its contents. The document instance returned lives while clients refer
21     * to it. Once a document instance is not referred by clients it may be
22     * garbage collected at any time.
23     *
24     * @return the {@link TextModel} containing the document text.
25     * @exception IOException if the document cannot be opened.
26     */
27    public final TextModel getTextModel()
28      throws IOException
29    {
30      return getTextDocumentImpl().getTextModel();
31    }
32  }