Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use @EventTopics property type annotation in TipsStartupService #1589

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading