Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #91: Stack trace detection not working in colored console #174

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mihnita
Copy link

@mihnita mihnita commented Jan 16, 2023

What it does

Removes the ANSI escape sequences before detecting links.

How to test

See eclipse-platform/eclipse.platform#535

The easiest way to reproduce was to create a new project and println the stack trace.

Attached a small file reproducing the problem.
I've tested with ANSI Support enabled and disabled, and I've checked that the links work and jump at the proper line.

Author checklist

Main.java.zip

@mihnita
Copy link
Author

mihnita commented Jan 16, 2023

Clean version of the closed PR eclipse-platform/eclipse.platform.debug#148 (identical code, work done in a feature branch instead of main)

@mihnita
Copy link
Author

mihnita commented Jan 16, 2023

Note: I don't insist on this PR, and I agree with this approach:

I think we should not apply a quick-fix here as it unnecessary complicates things. The stacktraces are just one example and I think the ANSI console should best "hide" the ANSI nature that is when I copy/paste things, copy without escapes should be default and for API it should return a plain text and all else (HTML, RTF, with escapes) should be special cases one needs to explcitily trigger.

But it looks like I need to tinker (quite aggressively?) with ConsoleDocument, and in general change how things are implemented now.
So I don't think I can do it in time for the next release (2023-03).

I will 100% respect your decision if you think it is best to do this patchy fix, or live with the bug for another release
(or more? I hope not, but one never knows)

Thank you,
M.

@jukzi
Copy link
Contributor

jukzi commented Dec 4, 2024

Hi @mihnita, i think that PR is valid. Can you please resolve the conflict and add a junit test? See JavaDebugStackTraceConsoleTest for example.

@mihnita
Copy link
Author

mihnita commented Dec 5, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants