This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 207803

Summary: request new code template hint : variableFromNextAssignmentMatched="regular expression"
Product: editor Reporter: HiroKws
Component: Hints & AnnotationsAssignee: Milutin Kristofic <mkristofic>
Status: RESOLVED WONTFIX    
Severity: normal    
Priority: P4    
Version: 7.1   
Hardware: PC   
OS: Windows XP   
Issue Type: ENHANCEMENT Exception Reporter:

Description HiroKws 2012-01-27 01:43:19 UTC
Hi

I want new code template hint, like variableFromNextAssignmentMatched, variableFromPreviousMatched.
 
As names show, it will replace string specified regular expression.

ex. IN PHP context
short name : vdoc2
code template :
/* @var $$${VARIABLE variableFromNextAssignmentName default="variable"} ${VAR_TYPE variableFromNextAssignmentMatched="(\w)+::" default="ClassName"} */

and use like this...

vdoc2<tab>
$val = Validation::get_instance();

it will be extended...
/* @var $val Validation */


The reason:

Recently, there are many PHP framework. And when use them, normally use classes' function or load function to get the class instance.

If developer, write '@return' of PHPDoc, NetBeans understand $val is Validation class' instance. But unfortunately, most of framework developers are lazy, no proper PHPDoc in the PHP files.

So as default, there is a code template, 'vdoc'. It use variableFromNextAssignmentType, but it not work above reason.

Then I want to new hints for code template. It is simple, and not hard to implement, I think. And also useful for any language coders, not only PHPer.
Comment 1 Svata Dedic 2012-01-27 15:02:29 UTC
No idea why it was assigned to code folding :)
Comment 2 Martin Balin 2016-07-07 07:30:14 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss