annotate +mpm/status.m @ 31:769d1d252a3c

Change name of todo.txt to notes.txt
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 18 Sep 2018 14:17:13 +0200
parents d9f899b1dfd0
children 1fe5080cac46
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
30
d9f899b1dfd0 Add status command and make subpathIsActive a static method
Jonatan Werpers <jonatan@werpers.com>
parents: 26
diff changeset
1 function status(projectFolder)
d9f899b1dfd0 Add status command and make subpathIsActive a static method
Jonatan Werpers <jonatan@werpers.com>
parents: 26
diff changeset
2 if ~exist('projectFolder', 'var') || isempty(projectFolder)
d9f899b1dfd0 Add status command and make subpathIsActive a static method
Jonatan Werpers <jonatan@werpers.com>
parents: 26
diff changeset
3 projectFolder = pwd;
d9f899b1dfd0 Add status command and make subpathIsActive a static method
Jonatan Werpers <jonatan@werpers.com>
parents: 26
diff changeset
4 end
d9f899b1dfd0 Add status command and make subpathIsActive a static method
Jonatan Werpers <jonatan@werpers.com>
parents: 26
diff changeset
5
21
02c290e2018c Refactor ui functions to use the MPM class. Not tested
Jonatan Werpers <jonatan@werpers.com>
parents: 4
diff changeset
6 m = mpm.MatlabPathManager();
30
d9f899b1dfd0 Add status command and make subpathIsActive a static method
Jonatan Werpers <jonatan@werpers.com>
parents: 26
diff changeset
7 loaded = m.loadedSubpaths();
d9f899b1dfd0 Add status command and make subpathIsActive a static method
Jonatan Werpers <jonatan@werpers.com>
parents: 26
diff changeset
8 project = m.projectSubpaths(projectFolder);
d9f899b1dfd0 Add status command and make subpathIsActive a static method
Jonatan Werpers <jonatan@werpers.com>
parents: 26
diff changeset
9
d9f899b1dfd0 Add status command and make subpathIsActive a static method
Jonatan Werpers <jonatan@werpers.com>
parents: 26
diff changeset
10 fprintf('Project:\n')
d9f899b1dfd0 Add status command and make subpathIsActive a static method
Jonatan Werpers <jonatan@werpers.com>
parents: 26
diff changeset
11 for i = 1:length(project)
d9f899b1dfd0 Add status command and make subpathIsActive a static method
Jonatan Werpers <jonatan@werpers.com>
parents: 26
diff changeset
12 fprintf('\t%s ', project{i});
d9f899b1dfd0 Add status command and make subpathIsActive a static method
Jonatan Werpers <jonatan@werpers.com>
parents: 26
diff changeset
13
d9f899b1dfd0 Add status command and make subpathIsActive a static method
Jonatan Werpers <jonatan@werpers.com>
parents: 26
diff changeset
14 if m.subpathIsActive(fullfile(projectFolder,project{i}), split(path, pathsep))
d9f899b1dfd0 Add status command and make subpathIsActive a static method
Jonatan Werpers <jonatan@werpers.com>
parents: 26
diff changeset
15 fprintf('(active)');
d9f899b1dfd0 Add status command and make subpathIsActive a static method
Jonatan Werpers <jonatan@werpers.com>
parents: 26
diff changeset
16 else
d9f899b1dfd0 Add status command and make subpathIsActive a static method
Jonatan Werpers <jonatan@werpers.com>
parents: 26
diff changeset
17 fprintf('(inactive)');
d9f899b1dfd0 Add status command and make subpathIsActive a static method
Jonatan Werpers <jonatan@werpers.com>
parents: 26
diff changeset
18 end
d9f899b1dfd0 Add status command and make subpathIsActive a static method
Jonatan Werpers <jonatan@werpers.com>
parents: 26
diff changeset
19
d9f899b1dfd0 Add status command and make subpathIsActive a static method
Jonatan Werpers <jonatan@werpers.com>
parents: 26
diff changeset
20 fprintf('\n')
d9f899b1dfd0 Add status command and make subpathIsActive a static method
Jonatan Werpers <jonatan@werpers.com>
parents: 26
diff changeset
21 end
d9f899b1dfd0 Add status command and make subpathIsActive a static method
Jonatan Werpers <jonatan@werpers.com>
parents: 26
diff changeset
22 fprintf('\n')
4
38c29c9ba07f Add function for showing the state
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
23
38c29c9ba07f Add function for showing the state
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
24 fprintf('Loaded subpaths:\n')
30
d9f899b1dfd0 Add status command and make subpathIsActive a static method
Jonatan Werpers <jonatan@werpers.com>
parents: 26
diff changeset
25 for i = 1:length(loaded);
d9f899b1dfd0 Add status command and make subpathIsActive a static method
Jonatan Werpers <jonatan@werpers.com>
parents: 26
diff changeset
26 fprintf('\t%s\n', loaded{i});
4
38c29c9ba07f Add function for showing the state
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
27 end
38c29c9ba07f Add function for showing the state
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
28 end