Skip to content

Commit 392c8ae

Browse files
committed
Use @EventTopics property type annotation in TipsStartupService
1 parent be89385 commit 392c8ae

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

ua/org.eclipse.tips.ide/.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

ua/org.eclipse.tips.ide/META-INF/MANIFEST.MF

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ Require-Bundle: org.eclipse.ui;bundle-version="3.0.0",
1313
org.eclipse.tips.ui;bundle-version="0.1.0",
1414
org.eclipse.tips.json
1515
Import-Package: jakarta.annotation;version="[2.1.0,3.0.0)",
16-
org.osgi.service.event;version="[1.4.0,2.0.0)"
16+
org.osgi.service.event;version="[1.4.0,2.0.0)",
17+
org.osgi.service.event.propertytypes;version="[1.4.0,2.0.0)"
1718
Export-Package: org.eclipse.tips.ide.internal;x-internal:=true
1819
Bundle-Vendor: %Bundle-Vendor
1920
Bundle-ActivationPolicy: lazy

ua/org.eclipse.tips.ide/src/org/eclipse/tips/ide/internal/TipsStartupService.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2018, 2020 Remain Software and others
2+
* Copyright (c) 2018, 2024 Remain Software and others
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -35,14 +35,14 @@
3535
import org.osgi.framework.FrameworkUtil;
3636
import org.osgi.service.component.annotations.Component;
3737
import org.osgi.service.event.Event;
38-
import org.osgi.service.event.EventConstants;
3938
import org.osgi.service.event.EventHandler;
39+
import org.osgi.service.event.propertytypes.EventTopics;
4040

4141
/**
4242
* Early startup to run the TipManager in the IDE.
4343
*/
44-
@Component(property = EventConstants.EVENT_TOPIC + '=' + UIEvents.UILifeCycle.APP_STARTUP_COMPLETE)
45-
@SuppressWarnings("restriction")
44+
@Component(service = EventHandler.class)
45+
@EventTopics(UIEvents.UILifeCycle.APP_STARTUP_COMPLETE)
4646
public class TipsStartupService implements EventHandler {
4747

4848
private static final String DBLQUOTE = "\""; //$NON-NLS-1$
@@ -54,6 +54,7 @@ public class TipsStartupService implements EventHandler {
5454
private static final String SPACE = " "; //$NON-NLS-1$
5555

5656
@Override
57+
@SuppressWarnings("restriction")
5758
public void handleEvent(Event event) {
5859
if (TipsPreferences.getStartupBehavior() != TipManager.START_DISABLE) {
5960
Job job = new Job(Messages.Startup_1) {

0 commit comments

Comments
 (0)