Remove BundleActivator from org.eclipse.jface.text#3917
Remove BundleActivator from org.eclipse.jface.text#3917vogella wants to merge 1 commit intoeclipse-platform:masterfrom
Conversation
d6ad692 to
8ac8f1d
Compare
The Activator class only held a single ExecutorService used by AsyncCompletionProposalPopup. Neither the start() hook nor the stored BundleContext were used. Convert the class to a final holder with a static, lazily initialized ExecutorService (daemon threads, no JVM liveness impact) and drop the Bundle-Activator header from the manifest. The public surface (Activator.ID and Activator.getExecutor()) is preserved so existing API consumers continue to compile and run.
8ac8f1d to
71ef6f9
Compare
laeubi
left a comment
There was a problem hiding this comment.
The executor is now never shut down.
|
@vogella please review and validate AI generated (I assume it is) code prior to submission! Also looking at the git-history would have revealed that the activator has a purpose, that is ensure proper cleanup of the executor. |
|
My main concern here is that the Activator is exposed as API, hence abandan the PR |
Summary
The
org.eclipse.jface.textBundleActivatorexisted only to lazily construct a singleExecutorServiceconsumed byAsyncCompletionProposalPopup. The bundle context was never used, and there is exactly one internal caller ofActivator.getExecutor().This PR converts the class to a final holder with a static, lazily initialized executor (via the class‑holder idiom) and removes
Bundle-Activatorfrom the manifest.Activator.IDandActivator.getExecutor()are preserved, so the@since 3.29public surface is unchanged.stop()shutdown hook has no JVM liveness impact.Bundle-ActivationPolicy: lazyis kept as is.Motivation
Small reduction in
BundleActivatorusage across Platform UI. No observable startup time impact expected (the previous activator showed0 msin startup traces); the change is primarily a code‑quality and modernization step, intended as a template for similar trivial activators.Test plan
mvn clean verify -pl :org.eclipse.jface.text -Pbuild-individual-bundlespasses.AsyncCompletionProposalPopup).Activator.IDandActivator.getExecutor()remain available).