You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "notzed (via GitHub)" <gi...@apache.org> on 2023/04/27 21:53:29 UTC

[GitHub] [netbeans] notzed opened a new pull request, #5897: [NETBEANS-5719] Add option to disable tooltips for parameter completion.

notzed opened a new pull request, #5897:
URL: https://github.com/apache/netbeans/pull/5897

   
   Here's a quick and dirty attempt at implementing an option to disable the annoying tooltips that show when completing on functions, as per [NETBEANS-5719].
   
   ---
   **^Add meaningful description above**
   
   By opening a pull request you confirm that, unless explicitly stated otherwise, the changes -
   
    - are all your own work, and you have the right to contribute them.
    - are contributed solely under the terms and conditions of the Apache License 2.0 (see section 5 of the license for more information).
   
   Please make sure (eg. `git log`) that all commits have a valid name and email address for you in the Author field.
   
   If you're a first time contributor, see the Contributing guidelines for more information.
   
   If you're a committer, please label the PR before pressing "Create pull request" so that the right test jobs can run.
   


-- 
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 a diff in pull request #5897: [NETBEANS-5719] Add option to disable tooltips for parameter completion.

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on code in PR #5897:
URL: https://github.com/apache/netbeans/pull/5897#discussion_r1180888367


##########
ide/editor.completion/src/org/netbeans/modules/editor/completion/CompletionImpl.java:
##########
@@ -1414,16 +1414,18 @@ boolean hideDocumentationPane(boolean documentationOnly) {
      * May be called from any thread but it will be rescheduled into AWT.
      */
     public void showToolTip() {
-        if (!SwingUtilities.isEventDispatchThread()) {
-            // Re-call this method in AWT if necessary
-            SwingUtilities.invokeLater(new ParamRunnable(ParamRunnable.SHOW_TOOL_TIP));
-            return;
-        }
-
-        if (ensureActiveProviders()) {
-            toolTipCancel();
-            toolTipQuery();
-        }
+		if (CompletionSettings.getInstance(getActiveComponent()).completionDisplayTooltip()) {

Review Comment:
   nitpick: you are using tabs here, please use spaces if possible (but read other message first).



-- 
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] notzed commented on pull request #5897: [NETBEANS-5719] Add option to disable tooltips for parameter completion.

Posted by "notzed (via GitHub)" <gi...@apache.org>.
notzed commented on PR #5897:
URL: https://github.com/apache/netbeans/pull/5897#issuecomment-1540982340

   ok gotcha!  good luck!


-- 
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 #5897: [NETBEANS-5719] Add option to disable tooltips for parameter completion.

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #5897:
URL: https://github.com/apache/netbeans/pull/5897#issuecomment-1528656630

   > I never use ctrl-p, i only use ctrl-space on the function name to select a function.
   
   yeah that is fine. ctrl-p should still show the parameter tooltip since it is the keybinding for it. The checkbox should not disable the keybinding activated action.
   
   > So that change wouldn't fix the issue at all.
   
   why not? It won't show up unless you press ctrl-p and you just said that you don't do that.


-- 
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] notzed commented on pull request #5897: [NETBEANS-5719] Add option to disable tooltips for parameter completion.

Posted by "notzed (via GitHub)" <gi...@apache.org>.
notzed commented on PR #5897:
URL: https://github.com/apache/netbeans/pull/5897#issuecomment-1630690779

   Cheers for accepting this.  Till next time.


-- 
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] notzed commented on pull request #5897: [NETBEANS-5719] Add option to disable tooltips for parameter completion.

Posted by "notzed (via GitHub)" <gi...@apache.org>.
notzed commented on PR #5897:
URL: https://github.com/apache/netbeans/pull/5897#issuecomment-1528898421

   I applied your patch as suggested - now the setting appears to do nothing whatsoever.
   
   Just to clarify these are the relevant pre-patch options I use:
   
   > [ ] auto popup completion window
   > [x] auto popup documentation window
   > [ ] display documentation next to window
   > [ ] insert single proposes automatically
   
   I have this function:
   
   > 	/**
   > 	 * Blah
   > 	 * @param a
   > 	 * @param b
   > 	 * @param c 
   > 	 */
   >     static void foo(int a, int b, int c) {
   >         
   >     }
   
   In some other piece of code I type:
   
   >     foo[ctrl-space]
   
   to get:
   
   ![image](https://user-images.githubusercontent.com/51409789/235327251-9adc2eb6-a622-4265-a929-c39f9127276c.png)
   
   So far so good, this lets me navigate matches and review the documentation, etc.
   
   I then hit [return] to select the function I want (i.e. foo(a,b,c)):
   
   ![image](https://user-images.githubusercontent.com/51409789/235327272-436a9c2e-bcb4-4500-a85e-8caff7a4b69e.png)
   
   And that pops up.  This is what I want to remove as it almost always covers important context i'm using to fill out the parameters and even if it doesn't it's distracting and annoying.
   
   With your patch the new option makes no difference here, it just always shows up.
   
   Not that it's a deal-breaker but I also don't think the text should include 'auto' because this is not related to the automatic setting.  Nor is the 'auto popup documentation window' as indicated by the source comment '// Show documentation as well if set by default'.  They are both in effect: 'if showing completion (whether automatically or not), then also show documentation, and/or also show parameters'.
   
   Infact the behaviour desired is the same as the show-documentation checkbox, although they display at different times so the same mechanism can't be utilised.
   
   Through the debugger I found it is invoked from:
   
   java/java.editor/src/org/netbeans/modules/editor/java/JavaCompletionItem.java
   
   I've pushed a work-in-progress patch that creates the behaviour I want whilst retaining ctrl-p behaviour.  I don't know about other languages though.
   


-- 
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 #5897: [NETBEANS-5719] Add option to disable tooltips for parameter completion.

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #5897:
URL: https://github.com/apache/netbeans/pull/5897#issuecomment-1528844455

   @notzed in case you overlooked it: you could just apply the diff I posted. Then we can test it how well it works.


-- 
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 #5897: [NETBEANS-5719] Add option to disable tooltips for parameter completion.

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #5897:
URL: https://github.com/apache/netbeans/pull/5897#issuecomment-1630490279

   > ... it's been so long i've forgotten what I did.
   
   same
   
   > Not sure if i did that conflict resolution right, I did it via the ui here.
   
   let me squash the two commits locally and force push. You might show up as two users otherwise, i generally try to avoid using github ui.


-- 
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 a diff in pull request #5897: [NETBEANS-5719] Add option to disable tooltips for parameter completion.

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on code in PR #5897:
URL: https://github.com/apache/netbeans/pull/5897#discussion_r1181112061


##########
ide/options.editor/src/org/netbeans/modules/options/editor/completion/Bundle.properties:
##########
@@ -51,3 +51,4 @@ AN_Javadoc_Next_To_CC=Documentation Next To Completion Checkbox
 AD_Javadoc_Next_To_CC=Display Documentation Next To Completion
 GeneralCompletionOptionsPanel.AccessibleContext.accessibleName=General Completion Options
 GeneralCompletionOptionsPanel.AccessibleContext.accessibleDescription=Settings for various completion settings
+GeneralCompletionOptionsPanel.cbDisplayParameterTooltip.text=Display Parameter &Tooltip

Review Comment:
   regarding the UI text: might be better to change it to "Auto Popup Parameter &Tooltip" so that it fits to the other two check boxes which follow the same pattern.



-- 
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] notzed commented on pull request #5897: [NETBEANS-5719] Add option to disable tooltips for parameter completion.

Posted by "notzed (via GitHub)" <gi...@apache.org>.
notzed commented on PR #5897:
URL: https://github.com/apache/netbeans/pull/5897#issuecomment-1528702302

   > 
   
   Ahh ok, i completely misinterpreted your description.  I'll look at it and likely re-submit tomorrow.
   
   Is the checkbox text adequate?  I couldn't think of something better in a rush.  What about updating the documentation?
   


-- 
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] notzed commented on pull request #5897: [NETBEANS-5719] Add option to disable tooltips for parameter completion.

Posted by "notzed (via GitHub)" <gi...@apache.org>.
notzed commented on PR #5897:
URL: https://github.com/apache/netbeans/pull/5897#issuecomment-1629860544

   Thanks - glad it's all ok because it's been so long i've forgotten what I did.
   
   Not sure if i did that conflict resolution right, I did it via the ui 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.

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] notzed commented on a diff in pull request #5897: [NETBEANS-5719] Add option to disable tooltips for parameter completion.

Posted by "notzed (via GitHub)" <gi...@apache.org>.
notzed commented on code in PR #5897:
URL: https://github.com/apache/netbeans/pull/5897#discussion_r1180948563


##########
ide/editor.completion/src/org/netbeans/modules/editor/completion/CompletionImpl.java:
##########
@@ -1414,16 +1414,18 @@ boolean hideDocumentationPane(boolean documentationOnly) {
      * May be called from any thread but it will be rescheduled into AWT.
      */
     public void showToolTip() {
-        if (!SwingUtilities.isEventDispatchThread()) {
-            // Re-call this method in AWT if necessary
-            SwingUtilities.invokeLater(new ParamRunnable(ParamRunnable.SHOW_TOOL_TIP));
-            return;
-        }
-
-        if (ensureActiveProviders()) {
-            toolTipCancel();
-            toolTipQuery();
-        }
+		if (CompletionSettings.getInstance(getActiveComponent()).completionDisplayTooltip()) {

Review Comment:
   yeah that's just what netbeans did, i couldn't find a way to change the settings.



-- 
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] notzed commented on pull request #5897: [NETBEANS-5719] Add option to disable tooltips for parameter completion.

Posted by "notzed (via GitHub)" <gi...@apache.org>.
notzed commented on PR #5897:
URL: https://github.com/apache/netbeans/pull/5897#issuecomment-1528635005

   I never use ctrl-p, i only use ctrl-space on the function name to select a function.
   
   So that change wouldn't fix the issue at all.  I never ever want to see that tooltip (or really any tooltip ever, they cause eye strain and frustration).
   
   


-- 
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 a diff in pull request #5897: [NETBEANS-5719] Add option to disable tooltips for parameter completion.

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on code in PR #5897:
URL: https://github.com/apache/netbeans/pull/5897#discussion_r1180958381


##########
ide/editor.completion/src/org/netbeans/modules/editor/completion/CompletionImpl.java:
##########
@@ -1414,16 +1414,18 @@ boolean hideDocumentationPane(boolean documentationOnly) {
      * May be called from any thread but it will be rescheduled into AWT.
      */
     public void showToolTip() {
-        if (!SwingUtilities.isEventDispatchThread()) {
-            // Re-call this method in AWT if necessary
-            SwingUtilities.invokeLater(new ParamRunnable(ParamRunnable.SHOW_TOOL_TIP));
-            return;
-        }
-
-        if (ensureActiveProviders()) {
-            toolTipCancel();
-            toolTipQuery();
-        }
+		if (CompletionSettings.getInstance(getActiveComponent()).completionDisplayTooltip()) {

Review Comment:
   under editor->formatting. Expand tabs with spaces is enabled by default.



-- 
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 #5897: [NETBEANS-5719] Add option to disable tooltips for parameter completion.

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #5897:
URL: https://github.com/apache/netbeans/pull/5897#issuecomment-1539396683

   I just haven't gotten to this yet. NB 18 is currently being released and I am working on maven-indexing improvements (for NB 19) which take up most of my free time.


-- 
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] notzed commented on pull request #5897: [NETBEANS-5719] Add option to disable tooltips for parameter completion.

Posted by "notzed (via GitHub)" <gi...@apache.org>.
notzed commented on PR #5897:
URL: https://github.com/apache/netbeans/pull/5897#issuecomment-1539094961

   Just wondering if there is any follow-up here.  Last week I force-pushed a change.  As I commented above I tried your patch but it just didn't work for me and I moved the invocation test to the java completion code which is the only place that knows where the request came from.  With the new patch the option behaves the same as the 'documentation auto-popup' one, i.e. it only pops up 'as well as' the completion when enabled, but doesn't affect explicit requests (i.e. C-p).
   
   I fixed the whitespace but the main caveat with the new patch is that it retains it as an all-languages option (which seems the right place?) but I only implemented it in the java completion code.


-- 
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 #5897: [NETBEANS-5719] Add option to disable tooltips for parameter completion.

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #5897:
URL: https://github.com/apache/netbeans/pull/5897#issuecomment-1528845043

   also don't "re-submit", just force push into this PR that is fine.


-- 
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 merged pull request #5897: [NETBEANS-5719] Add option to disable tooltips for parameter completion.

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien merged PR #5897:
URL: https://github.com/apache/netbeans/pull/5897


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