Skip to main content

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

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




Back to the top