Changes between Version 1 and Version 2 of Entry_MS_Migration


Ignore:
Timestamp:
11/03/2016 05:47:52 PM (4 years ago)
Author:
sena
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Entry_MS_Migration

    v1 v2  
    11== Migrating the multi-page viewer ==
    2 Each of the MS plugins have a multi-page viewer that extends from CancelableMultiPageEditor (core plugin). For this specific plugin the class is MassSpecMultiPageViewer. One of the major changes for this editor and all the pages (tabs) of the editor is the removal of the reference to ViewInput (core plugin - uses IEditorInput).
     2Each of the MS plugins have a multi-page viewer that extends from CancelableMultiPageEditor (core plugin). For this specific plugin the class is MassSpecMultiPageViewer. One of the major changes for this editor and all the pages (tabs) of the editor is the removal of the reference to ViewInput (core plugin - uses IEditorInput). All pages to be added to a multi-page editor now implement an interface IEntryEditorPart which will give them access to the Entry.
     3
     4{{{
     5public interface IEntryEditorPart {
     6        Entry getEntry();
     7        void setEntry (Entry entry);
     8       
     9        void createPartControl(Composite parent);
     10
     11        void setDirty(boolean b);
     12        boolean isDirty();
     13}
     14}}}
    315
    416Multi-page editor requires a CTabFolder to hold the pages and each page needs to be added as a CTabItem to this folder. CancelableMultiPageEditor handles the interactions such as adding pages so MassSpecMultiPageViewer does not need to change much to handle the addition of pages (tabs). One major change is that all the pages need to be created with ContextInjectionFactory.make(...) method to be able access injected objects later. The following code shows the required changes: