0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1 % REBUILDLIBRARY rebuilds the library on the workbench by processing the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
2 % ltpda_versions cell-array.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
3 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
4 % CALL: wb.rebuildLibrary
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
5 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
6 % M Hewitson 11-10-08
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
7 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
8 % $Id: rebuildLibrary.m,v 1.17 2011/04/28 13:26:26 hewitson Exp $
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
9 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
10 function varargout = rebuildLibrary(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
11 % setup library
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
12 lib = mpipeline.jltpda.LTPDAlibrary('LTPDA');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
13 % Get current verbose level
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
14 prefs = getappdata(0, 'LTPDApreferences');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
15 vl = double(prefs.getDisplayPrefs.getDisplayVerboseLevel);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
16 prefs.getDisplayPrefs.setDisplayVerboseLevel(java.lang.Integer(-1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
17 % Add each user class
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
18 ucls = utils.helper.ltpda_userclasses;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
19
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
20 % Add any user-class subclasses from extension modules
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
21 searchPaths = prefs.getExtensionsPrefs.getSearchPaths;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
22 for kk=0:searchPaths.size-1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
23 % path to the new classes
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
24 path = fullfile(char(searchPaths.get(kk)), 'classes');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
25 % get a list of class directories
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
26 classdirs = utils.prog.dirscan(path, '@.*');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
27 for jj=1:numel(classdirs)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
28 parts = regexp(classdirs{jj}, '@', 'split');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
29 cldir = parts{end};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
30 md = meta.class.fromName(cldir);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
31 if utils.helper.isSubclassOf(md, 'ltpda_uo')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
32 fprintf('+ adding user-object class %s from extension %s\n', md.Name, path);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
33 ucls = [ucls {md.Name}];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
34 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
35 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
36 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
37
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
38 cats = utils.const.categories.list;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
39 cats = cats(~strcmp(cats, 'Internal'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
40 cats = cats(~strcmp(cats, 'GUI function'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
41 warning off
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
42
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
43 %% Build the infrastructure first
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
44 for jj=1:numel(ucls)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
45 clcat = mpipeline.jltpda.LTPDAcategory(ucls{jj});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
46 lib.addCategory(clcat);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
47 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
48
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
49 % Now go through and add the contents
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
50 for jj=1:numel(ucls)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
51 clcat = lib.getCategoryByName(ucls{jj});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
52 disp(sprintf('** Building: %s', ucls{jj}));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
53 % add each algorithm for this class/category
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
54 [clmethods, infos] = getPublicMethods(ucls{jj});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
55 % add each method to its subcategory
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
56 for ll=1:numel(clmethods)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
57 ii = infos(ll);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
58 mthCategory = ii.mcategory;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
59 cat = clcat.getCategoryByName(mthCategory);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
60 if isempty(cat)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
61 if ~strcmp(mthCategory, 'Internal') && ~strcmp(mthCategory, 'GUI function')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
62 cat = mpipeline.jltpda.LTPDAcategory(mthCategory);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
63 clcat.addSubCategory(cat);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
64 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
65 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
66 % else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
67 if ~isempty(cat)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
68 disp(sprintf(' + adding method %s/%s to category %s', ucls{jj}, clmethods{ll}, char(cat.getName)))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
69 a = LTPDAworkbench.minfo2algo(ii);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
70 a.setParamsHTML(html(ii));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
71 cat.addAlgorithm(a);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
72 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
73 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
74 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
75 warning on
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
76 if nargin > 0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
77 wb = varargin{1};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
78 awtinvoke(wb.mp, 'setLibrary', lib);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
79 awtinvoke(wb.mp, 'refreshLibraryTree');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
80 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
81 % set verbose level again
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
82 prefs.getDisplayPrefs.setDisplayVerboseLevel(java.lang.Integer(vl));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
83 if nargout > 0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
84 varargout{1} = lib;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
85 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
86 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
87
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
88
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
89 function [mths, infos] = getPublicMethods(cl)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
90
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
91 disp(sprintf(' collecting methods for %s class...', cl));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
92 mths = {};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
93
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
94 cms = eval(['?' cl]);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
95 infos = [];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
96 for ll=1:numel(cms.Methods)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
97
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
98 mt = cms.Methods{ll};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
99 if ~mt.Static && ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
100 ~mt.Hidden && ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
101 strcmpi(mt.Access, 'public') && ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
102 ~strcmpi(cms.Methods{ll}.DefiningClass.Name, 'handle')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
103
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
104 % get category
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
105 try
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
106 cmd = sprintf('%s.getInfo(''%s'');', cl, mt.Name);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
107 ii = eval(cmd);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
108 % disp([' found method: ' mt.Name]);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
109 mths = [mths {ii.mname}];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
110 infos = [infos ii];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
111 catch
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
112 warning('### could not get info about: %s', mt.Name);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
113 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
114 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
115
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
116 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
117
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
118 [mths,i,j] = unique(mths);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
119 infos = infos(i);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
120
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
121
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
122 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
123
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
124 % Make an html table of the minfo object suitable for display on the GUI
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
125 % help pane.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
126 function txt = html(ii)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
127
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
128 txt = '';
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
129 % Table of the minfo object
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
130 txt = [txt sprintf(' <table cellspacing="0" class="body" cellpadding="2" border="1" width="60%%">\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
131 txt = [txt sprintf(' <thead>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
132 txt = [txt sprintf(' <tr valign="top">\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
133 txt = [txt sprintf(' <th class="categorylist" colspan="2">Some information of the method %s/%s are listed below:</th>\n', ii.mclass, ii.mname)];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
134 txt = [txt sprintf(' </tr>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
135 txt = [txt sprintf(' </thead>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
136 txt = [txt sprintf(' <tbody>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
137 txt = [txt sprintf(' <tr valign="top">\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
138 txt = [txt sprintf(' <td width="25%%" bgcolor="#f3f4f5">Class name</td>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
139 txt = [txt sprintf(' <td bgcolor="#f3f4f5">%s</td>\n', ii.mclass)];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
140 txt = [txt sprintf(' </tr>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
141 txt = [txt sprintf(' <tr valign="top">\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
142 txt = [txt sprintf(' <td width="25%%" bgcolor="#ffffff">Method name</td>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
143 txt = [txt sprintf(' <td bgcolor="#ffffff">%s</td>\n', ii.mname)];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
144 txt = [txt sprintf(' </tr>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
145 txt = [txt sprintf(' <tr valign="top">\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
146 txt = [txt sprintf(' <td width="25%%" bgcolor="#f3f4f5">Category</td>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
147 txt = [txt sprintf(' <td bgcolor="#f3f4f5">%s</td>\n', ii.mcategory)];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
148 txt = [txt sprintf(' </tr>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
149 txt = [txt sprintf(' <tr valign="top">\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
150 txt = [txt sprintf(' <td width="25%%" bgcolor="#ffffff">CVS Version</td>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
151 txt = [txt sprintf(' <td bgcolor="#ffffff">%s</td>\n', ii.mversion)];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
152 txt = [txt sprintf(' </tr>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
153 txt = [txt sprintf(' <tr valign="top">\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
154 txt = [txt sprintf(' <td width="25%%" bgcolor="#f3f4f5">Min input args</td>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
155 txt = [txt sprintf(' <td bgcolor="#f3f4f5">%d</td>\n', ii.argsmin)];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
156 txt = [txt sprintf(' </tr>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
157 txt = [txt sprintf(' <tr valign="top">\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
158 txt = [txt sprintf(' <td width="25%%" bgcolor="#ffffff">Max input args</td>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
159 txt = [txt sprintf(' <td bgcolor="#ffffff">%d</td>\n', ii.argsmax)];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
160 txt = [txt sprintf(' </tr>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
161 txt = [txt sprintf(' <tr valign="top">\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
162 txt = [txt sprintf(' <td width="25%%" bgcolor="#f3f4f5">Min output args</td>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
163 txt = [txt sprintf(' <td bgcolor="#f3f4f5">%d</td>\n', ii.outmin)];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
164 txt = [txt sprintf(' </tr>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
165 txt = [txt sprintf(' <tr valign="top">\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
166 txt = [txt sprintf(' <td width="25%%" bgcolor="#ffffff">Max output args</td>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
167 txt = [txt sprintf(' <td bgcolor="#ffffff">%d</td>\n', ii.outmax)];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
168 txt = [txt sprintf(' </tr>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
169 txt = [txt sprintf(' </tbody>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
170 txt = [txt sprintf(' </table>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
171
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
172 % Table of the sets
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
173 for ll=1:numel(ii.sets)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
174 set = ii.sets{ll};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
175 pl = ii.plists(ll);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
176
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
177 txt = [txt sprintf(' <table cellspacing="0" class="body" cellpadding="4" summary="" width="100%%" border="2">\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
178
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
179 txt = [txt sprintf(' <thead>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
180 txt = [txt sprintf(' <tr valign="top">\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
181 txt = [txt sprintf(' <th bgcolor="#B9C6DD" colspan="4"><h3>%s</h3></th>\n', set)];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
182 txt = [txt sprintf(' </tr>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
183 txt = [txt sprintf(' <tr valign="top">\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
184 txt = [txt sprintf(' <th width="15%%" bgcolor="#D7D7D7">Key</th>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
185 txt = [txt sprintf(' <th width="25%%" bgcolor="#D7D7D7">Default Value</th>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
186 txt = [txt sprintf(' <th bgcolor="#D7D7D7">Options</th>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
187 txt = [txt sprintf(' <th bgcolor="#D7D7D7">Description</th>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
188 txt = [txt sprintf(' </tr>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
189 txt = [txt sprintf(' </thead>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
190
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
191
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
192 txt = [txt sprintf(' <tbody>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
193 for kk=1:pl.nparams
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
194 txt = [txt sprintf(' <tr valign="top">\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
195 txt = [txt sprintf(' <td width="15%%" bgcolor="#F2F2F2">%s</td>\n', pl.params(kk).key)];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
196 ptxt = display(pl.params(kk));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
197 txt = [txt sprintf(' <td width="25%%" bgcolor="#F2F2F2">%s</td>\n', strtrim(strrep(ptxt{3}, 'val:', '')))];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
198 if numel(pl.params(kk).getOptions) > 1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
199 opts = pl.params(kk).getOptions;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
200 optlist ='<ul>';
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
201 for oo=1:numel(opts)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
202 optlist = [optlist '<li><font color="#1111FF">' utils.helper.val2str(opts{oo}) '</font></li>'];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
203 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
204 optlist = [optlist '</ul>'];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
205 txt = [txt sprintf(' <td bgcolor="#F2F2F2">%s</td>\n', optlist)];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
206 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
207 txt = [txt sprintf(' <td bgcolor="#F2F2F2"><i>none</i></td>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
208 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
209 txt = [txt sprintf(' <td bgcolor="#F2F2F2">%s</td>\n', char(strrep(pl.params(kk).desc, '\n', '<br></br>')))];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
210 txt = [txt sprintf(' </tr>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
211
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
212 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
213 txt = [txt sprintf(' </tbody>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
214 txt = [txt sprintf(' </table>\n')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
215
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
216 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
217 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
218
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
219
|