Skip to content

Commit

Permalink
Use @EventTopics property type annotation in TipsStartupService
Browse files Browse the repository at this point in the history
  • Loading branch information
HannesWell committed Oct 14, 2024
1 parent be89385 commit 392c8ae
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
classpath=true
dsVersion=V1_3
dsVersion=V1_4
eclipse.preferences.version=1
enabled=true
generateBundleActivationPolicyLazy=true
Expand Down
3 changes: 2 additions & 1 deletion ua/org.eclipse.tips.ide/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ Require-Bundle: org.eclipse.ui;bundle-version="3.0.0",
org.eclipse.tips.ui;bundle-version="0.1.0",
org.eclipse.tips.json
Import-Package: jakarta.annotation;version="[2.1.0,3.0.0)",
org.osgi.service.event;version="[1.4.0,2.0.0)"
org.osgi.service.event;version="[1.4.0,2.0.0)",
org.osgi.service.event.propertytypes;version="[1.4.0,2.0.0)"
Export-Package: org.eclipse.tips.ide.internal;x-internal:=true
Bundle-Vendor: %Bundle-Vendor
Bundle-ActivationPolicy: lazy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018, 2020 Remain Software and others
* Copyright (c) 2018, 2024 Remain Software and others
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -35,14 +35,14 @@
import org.osgi.framework.FrameworkUtil;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.event.Event;
import org.osgi.service.event.EventConstants;
import org.osgi.service.event.EventHandler;
import org.osgi.service.event.propertytypes.EventTopics;

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

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

@Override
@SuppressWarnings("restriction")
public void handleEvent(Event event) {
if (TipsPreferences.getStartupBehavior() != TipManager.START_DISABLE) {
Job job = new Job(Messages.Startup_1) {
Expand Down

0 comments on commit 392c8ae

Please sign in to comment.