-
Notifications
You must be signed in to change notification settings - Fork 227
Cleanup of unused code and marks deprecated methods, constants for removal. #3495
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
Cleanup of unused code and marks deprecated methods, constants for removal. #3495
Conversation
838532a to
28a802b
Compare
|
@akurtakov |
|
I would look again in further deprecations (unless driven by actual breakage) after release. |
|
Thanks! Looks like you’ve got your hands full. |
|
@vogella |
|
IIRC I also tried to delete these internal methods a while ago but @merks or @BeckerWdf had an issue with that. I might be wrong here it is a while ago. Ed and Matthias, are you ok with this change? |
merks
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't. EMF uses this and EMF supports ancient versions of Eclipse. Oomph as well, though it could more easily adjust because it does support quite so ancient things. When important functionality is unavailable via APIs, the following is what happens.
In other words, it gets used anyway with Eclipse project itself being the trend setter.
So please no, don't delete things form HTMLPrinter. If the Eclipse project decided it was okay for PDE and JDT to use it, then you can assume the ecosystem is using it, and deleting a few methods is more likely to break the ecosystem than it is to provide any kind of improvement.
I'd need to investigate if EMF can remove it now; I think the oldest support is Photon and the StringBuillder things were available for that I think, and now that minimum Java 8 is supported, probably EMF can move. So if you really, really feel a compelling need, mark these things are deprecated for removal instead (with proper references to the replacement) because this is effectively API despite being internal as evidenced by PDE and JDT treating it as API and hence likely by anyone else wishing to produce rich hover like the Platform.
While I don't want to be overly negative, with so very many open bugs to fix and so very many features requests open, maybe we could avoid things like this that literally (for my projects) provide negative value.
|
I'm very proud of myself that I rememebered correct that @merks had an issue with this deletion. No need to thank me for that. :-) |
Yes you should be proud and I should thank you. ❣️ |
|
FYI, I have tested switching EMF to the StringBuilder methods and building against Photon. That succeeds so I will apply the changes. Also I will change Oomph. So I suggest to treat HTMLPrinter as API, marking the methods for removal like the rest of the PR. That will give time for the EMF, Oomph, and any other fixes to percolate though the system before the methods are actually removed. |
fc1ab68 to
0e27a4d
Compare
@merks Although I couldn’t determine the exact reason, my instinct was telling that HTMLPrinter.java is a key internal component, and removing it could have unintended side effects and that was the first reason i requested a review from akurtakov. |
0e27a4d to
f446195
Compare
merks
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. Sorry for my harsh comments.
|
@deepika-u Thanks for doing these cleanups. This is an important task for future maintenance and enhancements. Unfortunately, it’s also one of those tasks where you usually only get negative feedback if something breaks. I’ve done my fair share of cleanups in the past and got a lot of bashing for it. :-) But without regular cleanups, our codebase would decay and make future development harder. So, thank you for working on this. |
|
The failing tests seem to be #1517 |
No problem, atleast some one should do at some time. So i did some this time. Thats it. |
f446195 to
db8c1c4
Compare
Thanks for the motivation again, right now i have already moved to the other side of the coin. So i am on the right path already. |
db8c1c4 to
a6ff615
Compare
I only merge things if all checks are green, can you re-trigger the build? I'm actively working on reducing flacky tests but this one may have been an infrastructure issue. |
|
New warning: The method addCSSToHTMLFragment(String) from the type new BrowserInformationControl(){} is never used locally |
As part of this pr, we did a change in RevisionPainter.java as well as part of this cleanup. Since its internal and no reference to the setInformation() - it was removed and addCSSToHTMLFragment() is being called in setInformation() which is now throwing this compiler warning. |
a6ff615 to
e87b1e4
Compare
|
I vote for removing the unused private method. |
Thank you and i am also with you as it is internal file. Will wait for @merks opinion. |
7d2f79f to
fa4a3d7
Compare
|
Making the above changes to RevisionPainter.java will be like the earlier change of HTMLPrinter.java file change so marking this also for removal as of now (Because this change is again dependent on HTMLPrinter.java change - i just tried). @vogella : Thanks for sharing your opinion on this too. |
fa4a3d7 to
745252f
Compare
|
Thanks @deepika-u |
|
@deepika-u @vogella it seems like this was merged without properly checking for consumers of those methods inside the SDK. See, for example this triggered auto-cleanup that shows a suppressed deprecation for one of the touched methods: https://github.com/eclipse-platform/eclipse.platform/pull/2268/files Would you please check the SDK for such cases and adapt where necessary? In my opinion, usages (at least in the SDK) should be replaced before marking a method as deprecated for removal. Please also see Ed's comment in the same direction: #3467 (comment) |
|
Created a revert for that change -> #3538 |



No description provided.