matthiasblaesing commented on a change in pull request #3489:
URL: https://github.com/apache/netbeans/pull/3489#discussion_r790134047



##########
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_TRAVERS‌​AL_KEYS, null);
             
area.setFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERS‌​AL_KEYS, 
null);
+
+            // pretend to be a single line text field if you are small enough
+            area.addKeyListener(new KeyAdapter() {

Review comment:
       I tried a less invasive approach here: 
https://github.com/matthiasblaesing/netbeans/commit/99c6b0b878aff54c498c1ed38c54006cd48abf4b
   
   - The renderer for previous searches replaces new lines with a single space, 
so that the text is still readable, but compact
   - An information text is shown in the notification area, that the search can 
be submitted by pression CTRL+enter (might need wording adjustment and handling 
the mac case)
   - the input area is widend to approx. 3 lines, so that text can be 
realistically be added. In the future it might be optimized by being able to 
open a dialog with a bigger TextArea
   - the border of the textarea used as editor is ajusted to match the normal 
combo box editor one
   
   
![image](https://user-images.githubusercontent.com/2179736/150637037-965a6f45-e710-437c-b644-a15b878e4574.png)
   
   This is not polished, but IMHO improves the situation.




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

Reply via email to