From a1c0081ef1d000eeea7018c842d449dd9c27f739 Mon Sep 17 00:00:00 2001 From: Stephen Scott Date: Tue, 21 Jul 2020 13:05:30 -0400 Subject: [PATCH] Added Utility submodule --- .gitmodules | 3 +++ src/Utility | 1 + src/Utility/gcbs.m | 16 ---------------- src/Utility/gcls.m | 28 ---------------------------- 4 files changed, 4 insertions(+), 44 deletions(-) create mode 100644 .gitmodules create mode 160000 src/Utility delete mode 100644 src/Utility/gcbs.m delete mode 100644 src/Utility/gcls.m diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..8e6d09c --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "src/Utility"] + path = src/Utility + url = https://github.com/McSCert/Simulink-Utility diff --git a/src/Utility b/src/Utility new file mode 160000 index 0000000..e240dfc --- /dev/null +++ b/src/Utility @@ -0,0 +1 @@ +Subproject commit e240dfc1e0b5bdbd94a69add80b2564f0e853396 diff --git a/src/Utility/gcbs.m b/src/Utility/gcbs.m deleted file mode 100644 index bf617ed..0000000 --- a/src/Utility/gcbs.m +++ /dev/null @@ -1,16 +0,0 @@ -function sels = gcbs - %sels = gcbs - %returns a cell array of all currently selected blocks - %limited to the subsystem established by GCB. - %C. Hecker/11Dec06 - if isempty(gcb) - sels = {}; - else - ssys = get_param(gcb, 'parent'); - nBlks = find_system(ssys,'SearchDepth',1, 'LookUnderMasks', 'all', 'FollowLinks', 'on'); - nBlks = nBlks(2:end); %strip off parent system name - idx = strcmp(get_param(nBlks, 'selected'), 'on'); - sels = nBlks(idx); - end -end - diff --git a/src/Utility/gcls.m b/src/Utility/gcls.m deleted file mode 100644 index bcf0063..0000000 --- a/src/Utility/gcls.m +++ /dev/null @@ -1,28 +0,0 @@ -function sels = gcls - % GCLS Get all currently selected lines. - % - % Inputs: - % N/A - % - % Outputs: - % sels Numeric array of line handles. - % - % Example: - % >> lines = gcls - % - % lines = - % 26.0001 - % 28.0004 - - - if verLessThan('simulink', '8.2') % IncludeCommented available in 2013b (8.2) and higher - objs = find_system(gcs, 'LookUnderMasks', 'on', 'Findall', 'on', ... - 'FollowLinks', 'on', 'Type', 'line', 'Selected', 'on'); - else - objs = find_system(gcs, 'LookUnderMasks', 'on', 'Findall', 'on', ... - 'FollowLinks', 'on', 'IncludeCommented', 'on', 'Type', 'line', 'Selected', 'on'); - end - - % Flip order. find_system returns in descending order. - sels = flipud(objs); -end \ No newline at end of file