次のコードがあります。
/**
* @fileOverview Various tool functions.
* @version 3.1.2
*/
define(function (require, exports, module) {
"use strict";
/**
* A module that handles file
* @module fileHandler
*/
/// Form to open a new set of files
var newFileForm = require("pvsioweb/forms/newFileForm");
var formEvents = require("pvsioweb/forms/events");
/// Reference to current project, main.js passes it by using fileHandler_setProject
var currentProject;
/**
* this is a function
* @param p1 First parameter
* @param p2 Second parameter
* @return {String} some value
*/
function setProject(project)
{
currentProject = project;
}
/**
* Create a new file, it is going to be shown in the listview: #pvsFiles
*
* @param name: name of the file
* @param content: textual content of the file
*
* @returns void
*
*/
function new_file(name, content )
{
var default_name = "MyTheory.pvs";
var default_content = "MyTheory" + " THEORY BEGIN \nEND MyTheory" ;
if( ! name ) { name = default_name; }
if( ! content ) { content = default_content; }
currentProject.addSpecFile(default_name, default_content);
renderSourceFileList(currentProject.pvsFiles());
}
/**
* Display new file form, invoke function open_file (see below)
*
* @returns void
*
*/
function open_file_form()
{
newFileForm.create().addListener(formEvents.FormCancelled, function (e) {
console.log(e);
e.form.remove();
}).addListener(formEvents.FormSubmitted, function (e) {
console.log(e);
e.form.remove();
open(e.formJSON);
});
}
/**
* Open file specified in data, data must have this structure: ???? FIXME
*
* @param data: ??? FIXME
*
* @returns void
*
*/
function open_file(data)
{
var q = queue(), i;
for (i = 0; i < data.pvsSpec.length; i++) {
q.defer(createFileLoadFunction(data.pvsSpec[i]));
}
q.awaitAll(function (err, res) {
currentProject.saveNew(function (err, res) {
console.log({err: err, res: res});
renderSourceFileList(currentProject.pvsFiles());
});
});
}
/********* Exported Function ******************/
module.exports = {
new_file: function (name, content) {
return new_file(name, content);
},
open_file_form: function () {
return open_file_form();
},
open_file: function () {
return open_file();
},
setProject: function (project) {
return setProject(project);
}
};
/***********************************************/
});
jsdoc を使用していくつかの出力を作成しようとしましたが、ファイルの先頭にあるモジュールという単語とヘッダーだけを認識するようです。
関数に関するドキュメントも表示されるように修正するにはどうすればよいですか?
ありがとう