antlr / antlr/antlr4

Guard against null tree more in TreeViewer.

Open
#555 0 comments 0 reactions 0 assignees View on GitHub
comp:runtime type:bug
Dominant language
Java
Stars
19k
Forks
3.5k
PR merge metrics
No merged PRs in 30d

Description

E.g., getScaledTreeSize refs treeLayout, which is null if no tree.

Also add a way like getTree so we can test before invoking viewer methods.

Contributor guide

Open the contributing guide

Research direction

Locate TreeViewer and inspect getScaledTreeSize along with the other viewer methods that may be called when no tree exists. Check how a null tree is represented, then add coverage showing the viewer can be checked before methods are invoked and handles the no-tree case safely.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.