You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/06/21 22:49:42 UTC

[GitHub] [netbeans] errael commented on a diff in pull request #4249: After file external change fire reloaded event

errael commented on code in PR #4249:
URL: https://github.com/apache/netbeans/pull/4249#discussion_r903131128


##########
platform/openide.text/apichanges.xml:
##########
@@ -25,21 +25,41 @@
 <apidef name="text">Text API</apidef>
 </apidefs>
 <changes>
-      <change id="ask.on.document.reload">
-          <api name="text"/>
-          <summary>Rebrand defaults for Reload Editor Dialog</summary>
-          <version major="6" minor="80"/>
-          <date day="22" month="1" year="2021"/>
-          <author login="dbalek"/>
-          <compatibility addition="yes" binary="compatible" source="compatible"
-                         semantic="incompatible" deletion="no"
-                         modification="no"/>
-          <description>
-              A branding API to disable showing reload externally modified document dialog
-              - <a href="architecture-summary.html#group-branding">ASK_OnReload</a>.
-          </description>
-          <class package="org.openide.text" name="CloneableEditorSupport"/>
-      </change>
+    <change id="EditorCookie.Observalble.PROP_RELOADING">
+        <api name="text"/>
+        <summary>Added EditorCookie.Observalble.PROP_RELOADING and associated begin/end events</summary>
+        <version major="6" minor="86"/>
+        <date day="22" month="6" year="2022"/>
+        <author login="errael"/>
+        <compatibility addition="yes" binary="compatible" source="compatible"
+                       semantic="compatible" deletion="no"
+                       modification="no"/>
+        <description>
+                Added EditorCookie.Observalble.PROP_RELOADING and associated
+                begin/end events so that editor modules can handle external file change.
+                These events are fired on the EDT by the document's CloneableEditorSupport;
+                evt.getNewValue() is a Boolean, true signals the start of reload
+                and false the end.
+                One use adjust carets to keep the same line/column before and after
+                reload of an externally modified file.
+        </description>
+        <class package="org.openide.text" name="CloneableEditorSupport"/>

Review Comment:
   Done.



##########
platform/openide.text/src/org/openide/cookies/EditorCookie.java:
##########
@@ -144,6 +144,11 @@ interface Observable extends EditorCookie {
          */
         public static final String PROP_OPENED_PANES = "openedPanes";
 
+        /** This property is fired on the EDT when the reloading state of the
+         * document has changed; reloading is due to an external file change.
+         */
+        public static final String PROP_RELOADING = "reloading";

Review Comment:
   Done.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists