You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/10/14 11:40:09 UTC

[GitHub] [netbeans] negora opened a new issue, #4790: The "Action items" panel doesn't show all warnings about file being edited

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

   ### Apache NetBeans version
   
   Apache NetBeans 15
   
   ### What happened
   
   The *Action items* panel doesn't show all warnings about the file that is currently being edited. I'm referring to Java source files only. I don't know whether this happens with other file types.
   
   What I know for sure is that it depends on the type of warning. Some types are shown, whereas others aren't.
   
   
   ### How to reproduce
   
   
   ### Example no. 1.
   
   Consider this code:
   
   ```java
   public class MyClass {
   
       // TODO: pending task
       private void test (int x) {
       }
   
   }
   ```
   
   The editor shows 2 warnings:
   
   * *Variable x is never read*
   * *test is never used*
   
   ![image](https://user-images.githubusercontent.com/2098654/195010333-bea82cf6-f662-4e3a-a7fc-81a4830ce42c.png)
   
   However, the *Action items* panel doesn't show any warning, only the comment about the pending task:
   
   ![image](https://user-images.githubusercontent.com/2098654/195010680-1ead723c-2e6a-4486-99dc-cb09f2339e12.png)
   
   
   ### Example no. 2:
   
   Consider this code:
   
   ```java
   public final class Artist
   		implements Serializable {
   
   	private Set<String> nicknames;
   
   }
   ```
   
   This code triggers 3 warnings in the editor:
   
   * *[serial] serializable class com.negora.app.Artist has no definition of serialVersionUID*
   * *[serial] non-transient instance field of a serializable class declared with a non-serializable type*
   * *Variable nicknames is never read*
   
   Of all these 3 warnings, only the 2 related to serialization are shown in the panel:
   
   ![image](https://user-images.githubusercontent.com/2098654/195388599-0db19613-bad5-4a20-a1cb-5340dbc2536e.png)
   
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   Debian GNU/Linux 11.5 (Bullseye)
   
   ### JDK
   
   OpenJDK Runtime Environment (build 17.0.4+8-Debian-1deb11u1)
   
   ### Apache NetBeans packaging
   
   Apache NetBeans binary zip
   
   ### Anything else
   
   This has been happening during many versions. Honestly, I don't remember if these warning types were ever shown in the *Action items* panel. But it would be really useful if all them were shown, regardless of their type.
   
   To me, it's easy to overlook the yellow stripes in the right margin of the editor. The panel shows those warnings at a glance and, in addition, allows to group and filter them.
   
   Thank you!
   
   
   ### Are you willing to submit a pull request?
   
   No
   
   ### Code of Conduct
   
   Yes


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


[GitHub] [netbeans] Chris2011 commented on issue #4790: "Action items" panel doesn't show all warnings about file being edited

Posted by GitBox <gi...@apache.org>.
Chris2011 commented on issue #4790:
URL: https://github.com/apache/netbeans/issues/4790#issuecomment-1280743500

   In PHP files it seems to work correctly for example syntax errors :D. FYI


-- 
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] Chris2011 commented on issue #4790: "Action items" panel doesn't show all warnings about file being edited

Posted by GitBox <gi...@apache.org>.
Chris2011 commented on issue #4790:
URL: https://github.com/apache/netbeans/issues/4790#issuecomment-1297456465

   Of course there is no difference between warnings and errors, but there are differences between hints with and without fixes. Hints can als be suggestions so I thought that this is one problem but just guessing.
   
   Yes, often I dunno which is the right way to do it but anyway, this is another topic.


-- 
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 issue #4790: "Action items" panel doesn't show all warnings about file being edited

Posted by GitBox <gi...@apache.org>.
mbien commented on issue #4790:
URL: https://github.com/apache/netbeans/issues/4790#issuecomment-1297470502

   A fix is just an optional part of a hint. Hints can be used as inspections and/or code transformations based on their 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] mbien commented on issue #4790: "Action items" panel doesn't show all warnings about file being edited

Posted by GitBox <gi...@apache.org>.
mbien commented on issue #4790:
URL: https://github.com/apache/netbeans/issues/4790#issuecomment-1297383187

   as a minimum we should rename a few of the check boxes like "Hints-based tasks" since it could be clearer what that is supposed to enable - to me at least ;)


-- 
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 issue #4790: "Action items" panel doesn't show all warnings about file being edited

Posted by GitBox <gi...@apache.org>.
mbien commented on issue #4790:
URL: https://github.com/apache/netbeans/issues/4790#issuecomment-1297452326

   there isn't really a difference between warnings and errors. It all depends where they come from. NB has lots of potential sources. For example some java errors or warnings could come directly from javac. 
   
   Those are not from code inspections. There is another bug which complains that deprecation warnings don't show for your code #4604 - well because that is how javac works, it only shows them for JDK code usage - not for third party `@deprecated`. We would have to write a hint for that to inspect all other deprecation warnings (which isn't that difficult btw).
   
   Also keep in mind editor hints are updated as you are typing. While the java compiler errors and warnings in the action items window only update when you safe the file (since that is when it compiles).
   
   HTML hints are probably registered via `ide/csl.api org.netbeans.modules.csl.core.TasklistStateBackdoor`
   
   NB is an old IDEs which many ways how to do the same thing. Unfortunately features were never removed which causes so much code to still use old mechanisms.


-- 
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 issue #4790: "Action items" panel doesn't show all warnings about file being edited

Posted by GitBox <gi...@apache.org>.
mbien commented on issue #4790:
URL: https://github.com/apache/netbeans/issues/4790#issuecomment-1291186308

   The "Hints-based tasks" seem to be for editors based on the `ide/csl.api` `org.netbeans.modules.csl.core.TasklistStateBackdoor`
   
   The "Compiler Errors" checkbox is registered via `ide/parsing.indexing`  `org.netbeans.modules.parsing.impl.indexing.errors.TaskProvider`
   
   The "Whitelist violations" are registered in `java/java.editor` `org.netbeans.modules.java.editor.whitelist.WhiteListCheckTask`
   (even after looking at the code I still have no clue what usecase this is for)
   
   Tried my best with full text search but couldn't find anything for Java hints. Which would explain why they are not there :)


-- 
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 issue #4790: "Action items" panel doesn't show all warnings about file being edited

Posted by GitBox <gi...@apache.org>.
mbien commented on issue #4790:
URL: https://github.com/apache/netbeans/issues/4790#issuecomment-1279018043

   it appears to show TODOs, javac buildin warnings and errors. But editor hints/inspections are not listed.


-- 
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] negora commented on issue #4790: "Action items" panel doesn't show all warnings about file being edited

Posted by GitBox <gi...@apache.org>.
negora commented on issue #4790:
URL: https://github.com/apache/netbeans/issues/4790#issuecomment-1297354885

   @mbien Thank you for investigating this issue. That information looks interesting.
   
   Besides that, I knew that years ago I had read about this same issue somewhere, but I didn't remember exactly where. I've made a quick search and I think that I've found such bug report: [Bug 236431 - action items does not show hints and warnings ](https://bz.apache.org/netbeans/show_bug.cgi?id=236431). This dates back to NetBeans 7.4.
   
   According to that thread, Geertjan Wielenga wrote an article about that topic in the Oracle blog. Here there is a copy taken from the Internet Archive: [Towards a Centralized Dashboard for Coding Problems](https://web.archive.org/web/20170313122328/https://blogs.oracle.com/geertjan/entry/towards_a_centralized_dashboard_for).
   
   I see 2 important points in it:
   
   * The *Action items* window was originally the *Task list* window. So it seems that it was repurposed later to do more things. That may explain its peculiar behavior.
   
   * Jan Lahoda wrote a plug-in that showed **all warnings** in the *Action items* window. I don't know if it was just for the current file or for the whole project. But such plug-in seems to have vanished. I've checked the [Lahoda's GitHub profile](https://github.com/lahodaj) but I've not had any luck. **I guess that plug-in might be the key to know what is needed.**
   
   In my opinion, it would be enough if NetBeans IDE were able to show the warnings of the current file. If we need a detailed analysis of the whole project, we can always run *Source → Inspect...*
   
   Indeed, I think that's the way the *Problems* panel of IntelliJ works nowadays:
   
   * For the current file: shows errors and warnings.
   * For the whole project: shows errors only. Do you want warnings? Run an inspection.
   


-- 
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] Chris2011 commented on issue #4790: "Action items" panel doesn't show all warnings about file being edited

Posted by GitBox <gi...@apache.org>.
Chris2011 commented on issue #4790:
URL: https://github.com/apache/netbeans/issues/4790#issuecomment-1297432841

   I think there is a difference between hints with fixes and just hints as warnings. I registered those warnings via nb-eslint plugin. Here you can have a look: https://github.com/joakim-eriksson/nb-eslint I don't know yet, where exactly is the code there or showing the warnings inside of the Actions window but in this plugin it works and also in the sonarlint plugin for NetBeans: https://github.com/philippefichet/sonarlint4netbeans


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