Skip to content

Commit

Permalink
Move org.eclipse.equinox.event to use automatic manifest generation
Browse files Browse the repository at this point in the history
  • Loading branch information
laeubi committed Aug 19, 2023
1 parent cfed903 commit 7015751
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 75 deletions.
14 changes: 2 additions & 12 deletions bundles/org.eclipse.equinox.event/.project
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,7 @@
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ds.core.builder</name>
<name>org.eclipse.pde.BndBuilder</name>
<arguments>
</arguments>
</buildCommand>
Expand All @@ -32,7 +22,7 @@
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.pde.BndNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
</natures>
Expand Down
28 changes: 0 additions & 28 deletions bundles/org.eclipse.equinox.event/META-INF/MANIFEST.MF

This file was deleted.

7 changes: 0 additions & 7 deletions bundles/org.eclipse.equinox.event/OSGI-INF/component.xml

This file was deleted.

25 changes: 0 additions & 25 deletions bundles/org.eclipse.equinox.event/build.properties

This file was deleted.

20 changes: 20 additions & 0 deletions bundles/org.eclipse.equinox.event/pde.bnd
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Bundle-Name: %bundleName
Bundle-Version: 1.6.300.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

# pomless configuration options
pom.model.property.tck.artifact = org.osgi.test.cases.event
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -10,25 +10,31 @@
*
* 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.annotation.bundle.Capability;
import org.osgi.framework.BundleContext;
import org.osgi.service.event.Event;
import org.osgi.service.event.EventAdmin;
import org.osgi.service.component.annotations.*;
import org.osgi.service.event.*;

@Component(service = EventAdmin.class)
@Capability(namespace = "osgi.implementation", name = EventConstants.EVENT_ADMIN_IMPLEMENTATION, uses = Event.class, version = EventConstants.EVENT_ADMIN_SPECIFICATION_VERSION)
public class EventComponent implements EventAdmin {
private EventRedeliverer eventRedeliverer;
private EventAdminImpl eventAdmin;

@Activate
void activate(BundleContext context) {
eventAdmin = new EventAdminImpl(context);
eventAdmin.start();
eventRedeliverer = new EventRedeliverer(context, eventAdmin);
eventRedeliverer.open();
}

@Deactivate
void deactivate(BundleContext context) {
eventRedeliverer.close();
eventAdmin.stop();
Expand Down

0 comments on commit 7015751

Please sign in to comment.