-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed #684 - Process Supplier - System Options
- Loading branch information
1 parent
7ff4d30
commit 413ac6d
Showing
17 changed files
with
240 additions
and
139 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
7 changes: 7 additions & 0 deletions
7
...m.filter/OSGI-INF/org.eclipse.chemclipse.chromatogram.filter.system.FilterIonRounding.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" name="org.eclipse.chemclipse.chromatogram.filter.system.FilterIonRounding"> | ||
<service> | ||
<provide interface="org.eclipse.chemclipse.processing.supplier.IProcessTypeSupplier"/> | ||
</service> | ||
<implementation class="org.eclipse.chemclipse.chromatogram.filter.system.FilterIonRounding"/> | ||
</scr:component> |
7 changes: 7 additions & 0 deletions
7
...ter/OSGI-INF/org.eclipse.chemclipse.chromatogram.filter.system.FilterRetentionIndexQC.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" name="org.eclipse.chemclipse.chromatogram.filter.system.FilterRetentionIndexQC"> | ||
<service> | ||
<provide interface="org.eclipse.chemclipse.processing.supplier.IProcessTypeSupplier"/> | ||
</service> | ||
<implementation class="org.eclipse.chemclipse.chromatogram.filter.system.FilterRetentionIndexQC"/> | ||
</scr:component> |
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
54 changes: 0 additions & 54 deletions
54
...er/src/org/eclipse/chemclipse/chromatogram/filter/impl/ChromatogramFilterIonRounding.java
This file was deleted.
Oops, something went wrong.
53 changes: 0 additions & 53 deletions
53
...gram.filter/src/org/eclipse/chemclipse/chromatogram/filter/impl/ChromatogramFilterQC.java
This file was deleted.
Oops, something went wrong.
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
55 changes: 55 additions & 0 deletions
55
...ogram.filter/src/org/eclipse/chemclipse/chromatogram/filter/system/FilterIonRounding.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,55 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2021 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 org.eclipse.chemclipse.chromatogram.filter.system; | ||
|
||
import java.util.Collection; | ||
import java.util.Collections; | ||
|
||
import org.eclipse.chemclipse.model.math.IonRoundMethod; | ||
import org.eclipse.chemclipse.processing.supplier.IProcessSupplier; | ||
import org.eclipse.chemclipse.processing.supplier.IProcessTypeSupplier; | ||
import org.eclipse.chemclipse.processing.supplier.ProcessExecutionContext; | ||
import org.eclipse.chemclipse.processing.system.AbstractSystemProcessSettings; | ||
import org.eclipse.chemclipse.processing.system.AbstractSystemProcessSupplier; | ||
import org.eclipse.chemclipse.processing.system.ISystemProcessSettings; | ||
import org.osgi.service.component.annotations.Component; | ||
|
||
@Component(service = {IProcessTypeSupplier.class}) | ||
public class FilterIonRounding extends AbstractSystemProcessSettings { | ||
|
||
private static final String ID = "org.eclipse.chemclipse.chromatogram.filter.system.ionRounding"; | ||
private static final String NAME = "Ion Round Method"; | ||
private static final String DESCRIPTION = "This filter sets the system ion round method settings."; | ||
|
||
@Override | ||
public Collection<IProcessSupplier<?>> getProcessorSuppliers() { | ||
|
||
return Collections.singleton(new ProcessSupplier(this)); | ||
} | ||
|
||
private static final class ProcessSupplier extends AbstractSystemProcessSupplier<SettingsIonRounding> { | ||
|
||
public ProcessSupplier(IProcessTypeSupplier parent) { | ||
|
||
super(ID, NAME, DESCRIPTION, SettingsIonRounding.class, parent); | ||
} | ||
|
||
@Override | ||
public void executeUserSettings(ISystemProcessSettings settings, ProcessExecutionContext context) throws Exception { | ||
|
||
if(settings instanceof SettingsIonRounding) { | ||
SettingsIonRounding processSettings = (SettingsIonRounding)settings; | ||
IonRoundMethod.setActive(processSettings.getIonRoundMethod()); | ||
} | ||
} | ||
} | ||
} |
54 changes: 54 additions & 0 deletions
54
....filter/src/org/eclipse/chemclipse/chromatogram/filter/system/FilterRetentionIndexQC.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,54 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2021 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 org.eclipse.chemclipse.chromatogram.filter.system; | ||
|
||
import java.util.Collection; | ||
import java.util.Collections; | ||
|
||
import org.eclipse.chemclipse.processing.supplier.IProcessSupplier; | ||
import org.eclipse.chemclipse.processing.supplier.IProcessTypeSupplier; | ||
import org.eclipse.chemclipse.processing.supplier.ProcessExecutionContext; | ||
import org.eclipse.chemclipse.processing.system.AbstractSystemProcessSettings; | ||
import org.eclipse.chemclipse.processing.system.AbstractSystemProcessSupplier; | ||
import org.eclipse.chemclipse.processing.system.ISystemProcessSettings; | ||
import org.osgi.service.component.annotations.Component; | ||
|
||
@Component(service = {IProcessTypeSupplier.class}) | ||
public class FilterRetentionIndexQC extends AbstractSystemProcessSettings { | ||
|
||
private static final String ID = "org.eclipse.chemclipse.chromatogram.filter.system.retentionIndexQualityControl"; | ||
private static final String NAME = "Quality Control - Retention Index"; | ||
private static final String DESCRIPTION = "This filter sets the system quality control settings."; | ||
|
||
@Override | ||
public Collection<IProcessSupplier<?>> getProcessorSuppliers() { | ||
|
||
return Collections.singleton(new ProcessSupplier(this)); | ||
} | ||
|
||
private static final class ProcessSupplier extends AbstractSystemProcessSupplier<SettingsRetentionIndexQC> { | ||
|
||
public ProcessSupplier(IProcessTypeSupplier parent) { | ||
|
||
super(ID, NAME, DESCRIPTION, SettingsRetentionIndexQC.class, parent); | ||
} | ||
|
||
@Override | ||
public void executeUserSettings(ISystemProcessSettings settings, ProcessExecutionContext context) throws Exception { | ||
|
||
if(settings instanceof SettingsRetentionIndexQC) { | ||
SettingsRetentionIndexQC processSettings = (SettingsRetentionIndexQC)settings; | ||
org.eclipse.chemclipse.model.preferences.PreferenceSupplier.setUseRetentionIndexQC(processSettings.isUseRetentionIndexQC()); | ||
} | ||
} | ||
} | ||
} |
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
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
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
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
Oops, something went wrong.