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)
Related
I would like to know if there is any way to get all the scripts parameters when you create a new script (SuiteScript 2.0) using VS Code.
I'm aware that it is possible when using Eclipse IDE but I do really would like to keep using VS Code as I'm already using for Python and JavaScript.
This is what I'm looking for:
/**
* Function definition to be triggered before record is loaded.
*
* Task #5060 : calculate PO Spent Amount and Balance in realtime
*
* #param {Object} scriptContext
* #param {Record} scriptContext.newRecord - New record
* #param {Record} scriptContext.oldRecord - Old record
* #param {string} scriptContext.type - Trigger type
* #Since 2015.2
*/
BTW, I'm already using VS Code Intelisense and NetSuite Uploader extensions.
Thanks
At the time of writing, there are no official plugins from Netsuite for VS Code, only Eclipse & Webstorm are available. However, there is an unofficial plugin from Head-in-the-Cloud that might do what you're after.
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
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.
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.
I'm using Zend Studio for Eclipse (Linux), and I'm trying to generate getter and setters methods in a PHP class.
I try to do this: http://files.zend.com/help/Zend-Studio-Eclipse-Help/creating_getters_and_setters.htm
but I haven't "Generate Getters and Setters" option in Source Menu, it's missed!
Could u help me? Thanks!
Like Omnipotent say, you can use templates to do this. Here what I use:
/**
* #var ${PropertyType}
*/
private $$m${PropertyName};
${cursor}
/**
* Getter for ${PropertyName}
*
* #author ${user}
* #since ${date} ${time}
* #return ${PropertyType} private variable $$m_${PropertyName}
*/
public function get${PropertyName}()
{
return $$this->m_${PropertyName};
}
/**
* Setter for ${PropertyName}
*
* #author ${user}
* #since ${date} ${time}
* #param ${PropertyType} $$Value
*/
public function set${PropertyName}($$Value)
{
$$this->m_${PropertyName} = $$Value;
}
To create the template just go to the preferences. Then in PHP/Templates you will have your list of templates.
It has to be there under the menu - source in Eclipse. Could you provide a snapshot of your Eclipse to verify.
EDITED: I guess it is not possible to generate getters and setters automatically in your version, though you would be able to create templates for the same and use it as per your requirements. Omnipotent (0 seconds ago)
I haven't seen anyone mention the Zend Studio ctrl+3 shortcut/search:
ctrl+3 and search...
I type "setters", and first option on the menu is the "Generate Getters and Setters" wizard.
If there is a 'Refactor' menu, check in there as well. A lot of those methods have been moved to the 'Refactor' menu in later versions of eclipse and if Zend has updated recently and not updated it's documentation, the items may have encountered an undocumented move.
#Omnipotent It's Zend Studio v6.01, "generate getters and setters" feature should be available. I can see doc about it in Help Contents.
By the way i'll try updating to v6.1
Thanks anyway!
EDITED: Templates and Code Assist works fine but are not usefull as "Generate getters and setters".