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 2020/07/29 07:20:34 UTC

[GitHub] [netbeans] Enroi opened a new pull request #2278: [NETBEANS-626] Invoke tableDataChanged on CountingTableModel from Ins…

Enroi opened a new pull request #2278:
URL: https://github.com/apache/netbeans/pull/2278


   [NETBEANS-626] Invoke tableDataChanged on CountingTableModel from InsertRecordDialog
   It is my first attempt.


----------------------------------------------------------------
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.

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


[GitHub] [netbeans] Enroi edited a comment on pull request #2278: [NETBEANS-626] Invoke tableDataChanged on CountingTableModel from Ins…

Posted by GitBox <gi...@apache.org>.
Enroi edited a comment on pull request #2278:
URL: https://github.com/apache/netbeans/pull/2278#issuecomment-706602190


   Hello, sorry for close your reply. I did not understand what this link does.
   About you comment. 
   You have written "SwingUtilities#invokeLater is a candidate to handle this" but I can not understand how to use SwingUtilities#invokeLater here.
   I have tried to replace simole invoke fireTableDataChanged(); to SwingUtilities.invokeLater( ... fireTableDataChanged(); ... ) but it does not work here.
   


----------------------------------------------------------------
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.

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


[GitHub] [netbeans] Enroi commented on pull request #2278: [NETBEANS-626] Invoke tableDataChanged on CountingTableModel from Ins…

Posted by GitBox <gi...@apache.org>.
Enroi commented on pull request #2278:
URL: https://github.com/apache/netbeans/pull/2278#issuecomment-688513195


   Hello.
   Is new version better?


----------------------------------------------------------------
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.

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


[GitHub] [netbeans] Enroi commented on pull request #2278: [NETBEANS-626] Invoke tableDataChanged on CountingTableModel from Ins…

Posted by GitBox <gi...@apache.org>.
Enroi commented on pull request #2278:
URL: https://github.com/apache/netbeans/pull/2278#issuecomment-706601369


   > @Enroi it is good, that it is a smaller change. But it still involves the UI part manually updating the model part. The problem is still the coupling of the the two datamodels. The counting model relies on the UI being updated. So I suggest to modify this method:
   > 
   > https://github.com/apache/netbeans/blob/709587a5a001f78707c32a32c4272a21ecc85fca/ide/db.dataview/src/org/netbeans/modules/db/dataview/table/JXTableRowHeader.java#L189-L192
   > 
   > When this method is invoked, all events on the EDT have to have been processed. Only when that is true, the UI model of the backing table is in a stable state. `SwingUtilities#invokeLater` is a candidate to handle this, as it will enqueue the new action after the existing events.
   
   


----------------------------------------------------------------
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.

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


[GitHub] [netbeans] Enroi edited a comment on pull request #2278: [NETBEANS-626] Invoke tableDataChanged on CountingTableModel from Ins…

Posted by GitBox <gi...@apache.org>.
Enroi edited a comment on pull request #2278:
URL: https://github.com/apache/netbeans/pull/2278#issuecomment-706602190


   Hello, sorry for close your reply. I did not understand what this link does.
   About you comment. 
   You have written "SwingUtilities#invokeLater is a candidate to handle this" but I can not understand how to use SwingUtilities#invokeLater here.
   I have tried to replace simole invoke fireTableDataChanged(); to SwingUtilities.invokeLater( ... fireTableDataChanged(); ... ) but it does not work here.
   Can you give me more detail way for fix it?


----------------------------------------------------------------
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.

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


[GitHub] [netbeans] matthiasblaesing commented on pull request #2278: [NETBEANS-626] Invoke tableDataChanged on CountingTableModel from Ins…

Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on pull request #2278:
URL: https://github.com/apache/netbeans/pull/2278#issuecomment-712244920


   You can update the PR in place. Rewrite history on your system and then force push the change into the github branch. For the "how to" of rewriting history, please see: https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History


----------------------------------------------------------------
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.

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


[GitHub] [netbeans] matthiasblaesing commented on pull request #2278: [NETBEANS-626] Invoke tableDataChanged on CountingTableModel from Ins…

Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on pull request #2278:
URL: https://github.com/apache/netbeans/pull/2278#issuecomment-695099791


   @Enroi it is good, that it is a smaller change. But it still involves the UI part manually updating the model part. The problem is still the coupling of the the two datamodels. The counting model relies on the UI being updated. So I suggest to modify this method:
   
   https://github.com/apache/netbeans/blob/709587a5a001f78707c32a32c4272a21ecc85fca/ide/db.dataview/src/org/netbeans/modules/db/dataview/table/JXTableRowHeader.java#L189-L192
   
   When this method is invoked, all events on the EDT have to have been processed. Only when that is true, the UI model of the backing table is in a stable state. `SwingUtilities#invokeLater` is a candidate to handle this, as it will enqueue the new action after the existing events.
   
   


----------------------------------------------------------------
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.

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


[GitHub] [netbeans] matthiasblaesing commented on pull request #2278: [NETBEANS-626] Invoke tableDataChanged on CountingTableModel from Ins…

Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on pull request #2278:
URL: https://github.com/apache/netbeans/pull/2278#issuecomment-707271489


   The problem is that the row count of the JTable is updated, _after_ tableDataChanged is reached. So the method reads the row count at the wrong moment. A fix needs to ensure all pending events have happened before the _read_ is done. The read is backingTable.getRowCount() - if that is invoked directly and only the fireTableDataChanged is dispatched into the invokeLater, you are still reading the wrong value.
   
   The whole method body of tableDataChanged most be moved into the invokeLater.


----------------------------------------------------------------
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.

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


[GitHub] [netbeans] Enroi closed pull request #2278: [NETBEANS-626] Invoke tableDataChanged on CountingTableModel from Ins…

Posted by GitBox <gi...@apache.org>.
Enroi closed pull request #2278:
URL: https://github.com/apache/netbeans/pull/2278


   


----------------------------------------------------------------
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.

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


[GitHub] [netbeans] Enroi commented on pull request #2278: [NETBEANS-626] Invoke tableDataChanged on CountingTableModel from Ins…

Posted by GitBox <gi...@apache.org>.
Enroi commented on pull request #2278:
URL: https://github.com/apache/netbeans/pull/2278#issuecomment-706602190


   Hello, sorry for close your reply. I did not understand what this link does.
   About you comment. 
   You have written "SwingUtilities#invokeLater is a candidate to handle this" but I can not understand how to use SwingUtilities#invokeLater here.
   I tested such code, but it does not work
   `private void tableDataChanged() {
               setCount(backingTable.getRowCount());
               SwingUtilities.invokeLater(new Runnable() {
                   @Override
                   public void run() {
                       fireTableDataChanged();
                   }
               });
           }`
   Do you propose to replace every invoke of tableDataChanged with SwingUtilities.invokeLater(... tableDataChanged() ... ) ?


----------------------------------------------------------------
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.

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


[GitHub] [netbeans] Enroi commented on pull request #2278: [NETBEANS-626] Invoke tableDataChanged on CountingTableModel from Ins…

Posted by GitBox <gi...@apache.org>.
Enroi commented on pull request #2278:
URL: https://github.com/apache/netbeans/pull/2278#issuecomment-715971187


   I have found way how to squash and push my changes. 
   Now this poll request has only 1 commit.


----------------------------------------------------------------
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.

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


[GitHub] [netbeans] Enroi commented on pull request #2278: [NETBEANS-626] Invoke tableDataChanged on CountingTableModel from Ins…

Posted by GitBox <gi...@apache.org>.
Enroi commented on pull request #2278:
URL: https://github.com/apache/netbeans/pull/2278#issuecomment-711081206


   Hello.
   It works. It is surprise for me. 


----------------------------------------------------------------
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.

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


[GitHub] [netbeans] matthiasblaesing commented on pull request #2278: [NETBEANS-626] Invoke tableDataChanged on CountingTableModel from Ins…

Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on pull request #2278:
URL: https://github.com/apache/netbeans/pull/2278#issuecomment-711308606


   Tested the change and it works. Please squash the commits into one.
   
   For the record: I assume you read the file header and you donate this change to the ASF. If this is not the case, please indicate so, the change can then not be merged.


----------------------------------------------------------------
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.

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


[GitHub] [netbeans] Enroi commented on pull request #2278: [NETBEANS-626] Invoke tableDataChanged on CountingTableModel from Ins…

Posted by GitBox <gi...@apache.org>.
Enroi commented on pull request #2278:
URL: https://github.com/apache/netbeans/pull/2278#issuecomment-711420983


   Can I create new MergeRequest? I can not find how to squash GIT commits in GitHub.


----------------------------------------------------------------
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.

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