-
Notifications
You must be signed in to change notification settings - Fork 2
/
PreContextMenu.m
31 lines (28 loc) · 1.2 KB
/
PreContextMenu.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This file is part of CoCoSim.
% Copyright (C) 2018 The university of Iowa
% Author: Mudathir Mahgoub
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
classdef PreContextMenu
methods(Static)
function schemaFcns = preContextMenu
schemaFcns = {@PreContextMenu.cocoSimActions};
end
function schema = cocoSimActions(callbackInfo)
schema = sl_container_schema;
schema.label = 'CoCoSim';
schema.statustip = 'CoCoSim';
schema.autoDisableWhen = 'Busy';
modelWorkspace = get_param(callbackInfo.studio.App.blockDiagramHandle,'modelworkspace');
if ~isempty(modelWorkspace) && modelWorkspace.hasVariable('compositionalMap')
schema.childrenFcns = {...
@VerificationMenu.displayHtmlVerificationResults,...
@VerificationMenu.compositionalOptions,...
@MiscellaneousMenu.replaceInportsWithSignalBuilders...
};
else
schema.childrenFcns = {@MiscellaneousMenu.replaceInportsWithSignalBuilders};
end
end
end
end