Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [chemclipse-dev] Help: display chromatogram during acquisition

The chromatogramFile of the editor ist set to null if an instance is to shown to ask the user where to store the chromatogram when pressing von "Save".

Am 31.08.2016 um 15:34 schrieb Trig Chen:

2016-08-31 14:53 GMT+08:00 Philip Wenig <philip.wenig@xxxxxxxxxxxxx>:
When recording the chromatogram, you could use your chromatogram object to display the data and fire the updates, see how the chromatogram editor is created. It requires a file or an IChromatogramMSD instance:

org.eclipse.chemclipse.ux.extension.msd.ui.editors.ChromatogramEditorMSD

    private void loadChromatogram() {

        try {
            /*
             * Import the chromatogram without showing it on the gui. The GUI
             * will take care itself of this action.
             */
            Object object = part.getObject();
            if(object instanceof String) {
                /*
                 * Try to load the chromatogram from file.
                 */
                File file = new File((String)object);
                importChromatogram(file);
            } else if(object instanceof IChromatogramMSD) {
                IChromatogramMSD chromatogram = (IChromatogramMSD)object;
                chromatogramSelection = new ChromatogramSelectionMSD(chromatogram);
It seems the chromatogramSelection field is very important and should not be absent.
 I created an EditorMSD and set it's object to chromatogram. But I don't know how to create a chromatogramSelection for the EditorMSD. There is not a setter method to set chromatogramSelection. :(.

                chromatogramFile = null;  
Why set chromatogramFile to null?
 
            }
        } catch(Exception e) {
            logger.warn(e);
        }
    }

Have a look at the convenient class that helps to open a chromatogram from file or from instance:

org.eclipse.chemclipse.ux.extension.msd.ui.support.ChromatogramEditorSupport

public void openEditor(IChromatogram chromatogram, EModelService modelService, MApplication application, EPartService partService) {
...

Please also check, that the retention time (in milliseconds) is set in each scan of your chromatogram.


Best,
Philip





_______________________________________________
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