Repository navigation
Integrate in the ANSI Escapes in the Eclipse Console plugin (issue #47) - #50
Conversation
mickaelistria
left a comment
There was a problem hiding this comment.
Some minor comments (not blocking for a merge, but need to be considered very soon as it may affect API and doc) inline = ansiconlogo.png is not used and can be removed.\
I'm opening a contribution request for this contribution. We'll get some guidance about how to deal with dual-license (we never had it in Platform so far, let's see what happens...)
| /** | ||
| * @since 3.12 | ||
| */ | ||
| public void removeViewerWithPageParticipant(IConsolePageParticipant participant) { |
There was a problem hiding this comment.
Does it have to be a public API? Couldn't it be internal?
There was a problem hiding this comment.
removeViewerWithPageParticipant is called from AnsiConsolePageParticipant.init
And addViewer is called from AnsiConsolePageParticipant.dispose
They add / remove a IConsolePageParticipant to
private final Map<StyledText, IConsolePageParticipant> viewers
Which I've also added to ConsolePlugin
I think that everything (map + the methods to add / remove) can be moved to AnsiConsolePageParticipant
But I am not sure about the lifespan of AnsiConsolePageParticipant.
Maybe make the viewers map static? A singleton?
The plugin I knew it can "survive" as long as it is needed.
I welcome any advice.
There was a problem hiding this comment.
Or, is there a way to tag a public method (from Java perspective) as internal for Eclipse?
Some annotation?
There was a problem hiding this comment.
I think that everything (map + the methods to add / remove) can be moved to AnsiConsolePageParticipant
Let's try that.
Maybe make the viewers map static? A singleton?
Yes, keeping a static map should be good enough.
Or, is there a way to tag a public method (from Java perspective) as internal for Eclipse?
There is @noreference in the javadoc but it's not really good to use in general. So moving code to an internal class is greatly preferred.
There was a problem hiding this comment.
Hmm, it looks like @noreference does the job.
I've added @noreference to addViewer and removeViewerWithPageParticipant, removed @since,
and reverted the Bundle-Version in MANIFEST.MF to 3.11.300.qualifier (as it was before I touched it)
But moving the two methods to AnsiConsolePageParticipant would be cleaner, if that is safe to do.
There was a problem hiding this comment.
As mentioned, @reference is to be avoided. Please move to an internal class instead.
There was a problem hiding this comment.
Done.
Moved the 2 methods + map to AnsiConsolePageParticipant
Thank you,
M
| </extension> | ||
|
|
||
| <extension point="org.eclipse.ui.preferencePages"> | ||
| <page name="%ansicon.prefpage.name" |
There was a problem hiding this comment.
Can you please set a parent category so it becomes a child of the existing console preference page?
There was a problem hiding this comment.
I'm not sure what the rules are for Eclipse.
In other projects I've worked on the one who opened the comment / issue gets to accept it and resolve it.
So I marked all entries that I've solved with "Done", and you resolve it.
If the rule is that I resolve, then I'll do that next round.
| context.consoleview.description=In Console View No newline at end of file | ||
| context.consoleview.description=In Console View | ||
|
|
||
| ansicon.prefpage.name = Ansi Console |
There was a problem hiding this comment.
"Ansi support" would be better here is we place the preference page under the more general "Console" one.
|
1 important question we need for IP clearance, as stated in the submission form: "please provide contact details for each of the contributors: name, organization, email address and/or phone number, percent of contribution authored.". Can you please provide those infos as accurately as possible? |
The console has moved to EPL 2.0 so I don't think there is any dual license if we say it is EPL OR Apcahe we should choose now to use ELP 2.0 instead of letting the user choose in the past... that's just too confusing. @mihnita would you mind to chose EPL 2.0 over Apache here, I don'T think it makes much sense to mix or let users choose here. |
We have not provided that for the recent m2-archiver adoption, so maybe you have chosen a different License type here? |
We should probably have done it for m2e-archiver as well, at least the submission form does request that information. |
Maybe but obviously it is not a requirement. And collecting that information has several problems:
So if there is a real issue, I would suspect it is raised in the CQ ... |
|
I've changed the license in the header to EPL 2 only.
I can do that for myself (but ideally not in a public place like this :-) I can't do that for the other contributors, as I don't have that info. And for the percent of the contributions, I can get them from the GitHub commits. |
|
No need to worry about the contributors anymore, I've gathered data from the "insights" of initial repo. |
Thank you. Although that is a bit deceiving. |
|
Hi all, I am in no rush, or try to put any pressure. Thanks, |
|
We're waiting from Eclipse Foundation staff to process an IP review before we can merge it: https://dev.eclipse.org/ipzilla/show_bug.cgi?id=24173 ; and it's not very fast these days... |
|
Absolutely no problem. I just wanted to be sure it is not on me to do something |
|
Seems like we're finally good to merge from IP perspective. What we need now is a green CI build and a clearer history.
|
|
Done. |
|
It looks like the org.eclipse.debug.tests suite now takes too long with this patch: ~30minutes as opposed to 1 minute for master. |
|
Sorry, this is completely unexpected. |
|
You can try |
|
Thanks. I think I got the cause. The "Console performance warning" dialog shows up. I am reading Option 1 is to tinker with the test. Option 2 would be to increase the default from 80000 to something that passes that test. |
|
To test Option 1 (increase default size) I've changed From to And it does not seem to work. The dialog still complains about 80000. For Option 2 I've changed the test limit in to That works. But my preference would be option 1. |
How "bad" is the performance? and in which cases? |
To be fair, that test is pretty old. Also, Eclipse had a bug in dark mode where the style listener was invoked a lot more than in light mode. And that seems to be recently fixed in Eclipse: I've changed my buffer test to just a bit under the default of 80000. |
|
Can we maybe just remove the Dialog? |
|
Sorry, I'll call it a day. |
|
I currently test for 2 things that I know to affect performance:
I didn't measure them in a while, but at the time the word wrap made things up to 20 times slower. We can remove the dialog before the merge, or after. In fact I had this dialog to review on my "to do" list (#47 (comment)): Your call. |
|
I think the dialog could be removed as it somewhat disturbs the user, if a higher mark is required we should change it (but not with this PR) instead of asking every user to change its preferences (by the way I always increase this anyways ...) |
|
I agree with @laeubi that we should remove the pop-up. If it is really useful, then logging is enough. |
|
OK, removed the pop-up. |
|
CI fails because of Can you please fix that? |
|
Done. Sorry, I should have seen that. |
|
Ah, clicking "Show all checks" in this PR I could have seen the link to Jenkins. |
|
Gentle ping :-) |
|
Can someone please take this over as @mickaelistria is on vacation and most likely won't be able to finish this one for 4.25 M3? |
laeubi
left a comment
There was a problem hiding this comment.
Concerns seem to be addressed, builds are green, I think we are ready to go and improvements can be done on top of this change!
|
I will review/test tomorrow before the final merge. |
SarikaSinha
left a comment
There was a problem hiding this comment.
Please provide images with 2x size also and place them under eview16 directory.
Good to have in the future:
- Tests added under org.eclipse.debug.tests.console
- Commands added in the right click after may be Word Wrap
* Bring in Ansi Console, no changes, at 3ed6a5a29b1a3d896f5d0b4e0531b4d1290077ce * Move them to the org.eclipse.ui.internal.console.ansi namespace * Disable check for localizable strings (for now) * Remove AnsiConsoleMavenLaunchParticipant. This compiles. * Glue everything together, ANSI escapes work in console * Remove the links to the standalone plugin sites * Pref page: remove the settings to check for M2E Chromatic * Externalize the localizable strings * Warning messages split into lines to prevent translation damage * Implement code review feedback * Change license header to EPL 2 only * Move two methods from ConsolePlugin to AnsiConsolePageParticipant * Remove the performance checking * Add icons to eview16 and add x2 versions
|
Thank you very much.
|
|
Thank you @mihnita We will also need the documentation to be added for the Help explaining the preferences and the Console Commands. |
|
Thank you Hannes! I'll take a shot at it over the weekend. Mihai |
|
I've tried to get the sources and setup the build environment using the Eclipse Installed Rather than debugging my setup it might be more expedient if you do the change, I would like to figure it out though, because I would like to improve coloring a bit in m2e :-) Setting The log level is still not colored with the internal Eclipse maven. Maybe we (you? me?) should open a separate issue for that (once Thank you, |
Hello!
This PR integrates AnsiConsole into
org.eclipse.ui.console.I've changed the namespace, removed
AnsiConsoleMavenLaunchParticipant, removed the links to the plugin pages, setup the proper bindings of events so that everything works like with the standalone plugin, externalized the localizable strings.This takes it to step 4 in the tracking issue:
#47
I've preserved the commit trail, as it might make the review easier.
Your call if you want to preserve or squash when merging (or ask me to squash it).
Regards,
Mihai