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

Add an Isotope Distribution Calculator #618

Merged
merged 1 commit into from
Mar 24, 2025
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
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>net.openchrom.msd.extensions.cdk.feature</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.pde.FeatureBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.FeatureNature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bin.includes = feature.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="net.openchrom.msd.extensions.cdk.feature"
label="CDK Mass Spectrometry"
version="1.5.3.qualifier"
provider-name="OpenChrom"
license-feature="org.eclipse.license"
license-feature-version="1.0.0.qualifier">

<description url="https://www.openchrom.net">
CDK Mass Spectrometry Extension
</description>

<copyright url="https://www.lablicate.net">
Copyright (c) 2025 Lablicate GmbH.
</copyright>

<license url="%licenseURL">
%license
</license>

<plugin
id="net.openchrom.msd.extensions.cdk.ui"
version="0.0.0"/>

<plugin
id="net.openchrom.msd.extensions.cdk"
version="0.0.0"/>

</feature>
4 changes: 4 additions & 0 deletions openchrom/features/net.openchrom.platform.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@
id="net.openchrom.chromatogram.xxd.report.supplier.pdf.ui.feature"
version="0.0.0"/>

<includes
id="net.openchrom.msd.extensions.cdk.feature"
version="0.0.0"/>

<plugin
id="net.openchrom.rcp.compilation.community.ui"
version="0.0.0"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/bin

33 changes: 33 additions & 0 deletions openchrom/plugins/net.openchrom.msd.extensions.cdk.ui/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>net.openchrom.msd.extensions.cdk.ui</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ds.core.builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=21
org.eclipse.jdt.core.compiler.compliance=21
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=21
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
eclipse.preferences.version=1
enabled=true
generateBundleActivationPolicyLazy=true
path=OSGI-INF
validationErrorLevel=error
validationErrorLevel.missingImplicitUnbindMethod=error
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: CDK Mass Spectrometry UI
Bundle-SymbolicName: net.openchrom.msd.extensions.cdk.ui;singleton:=true
Bundle-Version: 1.5.3.qualifier
Bundle-Activator: net.openchrom.msd.extensions.cdk.ui.Activator
Bundle-Vendor: OpenChrom
Require-Bundle: org.eclipse.ui;bundle-version="3.207.100",
org.eclipse.core.runtime;bundle-version="3.33.0",
org.eclipse.ui.views;bundle-version="3.6.0",
org.eclipse.chemclipse.logging;bundle-version="0.9.0",
org.eclipse.chemclipse.support;bundle-version="0.9.0",
org.eclipse.chemclipse.support.ui;bundle-version="0.9.0",
net.openchrom.thirdparty.cdk;bundle-version="2.10.0",
net.openchrom.msd.extensions.cdk;bundle-version="1.5.3",
org.eclipse.chemclipse.ux.extension.ui;bundle-version="0.9.0",
org.eclipse.chemclipse.rcp.ui.icons;bundle-version="0.9.0",
org.eclipse.chemclipse.ux.extension.xxd.ui;bundle-version="0.9.0",
org.eclipse.chemclipse.model;bundle-version="0.9.0",
org.eclipse.chemclipse.msd.model;bundle-version="0.9.0",
org.eclipse.chemclipse.msd.swt.ui;bundle-version="0.9.0",
org.eclipse.swtchart.extensions;bundle-version="1.1.0",
org.eclipse.chemclipse.chromatogram.msd.filter.supplier.xpass;bundle-version="0.9.0"
Bundle-RequiredExecutionEnvironment: JavaSE-21
Bundle-ActivationPolicy: lazy
Automatic-Module-Name: net.openchrom.msd.extensions.cdk.ui
Model-Fragment: fragment.e4xmi
Import-Package: jakarta.inject;version="[2.0.0,3.0.0)"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#Properties file
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
bin.includes = META-INF/,\
.,\
OSGI-INF/,\
plugin.xml,\
fragment.e4xmi
source.. = src/
output.. = bin/
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="ASCII"?>
<fragment:ModelFragments xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:basic="http://www.eclipse.org/ui/2010/UIModel/application/descriptor/basic" xmlns:fragment="http://www.eclipse.org/ui/2010/UIModel/fragment" xmi:id="_3IeOkDG_Ee6Tv4Js7LTvsw">
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_1wpoEDzYEe6hp9DJU-acIA" featurename="descriptors" parentElementId="xpath:/">
<elements xsi:type="basic:PartDescriptor" xmi:id="_4LerwDzYEe6hp9DJU-acIA" elementId="net.openchrom.msd.extensions.cdk.ui.partdescriptor.isotopeDistributionCalculatorPart" label="Isotope Distribution Calculator" iconURI="platform:/plugin/org.eclipse.chemclipse.rcp.ui.icons/icons/16x16/info.png" tooltip="Calculate isotopic patterns from molecular formulas." closeable="true" contributionURI="bundleclass://net.openchrom.msd.extensions.cdk.ui/net.openchrom.msd.extensions.cdk.ui.parts.IsotopeDistributionCalculatorPart"/>
</fragments>
</fragment:ModelFragments>
12 changes: 12 additions & 0 deletions openchrom/plugins/net.openchrom.msd.extensions.cdk.ui/plugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin>
<extension
point="org.eclipse.ui.preferencePages">
<page
name="Chemistry Development Kit (CDK) MS Tools"
category="org.eclipse.chemclipse.rcp.app.ui.preferences.settingsPreferencePage"
class="net.openchrom.msd.extensions.cdk.ui.preferences.PreferencePage"
id="net.openchrom.msd.extensions.cdk.ui.preferences.preferencePage">
</page>
</extension>
</plugin>
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*******************************************************************************
* Copyright (c) 2025 Lablicate GmbH.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Philip Wenig - initial API and implementation
*******************************************************************************/
package net.openchrom.msd.extensions.cdk.ui;

import org.eclipse.chemclipse.support.ui.activator.AbstractActivatorUI;
import org.osgi.framework.BundleContext;

import net.openchrom.msd.extensions.cdk.preferences.PreferenceSupplier;

public class Activator extends AbstractActivatorUI {

private static Activator plugin;

@Override
public void start(BundleContext context) throws Exception {

super.start(context);
plugin = this;
initializePreferenceStore(PreferenceSupplier.INSTANCE());
}

@Override
public void stop(BundleContext context) throws Exception {

plugin = null;
super.stop(context);
}

public static Activator getDefault() {

return plugin;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*******************************************************************************
* Copyright (c) 2025 Lablicate GmbH.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Matthias Mailänder - initial API and implementation
*******************************************************************************/
package net.openchrom.msd.extensions.cdk.ui.parts;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;

import net.openchrom.msd.extensions.cdk.ui.swt.ExtendedIsotopeDistributionCalculatorUI;

import jakarta.inject.Inject;

public class IsotopeDistributionCalculatorPart {

@Inject
public IsotopeDistributionCalculatorPart(Composite parent) {

new ExtendedIsotopeDistributionCalculatorUI(parent, SWT.NONE);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*******************************************************************************
* Copyright (c) 2025 Lablicate GmbH.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Matthias Mailänder - initial API and implementation
*******************************************************************************/
package net.openchrom.msd.extensions.cdk.ui.preferences;

import org.eclipse.chemclipse.support.ui.preferences.fieldeditors.DoubleFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;

import net.openchrom.msd.extensions.cdk.preferences.PreferenceSupplier;
import net.openchrom.msd.extensions.cdk.ui.Activator;

public class PreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {

public PreferencePage() {

super(GRID);
setPreferenceStore(Activator.getDefault().getPreferenceStore());
setTitle("CDK");
setDescription("Mass Spectometry using the Chemistry Development Kit");
}

@Override
public void createFieldEditors() {

addField(new DoubleFieldEditor(PreferenceSupplier.P_MIN_INTENSITY, "Minimum Isotope Intensity", getFieldEditorParent()));
}

@Override
public void init(IWorkbench workbench) {

}
}
Loading