wiki:Entry_MS_Annotation_Glycan_Migration

Version 1 (modified by sena, 4 years ago) (diff)

--

Two diversions from the original code during migration (in MSGlycanAnnotationMultiPageViewer):

        protected MSGlycanAnnotationSummary getNewSummaryView( Entry entry, MassSpecEntityProperty entityProperty) {
		MSGlycanAnnotationMultiPageViewer parent = MSGlycanAnnotationMultiPageViewer.getActiveViewerForEntry(getContext(), entry.getParent());
		if ( parent != null ) {		
			getPart().getContext().set(MSAnnotationDetails.class, getDetailsView());
			MSGlycanAnnotationSummary view = ContextInjectionFactory.make(MSGlycanAnnotationSummary.class, getPart().getContext());
			view.setDtpdThreadedDialog(getThreadedDialog());
			return view;
		}
		return null;
	}

The original code has the first statement as shown below. Trying to find the active viewer for the part's Entry (with MSAnnotationEntityProperty) but we had to change it to use part's parent Entry (with MSGlycanAnnotationProperty) to be able to locate the correct active page.

       MSGlycanAnnotationMultiPageViewer parent = MSGlycanAnnotationMultiPageViewer.getActiveViewerForEntry(getContext(), entry);

Similarly "getNewDetailsView" has the same change.