Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [chemclipse-dev] Editor title problem

The method, as it is, has been implemented due to the following reason as chromatograms are stored in different hierachies, e.g.:

CDF -> chromatogram.cdf
Agilent -> Chromatogram.D/DATA.MS
MassHunter -> Chromatogram.D/acqData/MSScan.xsd, MSScan.bin, ...
Waters -> Chromatogram.raw/_FUNC001.DAT, _FUNC001.IDX, ...
...

Hence, the user don't like to see "Chromatogram.D/DATA.MS" or "DATA.MS". I just want to see the name "Chromatogram".
But I agree with you, that it could be beneficial to see the type "Agilent", "MassHunter", ... of the displayed chromatogram.

But another problem would then occur, when you try to save the chromatogram. It would be then saved e.g. as "Chromatogram1 Agilent.cdf" instead of just "Chromatogram1.cdf".

Anyhow, I encourage you and other to play with the software and to find a smart solution that's not breaking the current functionality, e.g. that only the editor displays additional information of the chromatogram type, e.g. getName() + " [" + chromatogram.getVendor() + "]".


Best,
Philip

Am 27.08.2016 um 07:47 schrieb Trig Chen:
Check the source code of method org.eclipse.chemclipse.model.core.AbstractChromatogram.extractNameFromFile(String), it trims the file extension such .ocb, .tms. This would bring some confusion in the case that two files have same names but different extensions.
For example, I had a sample acquiring spectrum with vendor A's instrument and got a result file "sample.cdf". I also had this sample acqiring another spectrum with vendor B's instrument and got another result file "sample.ms".  When there two file are opened in OpenChrom at the same time, it would be difficult to distinguish the editor parts for their same tab title.

So,  is it necessary to trim the file extension for the editor part tab title? 

Best regards,

Trig

2016-08-27 13:17 GMT+08:00 Trig Chen <trigchen@xxxxxxxxx>:
Thank you, Philip. The problem was resolved by adding setFile() in cn.edu.xmu.tidems.control.support.ChromatogramReader_1100.read(File, IProgressMonitor) method:
@Override
public IChromatogramMSD read(final File file, final IProgressMonitor monitor) throws FileNotFoundException, FileIsNotReadableException, FileIsEmptyException, IOException {

IChromatogramMSD chromatogram = null;
final ZipFile zipFile = new ZipFile(file);
try {
if(isValidFileFormat(zipFile)) {
monitor.subTask(IConstants.IMPORT_CHROMATOGRAM);
chromatogram = readFromZipFile(zipFile, file, monitor);
if(chromatogram != null) {
chromatogram.setFile(file);
}
}
} finally {
zipFile.close();
}
//
return chromatogram;
}


Best regards,

Trig

2016-08-26 17:51 GMT+08:00 Philip Wenig <philip.wenig@xxxxxxxxxxxxx>:
When reading the *.tms files, do you set the file?

        chromatogram.setFile(file);

It is needed to resolve the name:

cn.edu.xmu.tidems.control.model.VendorChromatogram
...
    @Override
    public String getName() {

        return extractNameFromFile("ChromatogramTOF");
    }
...


Best,
Philip


Am 25.08.2016 um 18:17 schrieb Trig Chen:
It's strange the titles of openned chromatogram files was the default name ("TideMS") not their file names such as "tideMS20160825231707.tms, tideMS20160825231702.tms" with file extension trimmed. 

But  the DemoChromatogram.ocb file's name is properly show in editor title. What's wrong with my file?


Best regards,

Trig


_______________________________________________
chemclipse-dev mailing list
chemclipse-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/chemclipse-dev
-- 
~~~~~~~~~~~~~~~~~~~~~~~~
OpenChrom - the open source alternative for chromatography / mass spectrometry
Dr. Philip Wenig » Founder » philip.wenig@xxxxxxxxxxxxx » http://www.openchrom.net
~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________ chemclipse-dev mailing list chemclipse-dev@xxxxxxxxxxx To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/chemclipse-dev
_______________________________________________
chemclipse-dev mailing list
chemclipse-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/chemclipse-dev
-- 
~~~~~~~~~~~~~~~~~~~~~~~~
OpenChrom - the open source alternative for chromatography / mass spectrometry
Dr. Philip Wenig » Founder » philip.wenig@xxxxxxxxxxxxx » http://www.openchrom.net
~~~~~~~~~~~~~~~~~~~~~~~~

Back to the top