Skip to content

Commit

Permalink
Merge pull request #1508 from Mailaender/pcr-report-settings
Browse files Browse the repository at this point in the history
Revamp PCR tabular reporting settings
  • Loading branch information
eselmeister authored Sep 5, 2023
2 parents 3bff158 + 042f37f commit 359237f
Show file tree
Hide file tree
Showing 19 changed files with 321 additions and 67 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<extension
point="org.eclipse.ui.preferencePages">
<page
category="org.eclipse.chemclipse.converter.ui.converterPreferencePage"
category="org.eclipse.chemclipse.rcp.app.ui.preferences.preferencePageMolecularBiology"
class="org.eclipse.chemclipse.pcr.converter.ui.preferences.ConverterPreferencePage"
id="org.eclipse.chemclipse.pcr.converter.ui.converterPreferencePage"
name="Converter PCR">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,24 @@
id="org.eclipse.chemclipse.pcr.report.supplier.tabular.csv.ui.preferences.converterPreferencePage"
name="CSV PCR Export Converter">
</page>
<page
category="org.eclipse.chemclipse.pcr.report.supplier.tabular.csv.ui.preferences.converterPreferencePage"
class="org.eclipse.chemclipse.pcr.report.supplier.tabular.csv.ui.preferences.ChannelMappingPreferencePage"
id="org.eclipse.chemclipse.pcr.report.supplier.tabular.csv.ui.preferences.converterPreferencePage.ChannelMapping"
name="PCR Channel Mapping">
</page>
<page
category="org.eclipse.chemclipse.pcr.report.supplier.tabular.csv.ui.preferences.converterPreferencePage"
class="org.eclipse.chemclipse.pcr.report.supplier.tabular.csv.ui.preferences.WellMappingPreferencePage"
id="org.eclipse.chemclipse.pcr.report.supplier.tabular.csv.ui.preferences.converterPreferencePage.WellMapping"
name="PCR Well Mapping">
</page>
<page
category="org.eclipse.chemclipse.pcr.report.supplier.tabular.csv.ui.preferences.converterPreferencePage"
class="org.eclipse.chemclipse.pcr.report.supplier.tabular.csv.ui.preferences.VirtualChannelsPreferencePage"
id="org.eclipse.chemclipse.pcr.report.supplier.tabular.csv.ui.preferences.converterPreferencePage.VirtualChannels"
name="Virtual PCR Channels">
</page>
</extension>
<extension
point="org.eclipse.chemclipse.xxd.process.ui.menu.icon">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*******************************************************************************
* Copyright (c) 2022, 2023 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 org.eclipse.chemclipse.pcr.report.supplier.tabular.csv.ui.preferences;

import org.eclipse.chemclipse.pcr.report.supplier.tabular.csv.preferences.PreferenceSupplier;
import org.eclipse.chemclipse.pcr.report.supplier.tabular.csv.ui.Activator;
import org.eclipse.chemclipse.pcr.report.supplier.tabular.ui.editors.ChannelMappingFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;

public class ChannelMappingPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {

public ChannelMappingPreferencePage() {

super(GRID);
setPreferenceStore(Activator.getDefault().getPreferenceStore());
setDescription("Labels the headers according to these rules.");
}

/**
* 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 ChannelMappingFieldEditor(PreferenceSupplier.P_CHANNEL_MAPPING, "", getFieldEditorParent()));
}

/*
* (non-Javadoc)
* @see
* org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
*/
@Override
public void init(IWorkbench workbench) {

}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2022 Lablicate GmbH.
* Copyright (c) 2022, 2023 Lablicate GmbH.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
Expand All @@ -15,10 +15,6 @@
import org.eclipse.chemclipse.pcr.report.supplier.tabular.csv.preferences.PreferenceSupplier;
import org.eclipse.chemclipse.pcr.report.supplier.tabular.csv.ui.Activator;
import org.eclipse.chemclipse.pcr.report.supplier.tabular.model.DecimalSeparator;
import org.eclipse.chemclipse.pcr.report.supplier.tabular.ui.editors.ChannelMappingFieldEditor;
import org.eclipse.chemclipse.pcr.report.supplier.tabular.ui.editors.VirtualChannelFieldEditor;
import org.eclipse.chemclipse.pcr.report.supplier.tabular.ui.editors.WellMappingFieldEditor;
import org.eclipse.chemclipse.support.ui.preferences.fieldeditors.LabelFieldEditor;
import org.eclipse.jface.preference.ComboFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.ui.IWorkbench;
Expand All @@ -30,7 +26,7 @@ public PreferencePage() {

super(GRID);
setPreferenceStore(Activator.getDefault().getPreferenceStore());
setDescription("Exports plates into *.csv reports according to these rules.");
setDescription("Exports plates into *.csv reports.");
}

/**
Expand All @@ -41,10 +37,6 @@ public PreferencePage() {
@Override
public void createFieldEditors() {

addField(new ChannelMappingFieldEditor(PreferenceSupplier.P_CHANNEL_MAPPING, "Channel Mappings:", getFieldEditorParent()));
addField(new WellMappingFieldEditor(PreferenceSupplier.P_WELL_MAPPING, "Well Mappings:", getFieldEditorParent()));
addField(new VirtualChannelFieldEditor(PreferenceSupplier.P_VIRTUAL_CHANNELS, "Virtual Channels:", getFieldEditorParent()));
addField(new LabelFieldEditor("*.csv Options", getFieldEditorParent()));
addField(new ComboFieldEditor(PreferenceSupplier.P_DELIMITER, "Delimiter Character: ", Delimiter.getOptions(), getFieldEditorParent()));
addField(new ComboFieldEditor(PreferenceSupplier.P_DECIMAL_SEPARATOR, "Decimal Separator: ", DecimalSeparator.getOptions(), getFieldEditorParent()));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*******************************************************************************
* Copyright (c) 2022, 2023 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 org.eclipse.chemclipse.pcr.report.supplier.tabular.csv.ui.preferences;

import org.eclipse.chemclipse.pcr.report.supplier.tabular.csv.preferences.PreferenceSupplier;
import org.eclipse.chemclipse.pcr.report.supplier.tabular.csv.ui.Activator;
import org.eclipse.chemclipse.pcr.report.supplier.tabular.ui.editors.VirtualChannelFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;

public class VirtualChannelsPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {

public VirtualChannelsPreferencePage() {

super(GRID);
setPreferenceStore(Activator.getDefault().getPreferenceStore());
setDescription("Adds extra channels by combining existing ones according to these rules.");
}

/**
* 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 VirtualChannelFieldEditor(PreferenceSupplier.P_VIRTUAL_CHANNELS, "", getFieldEditorParent()));
}

/*
* (non-Javadoc)
* @see
* org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
*/
@Override
public void init(IWorkbench workbench) {

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*******************************************************************************
* Copyright (c) 2022, 2023 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 org.eclipse.chemclipse.pcr.report.supplier.tabular.csv.ui.preferences;

import org.eclipse.chemclipse.pcr.report.supplier.tabular.csv.preferences.PreferenceSupplier;
import org.eclipse.chemclipse.pcr.report.supplier.tabular.csv.ui.Activator;
import org.eclipse.chemclipse.pcr.report.supplier.tabular.ui.editors.WellMappingFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;

public class WellMappingPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {

public WellMappingPreferencePage() {

super(GRID);
setPreferenceStore(Activator.getDefault().getPreferenceStore());
setDescription("Decides how the end result is reported based on Ct values.");
}

/**
* 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 WellMappingFieldEditor(PreferenceSupplier.P_WELL_MAPPING, "", getFieldEditorParent()));
}

/*
* (non-Javadoc)
* @see
* org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
*/
@Override
public void init(IWorkbench workbench) {

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@
id="org.eclipse.chemclipse.pcr.report.supplier.tabular.excel.ui.preferences.converterPreferencePage"
name="Excel PCR Export Converter">
</page>
<page
category="org.eclipse.chemclipse.pcr.report.supplier.tabular.excel.ui.preferences.converterPreferencePage"
class="org.eclipse.chemclipse.pcr.report.supplier.tabular.excel.ui.preferences.IgnoredSubsetPreferencePage"
id="org.eclipse.chemclipse.pcr.report.supplier.tabular.excel.ui.preferences.converterPreferencePageIgnoredSubsets"
name="Ignored PCR Subsets">
</page>
<page
category="org.eclipse.chemclipse.pcr.report.supplier.tabular.excel.ui.preferences.converterPreferencePage"
class="org.eclipse.chemclipse.pcr.report.supplier.tabular.excel.ui.preferences.ChannelMappingPreferencePage"
id="org.eclipse.chemclipse.pcr.report.supplier.tabular.excel.ui.preferences.converterPreferencePageIgnoredSubsets"
name="PCR Channel Mappings">
</page>
</extension>
<extension
point="org.eclipse.chemclipse.xxd.process.ui.menu.icon">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*******************************************************************************
* Copyright (c) 2023 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 org.eclipse.chemclipse.pcr.report.supplier.tabular.excel.ui.preferences;

import org.eclipse.chemclipse.pcr.report.supplier.tabular.excel.preferences.PreferenceSupplier;
import org.eclipse.chemclipse.pcr.report.supplier.tabular.excel.ui.Activator;
import org.eclipse.chemclipse.pcr.report.supplier.tabular.ui.editors.ChannelMappingFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;

public class ChannelMappingPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {

public ChannelMappingPreferencePage() {

super(GRID);
setPreferenceStore(Activator.getDefault().getPreferenceStore());
setDescription("Exports plates into *.xlsx reports according to these rules.");
}

/**
* 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 ChannelMappingFieldEditor(PreferenceSupplier.P_CHANNEL_MAPPING, "", getFieldEditorParent()));
}

/*
* (non-Javadoc)
* @see
* org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
*/
@Override
public void init(IWorkbench workbench) {

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*******************************************************************************
* Copyright (c) 2022, 2023 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 org.eclipse.chemclipse.pcr.report.supplier.tabular.excel.ui.preferences;

import org.eclipse.chemclipse.pcr.report.supplier.tabular.excel.preferences.PreferenceSupplier;
import org.eclipse.chemclipse.pcr.report.supplier.tabular.excel.ui.Activator;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;

public class IgnoredSubsetPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {

public IgnoredSubsetPreferencePage() {

super(GRID);
setPreferenceStore(Activator.getDefault().getPreferenceStore());
setDescription("These subsets will never get reported.");
}

/**
* 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 StringListFieldEditor(PreferenceSupplier.P_IGNORE_SUBSETS, "", getFieldEditorParent()));
}

/*
* (non-Javadoc)
* @see
* org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
*/
@Override
public void init(IWorkbench workbench) {

}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2022 Lablicate GmbH.
* Copyright (c) 2022, 2023 Lablicate GmbH.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
Expand All @@ -13,8 +13,7 @@

import org.eclipse.chemclipse.pcr.report.supplier.tabular.excel.preferences.PreferenceSupplier;
import org.eclipse.chemclipse.pcr.report.supplier.tabular.excel.ui.Activator;
import org.eclipse.chemclipse.pcr.report.supplier.tabular.ui.editors.ChannelMappingFieldEditor;
import org.eclipse.chemclipse.support.ui.preferences.fieldeditors.SpacerFieldEditor;
import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.StringFieldEditor;
import org.eclipse.ui.IWorkbench;
Expand All @@ -26,7 +25,7 @@ public PreferencePage() {

super(GRID);
setPreferenceStore(Activator.getDefault().getPreferenceStore());
setDescription("Exports plates into *.xlsx reports according to these rules.");
setDescription("Exports plates into *.xlsx reports.");
}

/**
Expand All @@ -37,10 +36,8 @@ public PreferencePage() {
@Override
public void createFieldEditors() {

addField(new StringListFieldEditor(PreferenceSupplier.P_IGNORE_SUBSETS, "Ignored Subsets:", getFieldEditorParent()));
addField(new SpacerFieldEditor(getFieldEditorParent()));
addField(new ChannelMappingFieldEditor(PreferenceSupplier.P_CHANNEL_MAPPING, "Channel Mappings:", getFieldEditorParent()));
addField(new StringFieldEditor(PreferenceSupplier.P_ANALYSIS_SEPARATOR, "Sample Analysis Separator:", getFieldEditorParent()));
addField(new BooleanFieldEditor(PreferenceSupplier.P_OPEN_REPORT, "Open report after generation.", getFieldEditorParent()));
}

/*
Expand Down
Loading

0 comments on commit 359237f

Please sign in to comment.