Repository navigation
Conversation
| io.printWithAction(" = ", null, false); | ||
| if (refValue instanceof ObjectVariable obj && !isNull(obj)) { | ||
| var sessionRef = new WeakReference<>(session); | ||
| io.printWithAction(obj.getValue(), () -> { |
There was a problem hiding this comment.
The hyperlink captures an ObjectLocalVariable wrapper that NetBeans reuses and updates. When a loop assigns another object to the same local, earlier links retain their original text but target the newer object. A temporary native test reproduced this: the first hyperlink’s object ID changed from 89 to 97. Capture a stable object reference when creating the link.
There was a problem hiding this comment.
..temporary native test reporduced this ...
I don't understand. What is the test doing? True tests were missing, but I've just added one in 15eb8c4. It passes. What's the problem with the ObjectLocalVariable? Following code seems to be logging value of fac array properly:
There was a problem hiding this comment.
Sorry for editing your comment, newly using GH PR extension in VS Code and it has some editing specialities....
LogpointReviewTests.zip this is quick and dirty review regression test.
cp LogpointReviewTest.java to java/debugger.jpda.ui/test/unit/src/org/netbeans/modules/debugger/jpda/ui/
cp LogpointReviewMain.java to java/debugger.jpda.ui/test/unit/src/test/
Set: review_jvm_flags="$(cat nbbuild/jms-config/{base,desktop,compiler}.flags | tr '\n' ' ')"
Run then:
ANT_OPTS=-Djava.awt.headless=true \
ant -f java/debugger.jpda.ui/build.xml test-unit \
-Dtest.includes='**/LogpointReviewTest.class' \
-Dtest.qa-functional.src.dir=/tmp/pr9732-no-tests \
"-Dtest.run.args=-ea -Djava.awt.headless=true -XX:+IgnoreUnrecognizedVMOptions $review_jvm_flags"
Should fail with something like: Earlier hyperlink should still target the first object expected:<89> but was:<97>
ID/numbers can differ for your run. Hope this helps
| ) | ||
| @ActionReferences({ | ||
| @ActionReference(path = "Editors/text/x-java/Popup", position = 1900), | ||
| @ActionReference(path = "Editors/AnnotationTypes/BreakpointActionsWithToggleNew", position = 400) |

{locals}directive insetPrintTextmessage is recognized