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 - request new code template hint : variableFromNextAssignmentMatched="regular expression"
Summary: request new code template hint : variableFromNextAssignmentMatched="regular e...
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: Hints & Annotations (show other bugs)
Version: 7.1
Hardware: PC Windows XP
: P4 normal (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-27 01:43 UTC by HiroKws
Modified: 2016-07-07 07:30 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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