diff --git a/bundles/org.eclipse.equinox.event/.project b/bundles/org.eclipse.equinox.event/.project
index 7567a04c6b6..e7146f02ab5 100644
--- a/bundles/org.eclipse.equinox.event/.project
+++ b/bundles/org.eclipse.equinox.event/.project
@@ -11,17 +11,7 @@
- org.eclipse.pde.ManifestBuilder
-
-
-
-
- org.eclipse.pde.SchemaBuilder
-
-
-
-
- org.eclipse.pde.ds.core.builder
+ org.eclipse.pde.BndBuilder
@@ -32,7 +22,7 @@
- org.eclipse.pde.PluginNature
+ org.eclipse.pde.BndNature
org.eclipse.jdt.core.javanature
org.eclipse.pde.api.tools.apiAnalysisNature
diff --git a/bundles/org.eclipse.equinox.event/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.event/META-INF/MANIFEST.MF
deleted file mode 100644
index 1fb57414a7c..00000000000
--- a/bundles/org.eclipse.equinox.event/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,28 +0,0 @@
-Bundle-ManifestVersion: 2
-Bundle-Name: %bundleName
-Bundle-Version: 1.6.200.qualifier
-Bundle-SymbolicName: org.eclipse.equinox.event
-Import-Package: org.eclipse.osgi.framework.eventmgr;version="1.1.0",
- org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.6.0",
- org.osgi.service.event;version="[1.3,1.5)",
- org.osgi.service.log;version="1.3.0",
- org.osgi.util.tracker;version="1.5.0"
-Export-Package: org.eclipse.equinox.internal.event;x-internal:=true,
- org.eclipse.equinox.internal.event.mapper;x-internal:=true
-Bundle-Vendor: %bundleVendor
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Service-Component: OSGI-INF/component.xml
-Bundle-ActivationPolicy: lazy
-Provide-Capability:
- osgi.service;
- objectClass:List="org.osgi.service.event.EventAdmin";
- uses:="org.osgi.service.event",
- osgi.implementation;
- osgi.implementation="osgi.event";
- uses:="org.osgi.service.event";
- version:Version="1.4"
-Require-Capability: osgi.extender;
- filter:="(&(osgi.extender=osgi.component)(version>=1.0)(!(version>=2.0)))"
-Automatic-Module-Name: org.eclipse.equinox.event
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 fe6b70eb773..20e08a2e812 100644
--- a/bundles/org.eclipse.equinox.event/build.properties
+++ b/bundles/org.eclipse.equinox.event/build.properties
@@ -11,15 +11,6 @@
# Contributors:
# IBM Corporation - initial API and implementation
###############################################################################
-bin.includes = META-INF/,\
- plugin*.properties,\
- about.html,\
- .,\
- OSGI-INF/component.xml,\
- OSGI-INF/
-output.. = bin/
-src.includes = about.html
-source.. = src/
## Configuration for TCK tests to execute for this project
pom.model.property.tck.artifact = org.osgi.test.cases.event
\ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.event/pde.bnd b/bundles/org.eclipse.equinox.event/pde.bnd
new file mode 100644
index 00000000000..6b362ceb78c
--- /dev/null
+++ b/bundles/org.eclipse.equinox.event/pde.bnd
@@ -0,0 +1,18 @@
+Bundle-Name: %bundleName
+Bundle-Version: 1.6.200.qualifier
+Bundle-SymbolicName: org.eclipse.equinox.event
+Bundle-Vendor: %bundleVendor
+Bundle-Localization: plugin
+Bundle-ActivationPolicy: lazy
+Automatic-Module-Name: org.eclipse.equinox.event
+Export-Package: org.eclipse.equinox.internal.event;x-internal:=true, \
+ org.eclipse.equinox.internal.event.mapper;x-internal:=true
+
+-dsannotations-options: version;maximum=1.3
+-runee: JavaSE-1.8
+-includeresource: plugin.properties,\
+ about.html
+
+-buildpath: org.eclipse.osgi, \
+ org.osgi.service.event
+
\ No newline at end of file
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..d10dbf9f8b4 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, 2023 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,18 +10,22 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Christoph Läubrich - switch to annotations
*******************************************************************************/
package org.eclipse.equinox.internal.event;
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 +33,7 @@ void activate(BundleContext context) {
eventRedeliverer.open();
}
+ @Deactivate
void deactivate(BundleContext context) {
eventRedeliverer.close();
eventAdmin.stop();