apache / apache/netbeans

"Action items" panel doesn't show all warnings about file being edited

Open
#4,790 9 comments 0 reactions 0 assignees View on GitHub
hints Java kind:bug
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

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

Contributor guide

Open the contributing guide

Research direction

The payload names no source files or tests. First reproduce the examples in Apache NetBeans 15 and trace how the Action items panel receives Java editor warnings; done means the panel displays the unused-variable and unused-method warnings alongside the serialization warnings and TODO item.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.