This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Support for items in /list | ||
---|---|---|---|
Product: | java | Reporter: | Geertjan Wielenga <geertjan> |
Component: | JShell | Assignee: | Svata Dedic <sdedic> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | Dev | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Geertjan Wielenga
2016-10-07 21:25:49 UTC
This is related to the bug that’s already filed about /# executing the wrong snippet. I was looking at JShell in NetBeans again this morning and noticed your prompt is [#] -> The first # displayed is 9, which I assume is because it’s treating JShell’s default imports and printf definition as 1-8. That is different from how JShell does it, where the first snippet you enter is #1. Another difference I noticed is that command-line JShell numbers only VALID snippets sequentially. So, for example, if you enter a valid snippet, followed by a snippet with an error, followed by another valid snippet, the two valid snippets are numbered 1 and 2 and the invalid one is e1. If you then execute /2, the second VALID snippet is recalled, not the one with the error that was typed second. In NetBeans, /# always recalls the snippet based on the number in the [#] -> prompt. I believe this work the same as in command-line JShell. /n history command should now reexecute snippet "n" (as seen in /list command). Prompt numbers correspond to snippet numbers. |