diff --git a/bundles/org.eclipse.equinox.ds.tests/.gitignore b/bundles/org.eclipse.equinox.ds.tests/.gitignore index f02e6a763a3..1521b11cf72 100644 --- a/bundles/org.eclipse.equinox.ds.tests/.gitignore +++ b/bundles/org.eclipse.equinox.ds.tests/.gitignore @@ -1 +1,2 @@ /scr_test +OSGI-INF/org.eclipse.equinox.*.xml diff --git a/bundles/org.eclipse.equinox.ds.tests/OSGI-INF/org.eclipse.equinox.ds.tests.LazyServiceComponentActivationDeadLockTest$Component1.xml b/bundles/org.eclipse.equinox.ds.tests/OSGI-INF/org.eclipse.equinox.ds.tests.LazyServiceComponentActivationDeadLockTest$Component1.xml deleted file mode 100644 index 44f687c323c..00000000000 --- a/bundles/org.eclipse.equinox.ds.tests/OSGI-INF/org.eclipse.equinox.ds.tests.LazyServiceComponentActivationDeadLockTest$Component1.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/bundles/org.eclipse.equinox.ds.tests/OSGI-INF/org.eclipse.equinox.ds.tests.LazyServiceComponentActivationDeadLockTest$Component2.xml b/bundles/org.eclipse.equinox.ds.tests/OSGI-INF/org.eclipse.equinox.ds.tests.LazyServiceComponentActivationDeadLockTest$Component2.xml deleted file mode 100644 index 64489925cd1..00000000000 --- a/bundles/org.eclipse.equinox.ds.tests/OSGI-INF/org.eclipse.equinox.ds.tests.LazyServiceComponentActivationDeadLockTest$Component2.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/bundles/org.eclipse.equinox.ds.tests/OSGI-INF/org.eclipse.equinox.ds.tests.LazyServiceComponentActivationDeadLockTest$Component3.xml b/bundles/org.eclipse.equinox.ds.tests/OSGI-INF/org.eclipse.equinox.ds.tests.LazyServiceComponentActivationDeadLockTest$Component3.xml deleted file mode 100644 index 1319cf7230e..00000000000 --- a/bundles/org.eclipse.equinox.ds.tests/OSGI-INF/org.eclipse.equinox.ds.tests.LazyServiceComponentActivationDeadLockTest$Component3.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/bundles/org.eclipse.equinox.ds.tests/OSGI-INF/org.eclipse.equinox.ds.tests.LazyServiceComponentActivationDeadLockTest$Component4$AwaitComponent5Activation.xml b/bundles/org.eclipse.equinox.ds.tests/OSGI-INF/org.eclipse.equinox.ds.tests.LazyServiceComponentActivationDeadLockTest$Component4$AwaitComponent5Activation.xml deleted file mode 100644 index 2609119d768..00000000000 --- a/bundles/org.eclipse.equinox.ds.tests/OSGI-INF/org.eclipse.equinox.ds.tests.LazyServiceComponentActivationDeadLockTest$Component4$AwaitComponent5Activation.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/bundles/org.eclipse.equinox.ds.tests/OSGI-INF/org.eclipse.equinox.ds.tests.LazyServiceComponentActivationDeadLockTest$Component4.xml b/bundles/org.eclipse.equinox.ds.tests/OSGI-INF/org.eclipse.equinox.ds.tests.LazyServiceComponentActivationDeadLockTest$Component4.xml deleted file mode 100644 index 30db282c7ac..00000000000 --- a/bundles/org.eclipse.equinox.ds.tests/OSGI-INF/org.eclipse.equinox.ds.tests.LazyServiceComponentActivationDeadLockTest$Component4.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/bundles/org.eclipse.equinox.ds.tests/OSGI-INF/org.eclipse.equinox.ds.tests.LazyServiceComponentActivationDeadLockTest$Component5$ActivationStartedIndicator.xml b/bundles/org.eclipse.equinox.ds.tests/OSGI-INF/org.eclipse.equinox.ds.tests.LazyServiceComponentActivationDeadLockTest$Component5$ActivationStartedIndicator.xml deleted file mode 100644 index fcc7811c4a9..00000000000 --- a/bundles/org.eclipse.equinox.ds.tests/OSGI-INF/org.eclipse.equinox.ds.tests.LazyServiceComponentActivationDeadLockTest$Component5$ActivationStartedIndicator.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/bundles/org.eclipse.equinox.ds.tests/OSGI-INF/org.eclipse.equinox.ds.tests.LazyServiceComponentActivationDeadLockTest$Component5.xml b/bundles/org.eclipse.equinox.ds.tests/OSGI-INF/org.eclipse.equinox.ds.tests.LazyServiceComponentActivationDeadLockTest$Component5.xml deleted file mode 100644 index ae5faaa6a34..00000000000 --- a/bundles/org.eclipse.equinox.ds.tests/OSGI-INF/org.eclipse.equinox.ds.tests.LazyServiceComponentActivationDeadLockTest$Component5.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/bundles/org.eclipse.equinox.event/.gitignore b/bundles/org.eclipse.equinox.event/.gitignore new file mode 100644 index 00000000000..01bd26985f0 --- /dev/null +++ b/bundles/org.eclipse.equinox.event/.gitignore @@ -0,0 +1 @@ +/OSGI-INF/org.eclipse.equinox.*.xml diff --git a/bundles/org.eclipse.equinox.event/.settings/org.eclipse.pde.ds.annotations.prefs b/bundles/org.eclipse.equinox.event/.settings/org.eclipse.pde.ds.annotations.prefs new file mode 100644 index 00000000000..38f9eecff8e --- /dev/null +++ b/bundles/org.eclipse.equinox.event/.settings/org.eclipse.pde.ds.annotations.prefs @@ -0,0 +1,7 @@ +dsVersion=V1_3 +eclipse.preferences.version=1 +enabled=true +generateBundleActivationPolicyLazy=true +path=OSGI-INF +validationErrorLevel=error +validationErrorLevel.missingImplicitUnbindMethod=error diff --git a/bundles/org.eclipse.equinox.event/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.event/META-INF/MANIFEST.MF index 9f43017424a..348f7a3288b 100644 --- a/bundles/org.eclipse.equinox.event/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.equinox.event/META-INF/MANIFEST.MF @@ -13,7 +13,7 @@ Export-Package: org.eclipse.equinox.internal.event;x-internal:=true, Bundle-Vendor: %bundleVendor Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-17 -Service-Component: OSGI-INF/component.xml +Service-Component: OSGI-INF/org.eclipse.equinox.internal.event.EventComponent.xml Bundle-ActivationPolicy: lazy Provide-Capability: osgi.service; diff --git a/bundles/org.eclipse.equinox.event/OSGI-INF/component.xml b/bundles/org.eclipse.equinox.event/OSGI-INF/component.xml deleted file mode 100644 index 89812d4617c..00000000000 --- a/bundles/org.eclipse.equinox.event/OSGI-INF/component.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/bundles/org.eclipse.equinox.event/build.properties b/bundles/org.eclipse.equinox.event/build.properties index 10f84b53b76..c109c59603c 100644 --- a/bundles/org.eclipse.equinox.event/build.properties +++ b/bundles/org.eclipse.equinox.event/build.properties @@ -12,10 +12,9 @@ # IBM Corporation - initial API and implementation ############################################################################### bin.includes = META-INF/,\ - plugin*.properties,\ + plugin.properties,\ about.html,\ .,\ - OSGI-INF/component.xml,\ OSGI-INF/ output.. = bin/ src.includes = about.html diff --git a/bundles/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/EventComponent.java b/bundles/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/EventComponent.java index e7efe8d5908..88d7c2a3333 100644 --- a/bundles/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/EventComponent.java +++ b/bundles/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/EventComponent.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2018 IBM Corporation and others. + * Copyright (c) 2009, 2024 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -15,13 +15,16 @@ import org.eclipse.equinox.internal.event.mapper.EventRedeliverer; import org.osgi.framework.BundleContext; +import org.osgi.service.component.annotations.*; import org.osgi.service.event.Event; import org.osgi.service.event.EventAdmin; +@Component(service = EventAdmin.class) public class EventComponent implements EventAdmin { private EventRedeliverer eventRedeliverer; private EventAdminImpl eventAdmin; + @Activate void activate(BundleContext context) { eventAdmin = new EventAdminImpl(context); eventAdmin.start(); @@ -29,6 +32,7 @@ void activate(BundleContext context) { eventRedeliverer.open(); } + @Deactivate void deactivate(BundleContext context) { eventRedeliverer.close(); eventAdmin.stop();