@@ -83,6 +83,7 @@ function bind(obj)
8383 obj .addListener(v , ' AddSource' , @obj .onViewSelectedAddSource );
8484 obj .addListener(v , ' BeginEpochGroup' , @obj .onViewSelectedBeginEpochGroup );
8585 obj .addListener(v , ' EndEpochGroup' , @obj .onViewSelectedEndEpochGroup );
86+ obj .addListener(v , ' AddNoteToExperiment' , @obj .onViewSelectedAddNoteToExperiment );
8687 obj .addListener(v , ' SelectedProtocol' , @obj .onViewSelectedProtocol );
8788 obj .addListener(v , ' SetProtocolProperty' , @obj .onViewSetProtocolProperty );
8889 obj .addListener(v , ' MinimizeProtocolPreview' , @obj .onViewSelectedMinimizeProtocolPreview );
@@ -238,6 +239,13 @@ function onViewSelectedEndEpochGroup(obj, ~, ~)
238239 function onServiceEndedEpochGroup(obj , ~, ~)
239240 obj .updateStateOfControls();
240241 end
242+
243+ function onViewSelectedAddNoteToExperiment(obj , ~, ~)
244+ experiment = obj .documentationService .getExperiment();
245+ experimentSet = symphonyui .core .persistent .collections .EntitySet(experiment );
246+ presenter = symphonyui .ui .presenters .AddNotePresenter(experimentSet );
247+ presenter .goWaitStop();
248+ end
241249
242250 function onServiceDeletedEntity(obj , ~, ~)
243251 obj .updateStateOfControls();
@@ -460,6 +468,7 @@ function updateStateOfControls(obj)
460468 enableAddSource = hasOpenFile && isStopped ;
461469 enableBeginEpochGroup = hasSource && isStopped ;
462470 enableEndEpochGroup = hasEpochGroup && isStopped ;
471+ enableAddNoteToExperiment = hasOpenFile && isStopped ;
463472 enableSelectProtocol = hasAvailableProtocol && isStopped ;
464473 enableProtocolProperties = isStopped ;
465474 enableViewOnly = isValid && (isViewingPaused || isStopped );
@@ -483,6 +492,7 @@ function updateStateOfControls(obj)
483492 obj .view .enableAddSource(enableAddSource );
484493 obj .view .enableBeginEpochGroup(enableBeginEpochGroup );
485494 obj .view .enableEndEpochGroup(enableEndEpochGroup );
495+ obj .view .enableAddNoteToExperiment(enableAddNoteToExperiment );
486496 obj .view .enableSelectProtocol(enableSelectProtocol );
487497 obj .view .enableProtocolProperties(enableProtocolProperties );
488498 obj .view .enableViewOnly(enableViewOnly );
0 commit comments