You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "pgifford (via GitHub)" <gi...@apache.org> on 2025/01/04 23:52:28 UTC

[I] Add means to disable code preview [netbeans]

pgifford opened a new issue, #8112:
URL: https://github.com/apache/netbeans/issues/8112

   ### Description
   
   Add means to disable or hide code preview in Usages results.
   
   ### Use case/motivation
   
   I code on a monitor in portrait orientation.
   
   **Motivation for request**
   1. The code preview in Usages takes up over 2/3 of the window width covers about 50% of the horizontal extent of the results tree
   2. The Usages code preview cannot be resized so it is not visible. When the divider is dragged as far as possible to the right, line numbers are still visible.
       * The Search Results code preview can be completely hidden by dragging the divider all the way to the right.
   3. Usages code preview does not respect user preferences. Each invocation returns the divider to the default position which means I have to drag it back to the right to be able to read the results without having to scroll.
       * Once hidden (i.e. divider moved fully right) the Search Results code preview remains hidden even when NetBeans is closed and reopened.
   
   NetBeans has been my daily driver for over 20 years and I have rarely wished for a code preview in usages (or search results).  It should be an optional element and not forced upon everyone, especially when the implementation is in such a rough state.
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No


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


Re: [I] Usages: Add means to disable code preview [netbeans]

Posted by "predi (via GitHub)" <gi...@apache.org>.
predi commented on issue #8112:
URL: https://github.com/apache/netbeans/issues/8112#issuecomment-2736284476

   I don't care for the Preview either. I just upgraded from version 18 to 25 to find that something that needed no changes for at least a decade and a half has changed. And that it has changed in a way that disrupts my workflow.
   
   I came here to comment that the issue described by @dschniedertuens-tc, where jumps do not occur in the main editor, is _highly annoying_. Users are instead forced to use double-clicks on the tree nodes to get this changed component to do what it did before via key bindings.


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


Re: [I] Usages: Add means to disable code preview [netbeans]

Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on issue #8112:
URL: https://github.com/apache/netbeans/issues/8112#issuecomment-2571615648

   Sure, I'm aware of that.  The point was that unless an existing utility via openide.text will already achieve that for us (when available) then either an enhancement to the API there to do that and/or an SPI displayer that can handle it would be good.


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


Re: [I] Usages: Add means to disable code preview [netbeans]

Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing commented on issue #8112:
URL: https://github.com/apache/netbeans/issues/8112#issuecomment-2571555999

   For the record: I agree, that a toggle that makes it possible to switch previews off would be good. I also agree, that the consistency argument is moot, as the problem (forced preview) was added as a feature, so switching to the previous situation is IMHO a no-brainer (else the feature is an issue and should be reverted). 
   
   I think we should not blow up the consistency argument. It is good if the use-cases converge, but if it is not possible and just realises the orginally thought about switching option, I don't see a problem.
   
   Now it only needs someone to implement.


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


Re: [I] Usages: Add means to disable code preview [netbeans]

Posted by "dschniedertuens-tc (via GitHub)" <gi...@apache.org>.
dschniedertuens-tc commented on issue #8112:
URL: https://github.com/apache/netbeans/issues/8112#issuecomment-2725309140

   @matthiasblaesing Thank you for addressing our concerns! The switch successfully restores my workflow again apart from some minor bugs that I found and explained in the PR.
   
   The two panes "Search results" and "Usages" still behave differently in relation to the navigation (Previous and Next Occurence) in the main editor when the preview is enabled. Is this intended behavior or would you consider that as a separate bug?


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


Re: [I] Usages: Add means to disable code preview [netbeans]

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on issue #8112:
URL: https://github.com/apache/netbeans/issues/8112#issuecomment-2571536360

   > Things are already inconsistent in the screenshot (depending on the window line numbers are in the results, the preview, and both)
   
   The search preview does not only have line numbers it also does not use the semantic layer in the preview panel since this would require a dependency from search API to the netbeans editor modules. Even if this is determined to be ok, it would have to be verified that this doesn't cause other problems, e.g cluster activations caused by browsing through search results - so it might not be worth 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.

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


Re: [I] Usages: Add means to disable code preview [netbeans]

Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing commented on issue #8112:
URL: https://github.com/apache/netbeans/issues/8112#issuecomment-2599786373

   @pgifford thank you for the explanation and I see the problem now.


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


Re: [I] Usages: Add means to disable code preview [netbeans]

Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing commented on issue #8112:
URL: https://github.com/apache/netbeans/issues/8112#issuecomment-2719035425

   @pgifford @dschniedertuens-tc I agree that the preview can be regarded as a useless space taker. To satisfy both ideas I added a "preview" switch to the relevant use cases (see PR #8326). Please see if that addresses your concerns and test it.
   
   A nightly build is available from the [checks page](https://github.com/apache/netbeans/pull/8326/checks) or [directly](https://github.com/apache/netbeans/suites/35593160637/artifacts/2740742292).


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


Re: [I] Usages: Add means to disable code preview [netbeans]

Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing commented on issue #8112:
URL: https://github.com/apache/netbeans/issues/8112#issuecomment-2599757195

   @dschniedertuens-tc I did a quick test and it works for me (buttons in editor + F3/Shift+F3 keys). If the main editor has a the focus, jumping happens there, if the preview has it, jumping happens there. So this needs some more information/explanation.


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


Re: [I] Usages: Add means to disable code preview [netbeans]

Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on issue #8112:
URL: https://github.com/apache/netbeans/issues/8112#issuecomment-2571593835

   > The search preview does not only have line numbers it also does not use the semantic layer in the preview panel since this would require a dependency from search API to the netbeans editor modules.
   
   That is of course the reason I've been getting frustrated that the search view doesn't support ctrl+click recently despite it never doing so! :smile: 
   
   Direct dependency into the editor modules is of course not feasible.  Enhancing the search SPI to allow custom result preview and/or seeing if this can be implemented via openide.text might be.  I agree that cluster activations via the search window might be a problem to consider, although perhaps no more of an issue than flicking through the options dialog.
   
   Incidentally, the kit lookup in the other views should possibly be via openide.text too? https://bits.netbeans.org/23/javadoc/org-openide-text/org/openide/text/CloneableEditorSupport.html#getEditorKit-java.lang.String-


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


Re: [I] Usages: Add means to disable code preview [netbeans]

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on issue #8112:
URL: https://github.com/apache/netbeans/issues/8112#issuecomment-2571486360

   3) was an oversight and should be fixed in master https://github.com/apache/netbeans/pull/8105, https://github.com/apache/netbeans/pull/8089
   
   The preview toggle was intentionally left out and will be only added if it is also added to all windows which with similar functionality to keep things consistent. https://github.com/apache/netbeans/pull/7694#issuecomment-2376739040 has a screenshot with some of the windows


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


Re: [I] Usages: Add means to disable code preview [netbeans]

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on issue #8112:
URL: https://github.com/apache/netbeans/issues/8112#issuecomment-2571612885

   > Incidentally, the kit lookup in the other views should possibly be via openide.text too? https://bits.netbeans.org/23/javadoc/org-openide-text/org/openide/text/CloneableEditorSupport.html#getEditorKit-java.lang.String-
   
   The other previews do something like this `((BaseTextUI) editorPane.getUI()).getExtComponent()` to get the extended editor component (hidden behind utility methods). The editor kit does change fine but I don't think that a plain old `JEditorPane` can morph into the typical NB editor.


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


Re: [I] Usages: Add means to disable code preview [netbeans]

Posted by "dschniedertuens-tc (via GitHub)" <gi...@apache.org>.
dschniedertuens-tc commented on issue #8112:
URL: https://github.com/apache/netbeans/issues/8112#issuecomment-2599776179

   @matthiasblaesing Thanks for looking into it.
   Did you try that with the Usages result? I'm wondering this because F3 is only responsible for the normal search in my case. Reproduced on this screenshot:
   
   ![Image](https://github.com/user-attachments/assets/c86d06fe-d402-4e9b-a450-7ee27ef0a271)
   
   Focus was in the main editor on line 80. When pressing CTRL + Period (or clicking on the arrow down button) the expected result would have been jumping to line 84 in the main editor but the cursor is still in line 80 and line 84 was only highlighted in the Usages result and preview.
   This behaviour affects only "Usages". The very similar "Search Results" works as expected. Could it make a difference that I am editing PHP code?
   
   Btw. I didn't intend to hijack this feature request issue with a possible bug report. My hope was to get back the old behavior with the toggle 🙂


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


Re: [I] Usages: Add means to disable code preview [netbeans]

Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing closed issue #8112: Usages: Add means to disable code preview
URL: https://github.com/apache/netbeans/issues/8112


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


Re: [I] Usages: Add means to disable code preview [netbeans]

Posted by "pgifford (via GitHub)" <gi...@apache.org>.
pgifford commented on issue #8112:
URL: https://github.com/apache/netbeans/issues/8112#issuecomment-2571514565

   > The preview toggle was intentionally left out and will be only added if it is also added to all windows which with similar functionality to keep things consistent. 
   
   Things are already inconsistent in the screenshot (depending on the window line numbers are in the results, the preview, and both) so what’s one more? 😁
   
   You added the “Contribution welcome” label…what did you have in mind?


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


Re: [I] Usages: Add means to disable code preview [netbeans]

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on issue #8112:
URL: https://github.com/apache/netbeans/issues/8112#issuecomment-2571559545

   > Now it only needs someone to implement.
   
   it already was implemented (for search) and reverted after discussion that such feature should be added to all semantically similar views. The duplicated code situation isn't great, adding a toggle after looking through all splitplanes-with-preview would certainly lead to more maintainable code, more UX consistency and overall less work than implementing it one by one over multiple releases in n different ways.


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


Re: [I] Usages: Add means to disable code preview [netbeans]

Posted by "dschniedertuens-tc (via GitHub)" <gi...@apache.org>.
dschniedertuens-tc commented on issue #8112:
URL: https://github.com/apache/netbeans/issues/8112#issuecomment-2597227849

   I would like to support the need for that toggle. I also have no use for a code preview in this very narrow section for usages and search results.
   But what makes the new preview in the Usages window really frustrating is that it seems to interfere with the function of the Previous Occurence and Next Occurence buttons and their corresponding shortcuts. These currently no longer have any effect on the editor window but only on the preview window.
   This destroys my otherwise constantly used workflow of jumping directly to the next match in the editor.


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