G'day,

This is a great improvement.

A related question.  I often see code like the following

new FooTask(..., parameters.clone());

It shouldn't be necessary to clone the parameter set should it?

In fact, I think it's up to FooTask to decide how it deals with the 
ParameterSet it is passed.  Many take copies of individual parameter values in 
the constructor for later use in their run() methods.  Others copy the 
ParameterSet in their constructor and then get the parameter values as they're 
needed.

It's the latter case where the Task should clone() the ParameterSet isn't it 
(in case during execution of the Task the user modifies the global instance of 
the module's ParameterSet).

Regards,
Chris.

-----
Hi all,

I found an annoying bug in MZmine (up to last version 2.5). If you create a 
batch with two steps of the same mass detector (e.g. Centroid), then the 
instance of the parameter set of this mass detector is shared for both steps 
and it is not possible to set different parameters to them. This bug was 
probably caused by a general confusion in how many instances of ParameterSet 
should exist: the MZmineModule interface had a getParameterSet() method, but 
the runModule() method had another ParameterSet as its parameter. To make the 
story short, I decided to fix this by changing the MZmineModule interface and 
took this as an opportunity to cleanup some old code.

The MZmineModule interface now defines the modules's parameter class using this 
method:

     public Class<? extends ParameterSet>  getParameterSetClass();

There is a new interface MZmineConfiguration that stores the global (main) 
parameter set for each module.
During startup, one instance of each module's parameter set is created and 
stored in the configuration class.

I moved the code for loading/saving configuration to the configuration class, 
so the MZmineCore class is now a bit shorter.

Additionally, I created a new interface MZmineProcessingStep, which represents 
a pair of a module and its parameter set.
For example, this is used for each step of the batch mode processing.

Please update your sources from the trunk and let me know if have any 
questions/problems.

Cheers,

Tomas


This message may contain confidential information. If you are not the 
designated recipient, please notify the sender immediately, and delete the 
original and any copies. Any use of the message by you is prohibited. 



------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Mzmine-devel mailing list
Mzmine-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mzmine-devel

Reply via email to