mbien commented on a change in pull request #3489:
URL: https://github.com/apache/netbeans/pull/3489#discussion_r790122325
##########
File path:
platform/api.search/src/org/netbeans/modules/search/BasicSearchForm.java
##########
@@ -1119,8 +1121,23 @@ private void limitReached() {
public MultiLineComboBoxEditor() {
area.setWrapStyleWord(false);
area.setLineWrap(false);
+
+ // retain standard focus traversal behavior
area.setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, null);
area.setFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS,
null);
+
+ // pretend to be a single line text field if you are small enough
+ area.addKeyListener(new KeyAdapter() {
Review comment:
I agree on the discoverability aspect but this PR does not change
anything there. There is already a msg label somewhere e.g stating "the text
will be used literally". It could also add "resize window for multi line
Strings". Adding a button which makes the window larger is unusual UI-wise, but
this could be added too if there is a need (I would prefer not).
there are many little details to consider here. e.g if you select text in
the editor, the dialog will already have properly sized texfields. The text
fields are also used in the regex tester etc - so we would need to add those
toggle buttons everywhere.
This is a very trivial issue IMO. The worst thing which can happen is that
someone adds a newline in a text field instead of triggering the OK action -
and only if the text field has focus. I wouldn't have expected that anyone
would file an issue for that tbh.
This PR fixes it and restores original behavior for single line
search/replace.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists