-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a user configurable .csv export.
- Loading branch information
1 parent
16ec12e
commit bab31f6
Showing
41 changed files
with
1,710 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
openchrom/features/net.openchrom.xxd.report.supplier.csv.feature/.project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.chromatogram.xxd.report.supplier.csv.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> |
1 change: 1 addition & 0 deletions
1
openchrom/features/net.openchrom.xxd.report.supplier.csv.feature/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
bin.includes = feature.xml |
40 changes: 40 additions & 0 deletions
40
openchrom/features/net.openchrom.xxd.report.supplier.csv.feature/feature.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<feature | ||
id="net.openchrom.chromatogram.xxd.report.supplier.csv.feature" | ||
label="Feature" | ||
version="1.4.0.qualifier" | ||
provider-name="OpenChrom" | ||
plugin="net.openchrom.feature.branding"> | ||
|
||
<description url="https://www.openchrom.net"> | ||
This is the chromatogram CSV report plugin. | ||
</description> | ||
|
||
<copyright url="https://github.com/OpenChrom/openchrom/blob/develop/LICENSE"> | ||
Copyright (c) 2022 Lablicate GmbH. | ||
</copyright> | ||
|
||
<license url="http://www.eclipse.org/legal/epl-v10.html"> | ||
Copyright (c) 2022 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 | ||
</license> | ||
|
||
<plugin | ||
id="net.openchrom.chromatogram.xxd.report.supplier.csv" | ||
download-size="0" | ||
install-size="0" | ||
version="0.0.0" | ||
unpack="false"/> | ||
|
||
<plugin | ||
id="net.openchrom.chromatogram.xxd.report.supplier.csv.ui" | ||
download-size="0" | ||
install-size="0" | ||
version="0.0.0" | ||
unpack="false"/> | ||
|
||
</feature> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
openchrom/plugins/net.openchrom.chromatogram.xxd.report.supplier.csv.ui/src/.classpath
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-1.8"/> | ||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
1 change: 1 addition & 0 deletions
1
openchrom/plugins/net.openchrom.chromatogram.xxd.report.supplier.csv.ui/src/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/bin |
33 changes: 33 additions & 0 deletions
33
openchrom/plugins/net.openchrom.chromatogram.xxd.report.supplier.csv.ui/src/.project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.chromatogram.xxd.report.supplier.csv.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> |
7 changes: 7 additions & 0 deletions
7
...penchrom.chromatogram.xxd.report.supplier.csv.ui/src/.settings/org.eclipse.jdt.core.prefs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 | ||
org.eclipse.jdt.core.compiler.compliance=1.8 | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.source=1.8 |
21 changes: 21 additions & 0 deletions
21
...om/plugins/net.openchrom.chromatogram.xxd.report.supplier.csv.ui/src/META-INF/MANIFEST.MF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Manifest-Version: 1.0 | ||
Automatic-Module-Name: net.openchrom.chromatogram.xxd.report.supplier.csv.ui | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: CSV Report UI | ||
Bundle-SymbolicName: net.openchrom.chromatogram.xxd.report.supplier.csv.ui;singleton:=true | ||
Bundle-Version: 1.4.0.qualifier | ||
Bundle-Activator: net.openchrom.chromatogram.xxd.report.supplier.csv.ui.Activator | ||
Bundle-Vendor: OpenChrom | ||
Require-Bundle: org.eclipse.core.runtime, | ||
net.openchrom.chromatogram.xxd.report.supplier.csv;bundle-version="0.9.0", | ||
org.eclipse.chemclipse.support;bundle-version="0.9.0", | ||
org.eclipse.chemclipse.support.ui, | ||
org.eclipse.ui;bundle-version="3.109.100", | ||
org.eclipse.chemclipse.ux.extension.ui;bundle-version="0.9.0", | ||
org.eclipse.chemclipse.ux.extension.xxd.ui, | ||
org.eclipse.chemclipse.rcp.ui.icons, | ||
com.fasterxml.jackson.core.jackson-databind;bundle-version="2.9.93" | ||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8 | ||
Bundle-ActivationPolicy: lazy | ||
Import-Package: org.osgi.service.component.annotations;version="1.3.0" | ||
Service-Component: OSGI-INF/net.openchrom.chromatogram.xxd.report.supplier.csv.ui.services.ReportColumnsAnnotationService.xml |
12 changes: 12 additions & 0 deletions
12
....openchrom.chromatogram.xxd.report.supplier.csv.ui/src/OSGI-INF/l10n/bundle_en.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
############################################################################### | ||
# Copyright (c) 2022 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 | ||
############################################################################### | ||
#Properties file |
7 changes: 7 additions & 0 deletions
7
...chrom.chromatogram.xxd.report.supplier.csv.ui.services.ReportColumnsAnnotationService.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" configuration-policy="optional" name="net.openchrom.chromatogram.xxd.report.supplier.csv.ui.services.ReportColumnsAnnotationService"> | ||
<service> | ||
<provide interface="org.eclipse.chemclipse.ux.extension.xxd.ui.methods.IAnnotationWidgetService"/> | ||
</service> | ||
<implementation class="net.openchrom.chromatogram.xxd.report.supplier.csv.ui.services.ReportColumnsAnnotationService"/> | ||
</scr:component> |
6 changes: 6 additions & 0 deletions
6
openchrom/plugins/net.openchrom.chromatogram.xxd.report.supplier.csv.ui/src/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
source.. = src/ | ||
output.. = bin/ | ||
bin.includes = META-INF/,\ | ||
.,\ | ||
plugin.xml,\ | ||
OSGI-INF/ |
13 changes: 13 additions & 0 deletions
13
openchrom/plugins/net.openchrom.chromatogram.xxd.report.supplier.csv.ui/src/plugin.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<?eclipse version="3.4"?> | ||
<plugin> | ||
<extension | ||
point="org.eclipse.ui.preferencePages"> | ||
<page | ||
category="org.eclipse.chemclipse.chromatogram.xxd.report.ui.preferences.reportPreferencePage" | ||
class="net.openchrom.chromatogram.xxd.report.supplier.csv.ui.preferences.PreferencePage" | ||
id="net.openchrom.chromatogram.xxd.report.supplier.csv.ui.preferences.preferencePage" | ||
name="CSV Chromatogram Report"> | ||
</page> | ||
</extension> | ||
</plugin> |
56 changes: 56 additions & 0 deletions
56
...plier.csv.ui/src/src/net/openchrom/chromatogram/xxd/report/supplier/csv/ui/Activator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2012, 2022 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: | ||
* Dr. Philip Wenig - initial API and implementation | ||
*******************************************************************************/ | ||
package net.openchrom.chromatogram.xxd.report.supplier.csv.ui; | ||
|
||
import org.eclipse.chemclipse.support.ui.activator.AbstractActivatorUI; | ||
import org.osgi.framework.BundleContext; | ||
|
||
import net.openchrom.chromatogram.xxd.report.supplier.csv.preferences.PreferenceSupplier; | ||
|
||
public class Activator extends AbstractActivatorUI { | ||
|
||
/* | ||
* Instance | ||
*/ | ||
private static Activator plugin; | ||
|
||
/* | ||
* (non-Javadoc) | ||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) | ||
*/ | ||
public void start(BundleContext context) throws Exception { | ||
|
||
super.start(context); | ||
plugin = this; | ||
initializePreferenceStore(PreferenceSupplier.INSTANCE()); | ||
} | ||
|
||
/* | ||
* (non-Javadoc) | ||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) | ||
*/ | ||
public void stop(BundleContext context) throws Exception { | ||
|
||
plugin = null; | ||
super.stop(context); | ||
} | ||
|
||
/** | ||
* Returns the shared instance | ||
* | ||
* @return the shared instance | ||
*/ | ||
public static AbstractActivatorUI getDefault() { | ||
|
||
return plugin; | ||
} | ||
} |
56 changes: 56 additions & 0 deletions
56
...src/net/openchrom/chromatogram/xxd/report/supplier/csv/ui/preferences/PreferencePage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2022 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.chromatogram.xxd.report.supplier.csv.ui.preferences; | ||
|
||
import org.eclipse.chemclipse.support.ui.preferences.fieldeditors.SpacerFieldEditor; | ||
import org.eclipse.jface.preference.BooleanFieldEditor; | ||
import org.eclipse.jface.preference.ComboFieldEditor; | ||
import org.eclipse.jface.preference.FieldEditorPreferencePage; | ||
import org.eclipse.ui.IWorkbench; | ||
import org.eclipse.ui.IWorkbenchPreferencePage; | ||
|
||
import net.openchrom.chromatogram.xxd.report.supplier.csv.preferences.PreferenceSupplier; | ||
import net.openchrom.chromatogram.xxd.report.supplier.csv.ui.Activator; | ||
|
||
public class PreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage { | ||
|
||
public PreferencePage() { | ||
|
||
super(GRID); | ||
setPreferenceStore(Activator.getDefault().getPreferenceStore()); | ||
setTitle("CSV Chromatogram Reports"); | ||
setDescription("Allows user customizable reports in character separated values format."); | ||
} | ||
|
||
/** | ||
* Creates the field editors. Field editors are abstractions of the common | ||
* GUI blocks needed to manipulate various types of preferences. Each field | ||
* editor knows how to save and restore itself. | ||
*/ | ||
@Override | ||
public void createFieldEditors() { | ||
|
||
addField(new SpacerFieldEditor(getFieldEditorParent())); | ||
addField(new ComboFieldEditor(PreferenceSupplier.P_DELIMITER, "Column delimiter", PreferenceSupplier.DELIMITERS, getFieldEditorParent())); | ||
addField(new BooleanFieldEditor(PreferenceSupplier.P_REPORT_REFERENCED_CHROMATOGRAMS, "Report Referenced Chromatograms", getFieldEditorParent())); | ||
} | ||
|
||
/* | ||
* (non-Javadoc) | ||
* @see | ||
* org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench) | ||
*/ | ||
@Override | ||
public void init(IWorkbench workbench) { | ||
|
||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
...hrom/chromatogram/xxd/report/supplier/csv/ui/services/ReportColumnsAnnotationService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2021, 2022 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.chromatogram.xxd.report.supplier.csv.ui.services; | ||
|
||
import org.eclipse.chemclipse.ux.extension.xxd.ui.methods.IAnnotationWidgetService; | ||
import org.eclipse.swt.SWT; | ||
import org.eclipse.swt.layout.GridData; | ||
import org.eclipse.swt.widgets.Composite; | ||
import org.eclipse.swt.widgets.Control; | ||
import org.osgi.service.component.annotations.Component; | ||
import org.osgi.service.component.annotations.ConfigurationPolicy; | ||
|
||
import net.openchrom.chromatogram.xxd.report.supplier.csv.service.ReportColumnsSerializationService; | ||
import net.openchrom.chromatogram.xxd.report.supplier.csv.ui.swt.ReportColumnEditor; | ||
|
||
@Component(service = {IAnnotationWidgetService.class}, configurationPolicy = ConfigurationPolicy.OPTIONAL) | ||
public class ReportColumnsAnnotationService extends ReportColumnsSerializationService implements IAnnotationWidgetService { | ||
|
||
private ReportColumnEditor reportColumnEditor; | ||
|
||
@Override | ||
public Control createWidget(Composite parent, String description, Object currentSelection) { | ||
|
||
reportColumnEditor = new ReportColumnEditor(parent, SWT.NONE); | ||
reportColumnEditor.setToolTipText(description); | ||
GridData gridData = new GridData(GridData.FILL_BOTH); | ||
gridData.heightHint = 200; | ||
reportColumnEditor.setLayoutData(gridData); | ||
// | ||
if(currentSelection instanceof String) { | ||
reportColumnEditor.load((String)currentSelection); | ||
} | ||
// | ||
return reportColumnEditor; | ||
} | ||
|
||
@Override | ||
public Object getValue(Object currentSelection) { | ||
|
||
return reportColumnEditor.getReportColumns(); | ||
} | ||
} |
Oops, something went wrong.