function ext = edit_extension_description(ext)

% edit_extension_description - edit extension description through dialog
% ----------------------------------------------------------------------
%
% ext = edit_extension_description(ext)
%
% Input:
% ------
%  ext - extension to edit
%
% Output:
% -------
%  ext - possibly edited extension

%--------------------------------
% Author: Harold Figueroa
%--------------------------------
% $Revision: 1380 $
% $Date: 2005-07-27 18:37:56 -0400 (Wed, 27 Jul 2005) $
%--------------------------------

%--
% present extension description dialog
%--

out = extension_description_dialog(ext);

if (isempty(out.values))
	return; 
end

%----------------------------------
% REGENERATE MAIN
%----------------------------------

return;

%--
% generate lines for new main
%--

% TODO: create 'generate_extension_main' function, this should take either
% the name of the extension or an extension, in the first case we generate
% the trivial function (consider 'extension_inherit' case), in the second
% case we also include all the description lines

%--
% clear and overwrite main
%--

% NOTE: we clear using the function handle

clear(func2str(ext.fun.main));

% NOTE: here we get the full filename for the main

main = get_extension_main(ext);

file_writelines(main,lines);
