Skip to content

Commit e0b08f6

Browse files
committed
Generate all OSGi Declarative Services component files by PDE-DS/Tycho
Remove the now generated OSGi Declarative Services component-xml files from git. Resolve wildcards in Service-Component header.
1 parent b95d0ec commit e0b08f6

File tree

39 files changed

+105
-198
lines changed

39 files changed

+105
-198
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/OSGI-INF/org.eclipse.*.xml

debug/org.eclipse.debug.ui.launchview/OSGI-INF/org.eclipse.debug.ui.launchview.internal.impl.DebugCoreProvider.xml

Lines changed: 0 additions & 7 deletions
This file was deleted.

debug/org.eclipse.debug.ui.launchview/OSGI-INF/org.eclipse.debug.ui.launchview.internal.model.LaunchViewModel.xml

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
temp.folder
22
bin_ant
3-
ant_tasks
3+
ant_tasks
4+
/OSGI-INF/org.eclipse.*.xml

resources/bundles/org.eclipse.core.resources/.settings/org.eclipse.pde.ds.annotations.prefs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
classpath=true
2-
dsVersion=V1_3
2+
dsVersion=V1_4
33
eclipse.preferences.version=1
44
enabled=true
55
generateBundleActivationPolicyLazy=true

resources/bundles/org.eclipse.core.resources/META-INF/MANIFEST.MF

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ Require-Bundle: org.eclipse.ant.core;bundle-version="[3.1.0,4.0.0)";resolution:=
3030
org.eclipse.core.filesystem;bundle-version="[1.10.0,2.0.0)",
3131
org.eclipse.core.runtime;bundle-version="[3.31.0,4.0.0)"
3232
Bundle-ActivationPolicy: lazy
33-
Service-Component: OSGI-INF/ResourceChangeListenerRegistrar.xml,
34-
OSGI-INF/org.eclipse.core.internal.resources.CheckMissingNaturesListener.xml
33+
Service-Component: OSGI-INF/org.eclipse.core.internal.resources.CheckMissingNaturesListener.xml,
34+
OSGI-INF/org.eclipse.core.internal.resources.ResourceChangeListenerRegistrar.xml
3535
Bundle-RequiredExecutionEnvironment: JavaSE-17
3636
Automatic-Module-Name: org.eclipse.core.resources
3737
Import-Package: com.sun.jna;version="[5.14.0,6.0.0)",

resources/bundles/org.eclipse.core.resources/OSGI-INF/ResourceChangeListenerRegistrar.xml

Lines changed: 0 additions & 18 deletions
This file was deleted.

resources/bundles/org.eclipse.core.resources/OSGI-INF/org.eclipse.core.internal.resources.CheckMissingNaturesListener.xml

Lines changed: 0 additions & 11 deletions
This file was deleted.

resources/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ResourceChangeListenerRegistrar.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
import org.eclipse.core.resources.IResourceChangeListener;
1818
import org.eclipse.core.resources.IWorkspace;
1919
import org.eclipse.osgi.service.debug.DebugOptionsListener;
20+
import org.osgi.service.component.annotations.Activate;
21+
import org.osgi.service.component.annotations.Component;
22+
import org.osgi.service.component.annotations.Reference;
23+
import org.osgi.service.component.annotations.ReferenceCardinality;
24+
import org.osgi.service.component.annotations.ReferencePolicy;
2025
import org.osgi.service.log.Logger;
2126
import org.osgi.service.log.LoggerFactory;
2227

@@ -30,6 +35,7 @@
3035
* that (for example) {@link DebugOptionsListener} is used to receive callbacks.
3136
* </p>
3237
*/
38+
@Component
3339
public final class ResourceChangeListenerRegistrar {
3440

3541
private final IWorkspace workspace;
@@ -40,7 +46,8 @@ public final class ResourceChangeListenerRegistrar {
4046
*
4147
* @param workspace the workspace to associate listeners with
4248
*/
43-
public ResourceChangeListenerRegistrar(IWorkspace workspace) {
49+
@Activate
50+
public ResourceChangeListenerRegistrar(@Reference IWorkspace workspace) {
4451
this.workspace = workspace;
4552
}
4653

@@ -52,6 +59,7 @@ public ResourceChangeListenerRegistrar(IWorkspace workspace) {
5259
* required
5360
* {@link IWorkspace#addResourceChangeListener(IResourceChangeListener, int)}
5461
*/
62+
@Reference(policy = ReferencePolicy.DYNAMIC, cardinality = ReferenceCardinality.AT_LEAST_ONE)
5563
public void addResourceChangeListener(IResourceChangeListener listener, Map<String, Object> properties) {
5664
// TODO Add as public API https://bugs.eclipse.org/bugs/show_bug.cgi?id=564985
5765
Object mask = properties.get(IResourceChangeListener.PROPERTY_EVENT_MASK);
@@ -81,14 +89,15 @@ public void removeResourceChangeListener(IResourceChangeListener listener) {
8189
*
8290
* @param factory the factory
8391
*/
92+
@Reference(unbind = "unsetLogger", policy = ReferencePolicy.DYNAMIC, cardinality = ReferenceCardinality.OPTIONAL)
8493
public void setLoggerFactory(LoggerFactory factory) {
8594
this.logger = factory.getLogger(ResourceChangeListenerRegistrar.class);
8695
}
8796

8897
/**
8998
* Unsets the logger generated from the associated logger factory
9099
*/
91-
public void unsetLogger() {
100+
public void unsetLogger(LoggerFactory factory) {
92101
this.logger = null;
93102
}
94103
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/OSGI-INF/org.eclipse.*.xml

0 commit comments

Comments
 (0)