You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "junichi11 (via GitHub)" <gi...@apache.org> on 2023/04/01 15:19:37 UTC
[GitHub] [netbeans] junichi11 opened a new pull request, #5759: Avoid being scrolled to the end of the editor in the preview panel for formatting options
junichi11 opened a new pull request, #5759:
URL: https://github.com/apache/netbeans/pull/5759
- Currently, when the values of the formatting options are changed, the preview panel is scrolled to the end of the editor
- To avoid it, keep the caret position before reformatting
Before:

After:

--
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
[GitHub] [netbeans] tmysik commented on pull request #5759: Avoid being scrolled to the end of the editor in the preview panel for formatting options
Posted by "tmysik (via GitHub)" <gi...@apache.org>.
tmysik commented on PR #5759:
URL: https://github.com/apache/netbeans/pull/5759#issuecomment-1493341691
So, should we make this PR? Or will we wait if there is a better/generic fix possible? Please, let me know, thanks.
--
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
[GitHub] [netbeans] mbien commented on pull request #5759: Avoid being scrolled to the end of the editor in the preview panel for formatting options
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #5759:
URL: https://github.com/apache/netbeans/pull/5759#issuecomment-1493351377
@tmysik its ok to merge from my side. Looks like that we have to fix all individual implementations of `PreviewProvider`. In any case, merging this doesn't hurt.
--
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
[GitHub] [netbeans] junichi11 commented on a diff in pull request #5759: Avoid being scrolled to the end of the editor in the preview panel for formatting options
Posted by "junichi11 (via GitHub)" <gi...@apache.org>.
junichi11 commented on code in PR #5759:
URL: https://github.com/apache/netbeans/pull/5759#discussion_r1155125666
##########
php/php.editor/src/org/netbeans/modules/php/editor/indent/FmtOptions.java:
##########
@@ -569,8 +574,9 @@ public void run() {
} else {
LOGGER.warning(String.format("Can't format %s; it's not BaseDocument.", doc)); //NOI18N
}
+ pane.setCaretPosition(caretPosition);
pane.setIgnoreRepaint(false);
- pane.scrollRectToVisible(visibleRectangle);
+ SwingUtilities.invokeLater(() -> pane.scrollRectToVisible(visibleRectangle));
Review Comment:
Because the preview pane is scrolled to the caret position when we change options after we scroll it anywhere.
--
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
[GitHub] [netbeans] tmysik commented on pull request #5759: Avoid being scrolled to the end of the editor in the preview panel for formatting options
Posted by "tmysik (via GitHub)" <gi...@apache.org>.
tmysik commented on PR #5759:
URL: https://github.com/apache/netbeans/pull/5759#issuecomment-1493362954
@mbien OK then, merging. Thanks!
--
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
[GitHub] [netbeans] tmysik merged pull request #5759: Avoid being scrolled to the end of the editor in the preview panel for formatting options
Posted by "tmysik (via GitHub)" <gi...@apache.org>.
tmysik merged PR #5759:
URL: https://github.com/apache/netbeans/pull/5759
--
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
[GitHub] [netbeans] junichi11 commented on pull request #5759: Avoid being scrolled to the end of the editor in the preview panel for formatting options
Posted by "junichi11 (via GitHub)" <gi...@apache.org>.
junichi11 commented on PR #5759:
URL: https://github.com/apache/netbeans/pull/5759#issuecomment-1493172424
It would be nice if we can find it :)
It seems that `pane.scrollRectToVisible()` is invoked in each editor. However, I don't think it work as expected behavior, currently.
--
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
[GitHub] [netbeans] mbien commented on pull request #5759: Avoid being scrolled to the end of the editor in the preview panel for formatting options
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #5759:
URL: https://github.com/apache/netbeans/pull/5759#issuecomment-1493067032
good change, however, lets wait with merge and think about this a bit, maybe we can find a way to fix this for all languages.
--
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
[GitHub] [netbeans] mbien commented on pull request #5759: Avoid being scrolled to the end of the editor in the preview panel for formatting options
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #5759:
URL: https://github.com/apache/netbeans/pull/5759#issuecomment-1493174486
i hoped `org.netbeans.modules.options.indentation.FormattingPanel` could help but it doesn't know any details about the `PreviewProvider`s it uses.
So it looks like we would have to add your fix to every single `PreviewProvider` implementation which is quite a lot :(
--
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
[GitHub] [netbeans] junichi11 commented on pull request #5759: Avoid being scrolled to the end of the editor in the preview panel for formatting options
Posted by "junichi11 (via GitHub)" <gi...@apache.org>.
junichi11 commented on PR #5759:
URL: https://github.com/apache/netbeans/pull/5759#issuecomment-1493291080
@mbien I also tried to fix that file at first. As you wrote, couldn't do it.
OK. I'll fix only PHP in this PR.
If you would like to work on the other languages, please feel free to do it :) I can verify it, of course. Thanks!
--
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