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.
Build 200408251800 1) Have a Tomcat output window opened (e.g. Run WebApp) and a JSP which logs to output e.g. line: <% System.out.println("test"); %> 2) Use mouse to scroll output to the beginning and immediately to the end (without releasing mouse button) Notice: the cursor has moved to the beginning of the last line 3) Run WebApp (adds a line to output) 4) ERROR A: Output window didn't move to last added line! - it's out of view. 5) Scroll to the last line 6) Click to the end of last line 7) Run WebApp (adds a line to output) 8) ERROR B: Output window didn't move again! Notice: only Ctrl-End helped to stick the end of output. It's quite annoying when scrolling through large logs with stack traces!
Try tonight's build - I put some fixes in for this stuff early this morning, just after the nightly build ran. The way the output window decides whether scrolling should be locked to the bottom is this: - On creation, lock the scrollbars to the bottom, and with every change in the document, force them there. - If the user clicks or type a key, assume there's something they want to look at, and it would not be polite to randomly move it out of view - unlock the scrollbars - If the user - Presses END - Drags the scrollbar thumb below the height of the scrollbar - Scrolls the mousewheel so that it's at the bottom (this is new as of 2AM today) re-lock the scrollbars to the bottom I may be mistaken, but I *think* my fixes early this morning took care of this problem. Reopen if not.
You're right, it should work, but only in case, that the output window is on top. Steps 1-8 don't work because run WebApp (F6) focuses "WebApp (run)" output window and brings it on top. The Tomcat's output is not scrolled automatically although the scrollbar is locked (you can check it when you reload page in browser while Tomcat's output is on top in IDE).
Please try it with today's build - I added some code to make sure that, if locked, when you change output tabs, it will ensure the scroll position is at the bottom. I just tested this, exactly as you described - reloading a web page in the browser and then checking the tomcat logs. I could not reproduce the problem.
I'm going to optimistically close this issue - the code that ensures the component is scrolled whenever tabs are changed should be solving the problem.
Well, it still doesn't work - see more detailed steps: 1) Create new WebApp (with clean userdir) 2) Run project (F6) 3) "Bundled Tomcat (5.0.28)" output & "HTTP Monitor" window appeared in IDE, application's index.jsp is viewed in browser 5) Go to "Bundled Tomcat (5.0.28)" output window 6) Scroll up using dragging scrollbar thumb Notice: using only mouse wheel works fine! 7) Scroll down to the end of output (again use dragging scrollbar thumb) Notice: Note that the cursor at the last line has moved from its end to its beginning. 8) Insert 'logging' line to the opened index.jsp at line 5: <% System.out.println("This is log test!"); %> 9) Run project (F6) 10) "WebApp (run)" output window came on top 11) Go to "Bundled Tomcat" output window again 12) ERROR: Last line with logged text is out of the view. Notice: Each repeating of steps 9-11 will result additional line in output window, but its view will not scroll to the last line automatically until you press Ctrl-End. Alternative scenario - steps 6-7 change to: 6) Use mouse wheel to scroll to the output start & Click the text in the middle (or click a link or mark a text for copying, etc.) 7) Use mouse wheel to scroll to the end of window Conclusion: The problem is, that if the cursor in output window is not at the end of the last line, the scrolling is not locked.
I did more tests, and it's OS dependent! On Fedora 2 it works fine. But it fails on WinXP with JDK 1.4.2_04 & 1.5.0-rc-b63.
Question for you - I think I have an idea what is going on: The output window is set up to stop auto-scrolling as soon as a hyperlinked line is written. Are there any hyperlinks in the output when you have this problem? If so, is there any unique text in all of them which is identifiable? For 4.1, there will be an API where each hyperlink can say "I am important enough to stop scrolling for"; for 4.0 there is only a search for words like "User program stopped", "warning", and "deprecated".
It is reproducible even without any hyperlinks in output - e.g. try last described scenario on WinXP.
Passing to Martin, who is solving something similar I believe.
Passing to Milos. New owner of output.
*** Issue 52487 has been marked as a duplicate of this issue. ***
done Checking in output2/src/org/netbeans/core/output2/ui/AbstractOutputPane.java; /cvs/core/output2/src/org/netbeans/core/output2/ui/AbstractOutputPane.java,v <-- AbstractOutputPane.java new revision: 1.37; previous revision: 1.36