Skip to content

Commit dbcd168

Browse files
committed
Add an Isotope Distribution Calculator.
1 parent d8641ba commit dbcd168

32 files changed

+649
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>net.openchrom.msd.extensions.cdk.feature</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.pde.FeatureBuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.eclipse.pde.FeatureNature</nature>
16+
</natures>
17+
</projectDescription>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
encoding/<project>=UTF-8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bin.includes = feature.xml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<feature
3+
id="net.openchrom.msd.extensions.cdk.feature"
4+
label="CDK Mass Spectrometry"
5+
version="1.5.3.qualifier"
6+
provider-name="Lablicate GmbH"
7+
license-feature="com.lablicate.license"
8+
license-feature-version="1.5.3.qualifier">
9+
10+
<description url="https://www.openchrom.net">
11+
Mass Spectrometry Chemistry Development Kit
12+
</description>
13+
14+
<copyright url="https://www.lablicate.net">
15+
Copyright (c) 2025 Lablicate GmbH.
16+
</copyright>
17+
18+
<license url="%licenseURL">
19+
%license
20+
</license>
21+
22+
<plugin
23+
id="net.openchrom.msd.extensions.cdk.ui"
24+
version="0.0.0"/>
25+
26+
<plugin
27+
id="net.openchrom.msd.extensions.cdk"
28+
version="0.0.0"/>
29+
30+
</feature>

openchrom/features/net.openchrom.platform.feature/feature.xml

+4
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@
143143
id="net.openchrom.chromatogram.xxd.report.supplier.pdf.ui.feature"
144144
version="0.0.0"/>
145145

146+
<includes
147+
id="net.openchrom.msd.extensions.cdk.feature"
148+
version="0.0.0"/>
149+
146150
<plugin
147151
id="net.openchrom.rcp.compilation.community.ui"
148152
version="0.0.0"/>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21"/>
4+
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
5+
<classpathentry kind="src" path="src"/>
6+
<classpathentry kind="output" path="bin"/>
7+
</classpath>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/bin
2+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>net.openchrom.msd.extensions.cdk.ui</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.pde.ManifestBuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
<buildCommand>
19+
<name>org.eclipse.pde.SchemaBuilder</name>
20+
<arguments>
21+
</arguments>
22+
</buildCommand>
23+
<buildCommand>
24+
<name>org.eclipse.pde.ds.core.builder</name>
25+
<arguments>
26+
</arguments>
27+
</buildCommand>
28+
</buildSpec>
29+
<natures>
30+
<nature>org.eclipse.pde.PluginNature</nature>
31+
<nature>org.eclipse.jdt.core.javanature</nature>
32+
</natures>
33+
</projectDescription>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
encoding/<project>=UTF-8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=21
3+
org.eclipse.jdt.core.compiler.compliance=21
4+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
5+
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
6+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
7+
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
8+
org.eclipse.jdt.core.compiler.release=enabled
9+
org.eclipse.jdt.core.compiler.source=21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
eclipse.preferences.version=1
2+
enabled=true
3+
generateBundleActivationPolicyLazy=true
4+
path=OSGI-INF
5+
validationErrorLevel=error
6+
validationErrorLevel.missingImplicitUnbindMethod=error
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Manifest-Version: 1.0
2+
Bundle-ManifestVersion: 2
3+
Bundle-Name: CDK Mass Spectrometry UI
4+
Bundle-SymbolicName: net.openchrom.msd.extensions.cdk.ui;singleton:=true
5+
Bundle-Version: 1.5.3.qualifier
6+
Bundle-Activator: net.openchrom.msd.extensions.cdk.ui.Activator
7+
Bundle-Vendor: OpenChrom
8+
Require-Bundle: org.eclipse.ui;bundle-version="3.207.100",
9+
org.eclipse.core.runtime;bundle-version="3.33.0",
10+
org.eclipse.ui.views;bundle-version="3.6.0",
11+
org.eclipse.chemclipse.logging;bundle-version="0.9.0",
12+
org.eclipse.chemclipse.support;bundle-version="0.9.0",
13+
org.eclipse.chemclipse.support.ui;bundle-version="0.9.0",
14+
net.openchrom.thirdparty.cdk;bundle-version="2.10.0",
15+
net.openchrom.msd.extensions.cdk;bundle-version="1.5.3",
16+
org.eclipse.chemclipse.ux.extension.ui;bundle-version="0.9.0",
17+
org.eclipse.chemclipse.rcp.ui.icons;bundle-version="0.9.0",
18+
org.eclipse.chemclipse.ux.extension.xxd.ui;bundle-version="0.9.0",
19+
org.eclipse.chemclipse.model;bundle-version="0.9.0",
20+
org.eclipse.chemclipse.msd.model;bundle-version="0.9.0",
21+
org.eclipse.chemclipse.msd.swt.ui;bundle-version="0.9.0",
22+
org.eclipse.swtchart.extensions;bundle-version="1.1.0",
23+
org.eclipse.chemclipse.chromatogram.msd.filter.supplier.xpass;bundle-version="0.9.0"
24+
Bundle-RequiredExecutionEnvironment: JavaSE-21
25+
Bundle-ActivationPolicy: lazy
26+
Automatic-Module-Name: net.openchrom.msd.extensions.cdk.ui
27+
Model-Fragment: fragment.e4xmi
28+
Import-Package: jakarta.inject;version="[2.0.0,3.0.0)"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#Properties file
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
bin.includes = META-INF/,\
2+
.,\
3+
OSGI-INF/,\
4+
plugin.xml,\
5+
fragment.e4xmi
6+
source.. = src/
7+
output.. = bin/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="ASCII"?>
2+
<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">
3+
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_1wpoEDzYEe6hp9DJU-acIA" featurename="descriptors" parentElementId="xpath:/">
4+
<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"/>
5+
</fragments>
6+
</fragment:ModelFragments>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<plugin>
3+
<extension
4+
point="org.eclipse.ui.preferencePages">
5+
<page
6+
name="Chemistry Development Kit (CDK) MS Tools"
7+
category="org.eclipse.chemclipse.rcp.app.ui.preferences.settingsPreferencePage"
8+
class="net.openchrom.msd.extensions.cdk.ui.preferences.PreferencePage"
9+
id="net.openchrom.msd.extensions.cdk.ui.preferences.preferencePage">
10+
</page>
11+
</extension>
12+
</plugin>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2025 Lablicate GmbH.
3+
*
4+
* All rights reserved. This program and the accompanying materials
5+
* are made available under the terms of the Eclipse Public License v1.0
6+
* which accompanies this distribution, and is available at
7+
* http://www.eclipse.org/legal/epl-v10.html
8+
*
9+
* Contributors:
10+
* Philip Wenig - initial API and implementation
11+
*******************************************************************************/
12+
package net.openchrom.msd.extensions.cdk.ui;
13+
14+
import org.eclipse.chemclipse.support.ui.activator.AbstractActivatorUI;
15+
import org.osgi.framework.BundleContext;
16+
17+
import net.openchrom.msd.extensions.cdk.preferences.PreferenceSupplier;
18+
19+
public class Activator extends AbstractActivatorUI {
20+
21+
private static Activator plugin;
22+
23+
@Override
24+
public void start(BundleContext context) throws Exception {
25+
26+
super.start(context);
27+
plugin = this;
28+
initializePreferenceStore(PreferenceSupplier.INSTANCE());
29+
}
30+
31+
@Override
32+
public void stop(BundleContext context) throws Exception {
33+
34+
plugin = null;
35+
super.stop(context);
36+
}
37+
38+
public static Activator getDefault() {
39+
40+
return plugin;
41+
}
42+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2025 Lablicate GmbH.
3+
*
4+
* All rights reserved. This program and the accompanying materials
5+
* are made available under the terms of the Eclipse Public License v1.0
6+
* which accompanies this distribution, and is available at
7+
* http://www.eclipse.org/legal/epl-v10.html
8+
*
9+
* Contributors:
10+
* Matthias Mailänder - initial API and implementation
11+
*******************************************************************************/
12+
package net.openchrom.msd.extensions.cdk.ui.parts;
13+
14+
import org.eclipse.swt.SWT;
15+
import org.eclipse.swt.widgets.Composite;
16+
17+
import net.openchrom.msd.extensions.cdk.ui.swt.ExtendedIsotopeDistributionCalculatorUI;
18+
19+
import jakarta.inject.Inject;
20+
21+
public class IsotopeDistributionCalculatorPart {
22+
23+
@Inject
24+
public IsotopeDistributionCalculatorPart(Composite parent) {
25+
26+
new ExtendedIsotopeDistributionCalculatorUI(parent, SWT.NONE);
27+
}
28+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2025 Lablicate GmbH.
3+
*
4+
* All rights reserved. This program and the accompanying materials
5+
* are made available under the terms of the Eclipse Public License v1.0
6+
* which accompanies this distribution, and is available at
7+
* http://www.eclipse.org/legal/epl-v10.html
8+
*
9+
* Contributors:
10+
* Matthias Mailänder - initial API and implementation
11+
*******************************************************************************/
12+
package net.openchrom.msd.extensions.cdk.ui.preferences;
13+
14+
import org.eclipse.chemclipse.support.ui.preferences.fieldeditors.DoubleFieldEditor;
15+
import org.eclipse.jface.preference.FieldEditorPreferencePage;
16+
import org.eclipse.ui.IWorkbench;
17+
import org.eclipse.ui.IWorkbenchPreferencePage;
18+
19+
import net.openchrom.msd.extensions.cdk.preferences.PreferenceSupplier;
20+
import net.openchrom.msd.extensions.cdk.ui.Activator;
21+
22+
public class PreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
23+
24+
public PreferencePage() {
25+
26+
super(GRID);
27+
setPreferenceStore(Activator.getDefault().getPreferenceStore());
28+
setTitle("CDK");
29+
setDescription("Mass Spectometry using the Chemistry Development Kit");
30+
}
31+
32+
@Override
33+
public void createFieldEditors() {
34+
35+
addField(new DoubleFieldEditor(PreferenceSupplier.P_MIN_INTENSITY, "Minimum Isotope Intensity", getFieldEditorParent()));
36+
}
37+
38+
@Override
39+
public void init(IWorkbench workbench) {
40+
41+
}
42+
}

0 commit comments

Comments
 (0)