| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (1.8.0_181) on Fri Sep 14 11:36:44 BST 2018 --> |
| <title>Overview (Text API)</title> |
| <meta name="date" content="2018-09-14"> |
| <link rel="stylesheet" type="text/css" href="javadoc.css" title="Style"> |
| <script type="text/javascript" src="script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="Overview (Text API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li class="navBarCell1Rev">Overview</li> |
| <li>Package</li> |
| <li>Class</li> |
| <li>Use</li> |
| <li><a href="overview-tree.html">Tree</a></li> |
| <li><a href="deprecated-list.html">Deprecated</a></li> |
| <li><a href="index-files/index-1.html">Index</a></li> |
| <li><a href="help-doc.html">Help</a></li> |
| </ul> |
| <div class="aboutLanguage">org.openide.text 6.69.1 </div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li>Prev</li> |
| <li>Next</li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="index.html?overview-summary.html" target="_top">Frames</a></li> |
| <li><a href="overview-summary.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <div class="header"> |
| <h1 class="title">Text API<br/><span style='font-style:normal; font-size:medium; font-weight:normal; background-color:#ffffff;'><a href='http://wiki.netbeans.org/API_Stability#Official' target='_blank'>Official</a></span></h1> |
| </div> |
| <div class="header"> |
| <p>See: <a href="#overview.description">Description</a></p> |
| </div> |
| <div class="contentContainer"> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="<a href="org/openide/text/doc-files/api.html">Text API</a> table, listing packages, and an explanation"> |
| <caption><span><a href="org/openide/text/doc-files/api.html">Text API</a></span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Package</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tbody> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="org/openide/cookies/package-summary.html">org.openide.cookies</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="org/openide/text/package-summary.html">org.openide.text</a></td> |
| <td class="colLast"> |
| <div class="block">NetBeans is able to integrate multiple |
| |
| <a href="org/openide/text/doc-files/api.html"><em>editors</em></a> |
| |
| for different content types and mechanically access their content.</div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="contentContainer"><a name="overview.description"> |
| <!-- --> |
| </a> |
| <div class="block"><p> |
| |
| <p> |
| XXX no answer for arch-overall |
| </p> |
| |
| </p> |
| <h3>What is New (see <a href="apichanges.html">all changes</a>)?</h3> |
| <ul> |
| |
| |
| <!--Search for dates that are later or equal to 1997-09-01 in |
| .--> |
| <!--Checking date 2014-5-25 with count of newer 0--><!--year ok--> |
| <li>May 25 '14 <a href="apichanges.html#PositionRef.Position">Implement Position interface for compatibility</a> |
| <p> |
| |
| <p> |
| PositionRef can provide a Position object, but does not itself implement |
| the Position interface, although it can provide the <code>offset</code>. |
| The change is just to formally implement the j.s.t.Position. |
| </p> |
| |
| </p> |
| </li> |
| <!--Checking date 2012-3-21 with count of newer 1--><!--year ok--> |
| <li>Mar 21 '12 <a href="apichanges.html#NbDocument.openDocument">Added methods <code>NbDocument.getDocument</code>, |
| <code>NbDocument.openDocument</code> with offset parameter and |
| <code>NbDocument.openDocument</code> with line and column parameter</a> |
| <p> |
| |
| <p> |
| First method gets the StyledDocument associated with a file while the other two |
| are used to open the document associated with a file in the Editor window |
| in a position specified by the offset or line and column while |
| controlling open and visibility behavior. |
| </p> |
| |
| </p> |
| </li> |
| <!--Checking date 2011-7-20 with count of newer 2--><!--year ok--> |
| <li>Jul 20 '11 <a href="apichanges.html#mark-commit-group">fix hole in commit-groups about empty commit group</a> |
| <p> |
| |
| <p> |
| Define semantics of a nested empty commit group. |
| Add <code>MARK_COMMIT_GROUP</code> to fill a gap in API; |
| It adds an inprogress commit-group and starts a new one. |
| </p> |
| |
| </p> |
| </li> |
| <!--Checking date 2011-6-1 with count of newer 3--><!--year ok--> |
| <li>Jun 1 '11 <a href="apichanges.html#CE.closeLast.boolean">CloneableEditor.closeLast</a> |
| <p> |
| |
| <p> |
| |
| <code>CloneableEditor</code> has a new utility method |
| <code>closeLast</code>. |
| </p> |
| |
| </p> |
| </li> |
| <!--Checking date 2011-6-1 with count of newer 3--><!--year ok--> |
| <li>Jun 1 '11 <a href="apichanges.html#CE.associateLookup">CloneableEditor(associateLookup)</a> |
| <p> |
| |
| <p> |
| |
| <code>CloneableEditor</code> offers new constructor |
| that will reuse the lookup provided by its |
| <a href="org/openide/text/CloneableEditorSupport.html" shape="rect">CloneableEditorSupport</a>. |
| </p> |
| |
| </p> |
| </li> |
| <!--Checking date 2011-6-1 with count of newer 3--><!--year ok--> |
| <li>Jun 1 '11 <a href="apichanges.html#initializeBySupport">CloneableEditor.initializeBySupport</a> |
| <p> |
| |
| <p> |
| Subclasses of <code>CloneableEditor</code> can manually request own |
| initialization by calling its |
| <a href="org/openide/text/CloneableEditor.html#initializeBySupport--" shape="rect">initializeBySupport</a> |
| method. |
| </p> |
| |
| </p> |
| </li> |
| <!--Checking date 2011-5-10 with count of newer 6--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2011-2-7 with count of newer 7--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2010-11-24 with count of newer 8--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2010-8-16 with count of newer 9--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2009-12-21 with count of newer 10--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2009-10-1 with count of newer 11--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2009-8-12 with count of newer 12--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2008-7-7 with count of newer 13--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2008-5-16 with count of newer 14--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2008-3-25 with count of newer 15--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2007-5-22 with count of newer 16--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2007-5-22 with count of newer 16--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2007-5-22 with count of newer 16--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2007-5-22 with count of newer 16--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2007-3-5 with count of newer 20--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2007-2-7 with count of newer 21--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2006-8-2 with count of newer 22--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2006-5-30 with count of newer 23--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2005-10-31 with count of newer 24--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2005-8-9 with count of newer 25--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2005-7-22 with count of newer 26--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2005-7-18 with count of newer 27--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2005-3-21 with count of newer 28--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2005-1-14 with count of newer 29--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2004-12-6 with count of newer 30--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2004-8-24 with count of newer 31--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2004-6-8 with count of newer 32--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2004-4-30 with count of newer 33--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2004-4-20 with count of newer 34--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2004-2-2 with count of newer 35--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2003-6-26 with count of newer 36--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2003-4-18 with count of newer 37--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2003-4-2 with count of newer 38--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2003-4-2 with count of newer 38--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2003-4-2 with count of newer 38--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2003-4-2 with count of newer 38--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2001-10-31 with count of newer 42--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2001-10-12 with count of newer 43--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2001-9-25 with count of newer 44--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2001-9-25 with count of newer 44--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2001-7-9 with count of newer 46--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2001-7-9 with count of newer 46--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2000-12-1 with count of newer 48--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2000-7-21 with count of newer 49--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2000-7-17 with count of newer 50--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2000-6-23 with count of newer 51--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2000-5-29 with count of newer 52--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2000-3-27 with count of newer 53--><!--Skipped as the amount of changes is too big--> |
| <!--Checking date 2000-2-24 with count of newer 54--><!--Skipped as the amount of changes is too big--> |
| </ul> |
| <h3>Use Cases</h3> |
| <answer id="arch-usecases"> |
| |
| <p> |
| XXX no answer for arch-usecases |
| </p> |
| |
| </answer> |
| <h3>Exported Interfaces</h3> |
| |
| This table lists all of the module exported APIs |
| with |
| defined stability classifications. It is generated |
| based on answers to questions about the architecture |
| of the module. <a href="architecture-summary.html">Read them all</a>... |
| |
| |
| <a name="group-java"> |
| <h5>Group of java interfaces</h5> |
| </a> |
| <table cellpadding="1" cellspacing="0" border="0" class="tablebg" width="100%"> |
| <tr> |
| <td> |
| <table border="0" cellpadding="3" cellspacing="1" width="100%"> |
| <tr class="tablersh"> |
| <td align="CENTER" width="25%"><span class="titlectable">Interface Name</span></td><td align="CENTER" width="10%"><span class="titlectable">In/Out</span></td><td align="CENTER" width="10%"><span class="titlectable">Stability</span></td><td align="CENTER"><span class="titlectable">Specified in What Document?</span></td> |
| </tr> |
| <tr class="tabler"> |
| <td>EditorAPI</td><td>Exported</td><td><a href="http://wiki.netbeans.org/API_Stability#Official">Official</a></td><td><a name="java-EditorAPI"><a href="../org-openide-text/org/openide/text/doc-files/api.html"> |
| .../org/openide/text/doc-files/api.html</a> |
| <p></p> |
| </a></td> |
| </tr> |
| <tr class="tabler"> |
| <td>EditorKitInitialization</td><td>Exported</td><td><a href="http://wiki.netbeans.org/API_Stability#Friend">Friend</a></td><td><a name="java-EditorKitInitialization"> |
| <p></p> |
| In order to speedup, or remove the load of initialization of kit in AWT during startup, |
| there is a special API that allows to ask the kit to pre-initialize. If the kit |
| implements <code>Callable</code> interface from JDK, it is called in non-AWT thread. |
| This works since version 6.18 and can be disabled by property <code>oldInitialization</code>. |
| <p></p> |
| </a></td> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| </table> |
| <p></p> |
| <a name="group-property"> |
| <h5>Group of property interfaces</h5> |
| </a> |
| <table cellpadding="1" cellspacing="0" border="0" class="tablebg" width="100%"> |
| <tr> |
| <td> |
| <table border="0" cellpadding="3" cellspacing="1" width="100%"> |
| <tr class="tablersh"> |
| <td align="CENTER" width="25%"><span class="titlectable">Interface Name</span></td><td align="CENTER" width="10%"><span class="titlectable">In/Out</span></td><td align="CENTER" width="10%"><span class="titlectable">Stability</span></td><td align="CENTER"><span class="titlectable">Specified in What Document?</span></td> |
| </tr> |
| <tr class="tabler"> |
| <td>indentEngine</td><td>Exported</td><td><a href="http://wiki.netbeans.org/API_Stability#Stable">Stable</a></td><td><a name="property-indentEngine"> |
| <p></p> |
| Property hold instance of <a href="../org-openide-text/org/openide/text/IndentEngine.html" shape="rect">IndentEngine</a> |
| and this indentation engine is used instead of system one. |
| <p></p> |
| </a></td> |
| </tr> |
| <tr class="tabler"> |
| <td>javax.swing.text.Document.modificationListener</td><td>Exported</td><td><a href="http://wiki.netbeans.org/API_Stability#Friend">Friend</a></td><td><a name="property-javax.swing.text.Document.modificationListener"> |
| <p></p> |
| In order to fix <a href="http://www.netbeans.org/issues/show_bug.cgi?id=51872" shape="rect">issue 51872</a> the |
| openide needs a way how to be notified about change of a document outside of its Document lock. |
| <code>DocumentListener</code>s are always notified under the lock, so a special contract has |
| been established (since version 5.3) by registering an instance of <code>VetoableListener</code> |
| by calling <code>putProperty ("modificationListener", listener)</code>. The |
| NetBeans aware documents are adviced to honor this property and call the listener |
| outside of the document lock when a modification is made. The actual contract |
| of the call can be seen in |
| <a href="http://www.netbeans.org/source/browse/openide/test/unit/src/org/openide/text/NbLikeEditorKit.java" shape="rect">NbLikeEditorKit.java</a> |
| in methods |
| <code>insertString</code> and <code>remove</code>. |
| |
| <p></p> |
| </a></td> |
| </tr> |
| <tr class="tabler"> |
| <td>beforeSaveRunnable</td><td>Exported</td><td><a href="http://wiki.netbeans.org/API_Stability#Friend">Friend</a></td><td><a name="property-beforeSaveRunnable"> |
| <p></p> |
| Document property that allows to execute a runnable before save of a document is performed. |
| For example an extra whitespace accumulated during typing can be removed by exploiting this property. |
| <p></p> |
| </a></td> |
| </tr> |
| <tr class="tabler"> |
| <td>expectedTime</td><td>Exported</td><td><a href="http://wiki.netbeans.org/API_Stability#Friend">Friend</a></td><td><a name="property-expectedTime"> |
| <p></p> |
| |
| <a href="org/openide/text/CloneableEditorSupport.html" shape="rect">CloneableEditorSupport</a> |
| understands not only its <code>Env.TIME</code> property, but also special |
| "expectedTime". When this one arrives, it means refresh its internal |
| last saved time, but without any refresh. This functionality is used from |
| <code>DataEditorSupport</code> when the DataObject is moved to new location |
| and we need to adjust the time to the new file object. |
| <p></p> |
| </a></td> |
| </tr> |
| <tr class="tabler"> |
| <td>usedByCloneableEditor</td><td>Exported</td><td><a href="http://wiki.netbeans.org/API_Stability#Friend">Friend</a></td><td><a name="property-usedByCloneableEditor"> |
| <p></p> |
| Component client property which is set to Boolean.TRUE if an editor pane is actively used by a cloneable editor. |
| Once the component gets closed the CloneableEditor sets the property to Boolean.FALSE. |
| <p></p> |
| </a></td> |
| </tr> |
| <tr class="tabler"> |
| <td>oldInitialization</td><td>Exported</td><td><a href="http://wiki.netbeans.org/API_Stability#Devel">Under Development</a></td><td><a name="property-oldInitialization"> |
| <p></p> |
| As the speedup of startup done in version 6.18 is not fully compatible, |
| there is a way to get back the original behaviour: just use |
| <code>this.putClientProperty("oldInitialization", Boolean.TRUE)</code> |
| and the whole initialization will be done in AWT thread. This is generally |
| slower, but compatible. |
| <p></p> |
| </a></td> |
| </tr> |
| <tr class="tabler"> |
| <td>org.openide.text.CloneableEditor.oldInitialization</td><td>Exported</td><td><a href="http://wiki.netbeans.org/API_Stability#Private">Private</a></td><td><a name="property-org.openide.text.CloneableEditor.oldInitialization"> |
| <p></p> |
| In order to measure startup improvements between AWT and non-AWT startup, |
| we have a property dedicated to testing that can switch all editors to be |
| opened in AWT. Just start NetBeans with |
| <code>-J-Dorg.openide.text.CloneableEditor.oldInitialization=true</code>. |
| This property may be discontiued anytime. |
| <p></p> |
| </a></td> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| </table> |
| <p></p> |
| <a name="group-layer"> |
| <h5>Group of layer interfaces</h5> |
| </a> |
| <table cellpadding="1" cellspacing="0" border="0" class="tablebg" width="100%"> |
| <tr> |
| <td> |
| <table border="0" cellpadding="3" cellspacing="1" width="100%"> |
| <tr class="tablersh"> |
| <td align="CENTER" width="25%"><span class="titlectable">Interface Name</span></td><td align="CENTER" width="10%"><span class="titlectable">In/Out</span></td><td align="CENTER" width="10%"><span class="titlectable">Stability</span></td><td align="CENTER"><span class="titlectable">Specified in What Document?</span></td> |
| </tr> |
| <tr class="tabler"> |
| <td>Editors-TabActions</td><td>Exported</td><td><a href="http://wiki.netbeans.org/API_Stability#Devel">Under Development</a></td><td><a name="layer-Editors-TabActions"> |
| <p></p> |
| Actions for the editor tab (window) context menu can be injected into <code>Editors/TabActions</code>. |
| <p></p> |
| </a></td> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| </table> |
| <p></p> |
| <h3>Implementation Details</h3> |
| <h5>Where are the sources for the module?</h5> |
| |
| <p> |
| <p> |
| The sources for the module are in the |
| <a href="http://hg.netbeans.org/" shape="rect">NetBeans Mercurial repositories</a>. |
| </p> |
| </p> |
| |
| <h5>What do other modules need to do to declare a dependency on this one, in addition to or instead of a plain module dependency?</h5> |
| |
| <p> |
| XXX no answer for deploy-dependencies |
| </p> |
| |
| <p> |
| Read more about the implementation in the <a href="architecture-summary.html">answers to |
| architecture questions</a>. |
| </p></div> |
| </div> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li class="navBarCell1Rev">Overview</li> |
| <li>Package</li> |
| <li>Class</li> |
| <li>Use</li> |
| <li><a href="overview-tree.html">Tree</a></li> |
| <li><a href="deprecated-list.html">Deprecated</a></li> |
| <li><a href="index-files/index-1.html">Index</a></li> |
| <li><a href="help-doc.html">Help</a></li> |
| </ul> |
| <div class="aboutLanguage">org.openide.text 6.69.1 </div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li>Prev</li> |
| <li>Next</li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="index.html?overview-summary.html" target="_top">Frames</a></li> |
| <li><a href="overview-summary.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small><span class="footnote">Built on September 14 2018. | Copyright © 2017-2018 Apache Software Foundation. All Rights Reserved.</span></small></p> |
| </body> |
| </html> |