IntelliJ space added after comment starting with /** in scala - scala

In IntelliJ IDEA 2016.3.3 the comment code is formatted like this:
/** ***********************/
/* BACKEND CONFIGURATION */
/** ***********************/
Notice the space after /**
Is it possible to remove that space?
= UPDATE =
To be more precise, I am using these comments solely in-line to (same as I did in java) mark important blocks if algorithm is lengthy.
I just have tested this
/************************
* Test text
* #param jobConfig
*/
class AutoencoderTrainingJob(val jobConfig: Sometype
scaladoc is being displayed by IntelliJ Quick Documentation. The additional asterisks just show up as part of class descirption

Related

In JSDoc, is there a way to define terms in a separate file and link them within function docs?

What I would like is to write something like this:
/**
* Takes a foo and {#link grokelates} it.
*/
function doSomething(foo) {
}
And have "grokelates" be a link to more detail on what "grokelate" means, but because I'm going to have functions dealing with grokelation all over my code base, I'd like to write that definition once and link to it in multiple places.
Is this possible?
To be clear, grokelates is not a function. It's just a word I want to define, but not have to define in-line everywhere I use it. I basically want to write a glossary file and be able to link to definitions from that glossary in my JSDoc.
Ideally this would also be in a way the VS Code picks it up and lets someone navigate to that definition on hover.
Yes there is. When you run jsdoc to generate your documentation, you can pass it any filetype you wish. A standard practice is to create one or more *.jsdoc files which contain doclet comments (those that begin with /**) to describe features you expect to use elsewhere in your code. For instance:
// filename: grokelation.jsdoc
/**
* #module grokelates
*/
/**
* #name Grokelate
* #memberof module:grokelates
* #description
* Here is the description of the grokelation process.
*
* #example
* var g = new Grokelate(opts);
*/
Then, when you wish to reference this new object elsewhere in your documentation, simply use its long name module:grokelates~Grokelate where you can consider the ~ glyph to mean "member of".
In your example above, you'd say {#link module:grokelates~Grokelate}.

Preserving jsdoc comments and VS Code intellisense with babel

I have a javascript library for communicating with server APIS, written in modern ECMAScript.
It is fully documented with JSDoc comments:
/**
* #class - TODOS API Client class
*/
class todosApi {
/**
* Gets Todos, given the parameters
* #param {number} personId
* #param {number} [year]
* #param {number} [month]
* #param {number} [todoTypeId]
* #returns {Object} - api response object, data will be array of todos
*/
fetchTodos = async (....
}
When using this API in the unit tests in this project, in Visual Studio code, I have excellent intellisense from these comments, and it's a beautiful thing.
However, this library is used by/referenced in a separate react application created with create-react-app. When I run this through babel to transpile into a format that is consumable by my create-react-app app, it ends up like this:
/**
* #class - TODOS API Client class
*/
class todosApi {
_defineProperty(this, "fetchTodos", async (personId, eventYear, eventMonth, todoTypeId) => {
}
And I lose my intellisense for fetchTodos, and actually the class itself because of how it is exported in and index.js file. babel does have the option to include comments by default, however the class gets a little mangled in transpiling and loses some comments.
Is there any way to transpile and still preserve this intellisense for VS Code?
Use tsd-jsdoc to create a types.d.ts file.
In your package.json add a script to run ...
jsdoc -r src -t node_modules/tsd-jsdoc/dist -d lib
And set types to lib/types.d.js.
Include that script as part of prepublishOnly so it runs before every npm publish.

Netbeans 8 auto add author to method comment

When I type a methods and generate comments via /** enter.
It generates comment like this.
/**
* #param int $weight
* #return \KT_Forbes_Theme_Model
*/
Is the a possibility to auto add #author ?
/**
* #author A good guy
* #param int $weight
* #return \KT_Forbes_Theme_Model
*/
I have to add the #autor manualy for all the method, it is really anoing.
It seems that it is not possible in current NetBeans versions as reported in https://netbeans.org/bugzilla/show_bug.cgi?id=251426. Also there are some related posts about this issue Modify command / template for function commenting in NetBeans. Triggering with "/** + Enter key" or Edit Comment Template in Netbeans PHP 6.8 (this last one does not solve the issue - at least in NetBeans 8.1).
I'm currently fighting with the IDE to include the auto comments with some data cause the comment added looks like:
/**
*
*/
whitout any info included.
This output is given typically for void methods, with no parameters.
i.e. public void parameterMapping()
For methods that have parameters and a return value should look like this:
/**
*
* #param parameter
* #return
*/
private ASTNode recursiveParameterParser(ASTNode parameter)

Can different styles be read by Doxygen

Can Both Style of comments below be read by Doyxgen?
The Doxy Block Comments are in this format:
/**
* \brief
* \param
* \return
*/
and the ones in the libstdc++ are in this format:
/**
* #brief
* #param
* #return
*/
I think the correct formats are like:
/*!
\brief
\param
\return
*/
and
/**
* #brief
* #param
* #return
*/
Mixed style couldn't work.
I finally was able to test both methods in the original question and they both work. Also the additional method posted in one of the answers works as well. If you have other methods that work please add them. Thank you everybody for the advice.
Oh and by the way if you are using codeblocks. The software does not come with doxygen pre-installed. You have to install it to use the doxyblocks features.

doxygen separate interface(.h)/implemetation(.c) documentation

I'm trying to generate a doxygen document where I have two documentation instances for functions. One describes the usage(interface) of the functions that get pulled from the function header in the .h file and the other describes implementation of the function that gets pulled from the .c file. I basically want to describe the same function in two different ways based on where the file that the description came from(.h or .c). I thought this would help the usability of the document since you can easily ignore the implementation details if you only care about how to use the functions. My best attempt was to try to add the .h and the .c files to separate groups like this.
example.h
/**
* #defgroup exampleInterface Example Interface
* #{
*/
/**
* This is the header file so I describe how to use this function
* #param arg
* #returns something
*/
int someFunction(int arg);
/**
* #}
*/
example .c
/**
* #defgroup exampleImpl Example Implementation
* #{
*/
/**
* This is the .c file so I describe how this function is implemented.
*/
int someFunction(int arg)
{
... Some code ...
}
/**
* #}
*/
The result was that the function header descriptions were still combined. Is there anyway to accomplish this in doxygen? Maybe there is another way I should look at this problem.
Thanks.
A possible hack you could try is to use the #internal command for the implementation which would mean you would run doxygen twice: once without the internal (for the external definitions) and the other with the inernal which would combine them.