Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 343023 - Clear the initial stack trace console message on the first edit
Summary: Clear the initial stack trace console message on the first edit
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.7   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: 4.12 M3   Edit
Assignee: Paul Pazderski CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-15 18:06 EDT by Ewgeni Grigorov CLA
Modified: 2019-05-21 04:44 EDT (History)
8 users (show)

See Also:


Attachments
possible fix (1.90 KB, patch)
2011-04-15 18:08 EDT, Ewgeni Grigorov CLA
curtis.windatt.public: iplog+
curtis.windatt.public: review-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ewgeni Grigorov CLA 2011-04-15 18:06:13 EDT
Build Identifier: CVS, 16.04.2011

Initially, the idea comes from:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=77730#c3
I think that it's very useful, because that behavior will save a user operation.

Reproducible: Always

Steps to Reproduce:
To reproduce, just paste a stack trace in the initialized stack trace console. The initial console message will remain.
Comment 1 Ewgeni Grigorov CLA 2011-04-15 18:08:17 EDT
Created attachment 193410 [details]
possible fix

The attached fix is based on DocumentListener, which is added on the first initialization and removed after the first usage.
Comment 2 Curtis Windatt CLA 2012-11-20 12:34:26 EST
Fixed as part of the debug patch day.  Thanks for the contribution!

http://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/commit/?id=07c5f52b120128c0562ef7dc7ed2aed8388a2e68
Comment 3 Michael Rennie CLA 2012-12-11 15:24:18 EST
Verified in:

Version: 4.3.0
Build id: I20121210-2000
Comment 4 Dani Megert CLA 2012-12-17 05:56:57 EST
There a corner case which is now broken, see bug 396734.
Comment 5 Curtis Windatt CLA 2013-01-09 16:03:09 EST
None of the fixes proposed here or in bug 396734 have been satisfactory.  At this point I can't put more time into debugging the console document adapter for this trivial feature.  Hopefully someone from the community can make an attempt at a better fix.

Reverted fix:
http://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/commit/?id=1ddf9e9d7369dfd82cf95476a6744906c6bc48d2
Comment 6 Akihiko Takajo CLA 2013-04-19 06:01:11 EDT
does not work with 4.3M6
Comment 7 Dani Megert CLA 2013-04-19 06:08:15 EDT
(In reply to comment #6)
> does not work with 4.3M6

Please read comment 5.
Comment 8 Eclipse Genie CLA 2019-05-01 17:49:16 EDT
New Gerrit change created: https://git.eclipse.org/r/141483
Comment 9 Paul Pazderski CLA 2019-05-01 17:49:51 EDT
(In reply to Eclipse Genie from comment #8)
> New Gerrit change created: https://git.eclipse.org/r/141483

This change implements the initial clear including a bunch of test cases.

If stack trace console is loaded with initial default content the first user edit will be modified as if user selected the initial content before typing, pasting, whatever.
A programmatically content change before first user edit is recognized and  the content will not cleaned on following user edits.
If content was explicit set and this content is equal to the default content it will not be removed on first user edit. I.e. cleaning depends on how content was set not on actual content.
Comment 11 Sarika Sinha CLA 2019-05-17 04:10:29 EDT
Thanks Paul! Please add a N&N entry for this.
Comment 12 Sarika Sinha CLA 2019-05-20 02:53:51 EDT
(In reply to Sarika Sinha from comment #11)
> Thanks Paul! Please add a N&N entry for this.

@Paul!
N&N needs to go by Wendnesday may 22nd.
Comment 13 Eclipse Genie CLA 2019-05-20 04:29:54 EDT
New Gerrit change created: https://git.eclipse.org/r/142419
Comment 15 Sarika Sinha CLA 2019-05-21 04:44:29 EDT
Verified using Build id: I20190520-1805.