Skip to content
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
Expand Up @@ -42,5 +42,6 @@ Bundle-RequiredExecutionEnvironment: JavaSE-25
Bundle-ActivationPolicy: lazy
Automatic-Module-Name: net.openchrom.installer.ui
Service-Component: OSGI-INF/net.openchrom.installer.ui.OpenchromP2Policy.xml,
OSGI-INF/net.openchrom.installer.ui.P2CleanupDS.xml
OSGI-INF/net.openchrom.installer.ui.P2CleanupDS.xml,
OSGI-INF/net.openchrom.installer.ui.FeatureCheckDS.xml
Import-Package: org.osgi.service.event;version="[1.0.0,2.0.0)"
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.4.0" name="net.openchrom.installer.ui.FeatureCheckDS">
<property name="event.topics" type="String" value="org/eclipse/e4/ui/LifeCycle/appStartupComplete"/>
<service>
<provide interface="org.osgi.service.event.EventHandler"/>
</service>
<implementation class="net.openchrom.installer.ui.FeatureCheckDS"/>
</scr:component>
5 changes: 0 additions & 5 deletions openchrom/plugins/net.openchrom.installer.ui/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin>
<extension
point="org.eclipse.ui.startup">
<startup
class="net.openchrom.installer.ui.FeatureCheck"></startup>
</extension>
<extension
id="com.lablicate.installer.ui.fragment"
point="org.eclipse.e4.workbench.model">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.MessageDialogWithToggle;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.ui.IStartup;
import org.osgi.framework.Bundle;

import net.openchrom.installer.model.IPluginDescriptor;
Expand All @@ -39,12 +38,15 @@
import net.openchrom.installer.ui.discovery.PrepareInstallProfileJob;
import net.openchrom.installer.ui.wizards.PluginDiscoveryWizard;

public class FeatureCheck implements IStartup {
public class FeatureCheck {

private static final Logger logger = Logger.getLogger(FeatureCheck.class);

@Override
public void earlyStartup() {
private FeatureCheck() {

}

public static void check() {

for(String feature : getConverterFeatures()) {
Bundle bundle = Platform.getBundle(feature);
Expand Down Expand Up @@ -87,7 +89,7 @@ public void earlyStartup() {
}
}

private List<String> getConverterFeatures() {
private static List<String> getConverterFeatures() {

List<String> features = new ArrayList<>();
PluginDiscoveryExtensionReader extensionReader = new PluginDiscoveryExtensionReader();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*******************************************************************************
* Copyright (c) 2026 Lablicate GmbH.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Aleksandar Kurtakov - initial API and implementation
*******************************************************************************/
package net.openchrom.installer.ui;

import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.e4.ui.workbench.UIEvents;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.event.Event;
import org.osgi.service.event.EventHandler;
import org.osgi.service.event.propertytypes.EventTopics;

@Component(service = EventHandler.class)
@EventTopics(UIEvents.UILifeCycle.APP_STARTUP_COMPLETE)
public class FeatureCheckDS implements EventHandler {

@Override
public void handleEvent(Event event) {

Job job = Job.create("Check for vendor converter plug-ins", (IProgressMonitor _) -> {

FeatureCheck.check();
return Status.OK_STATUS;
});
job.setSystem(true);
job.schedule();
}
}