troizet opened a new issue, #6266:
URL: https://github.com/apache/netbeans/issues/6266
### Apache NetBeans version
Apache NetBeans 18
### What happened
`NullPointerException` when generating a field or constant using `Introduce
Hint`
### How to reproduce
- create a `TestClass.php` file with the `TestClass` class:
```php
<?php
class TestClass {
}
```
- сreate a test.php file with the code:
```php
<?php
TestClass::generatedConstant;
```
or
```php
<?php
TestClass::$generatedField;
```
or
```php
<?php
$cls = new TestClass();
$cls->generatedField;
```
- set the caret to `generatedConstant` or `generatedField`
- press `Alt` + `Enter`, then press `Create Constant` or `Create Field`
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
Debian GNU/Linux 12 (bookworm)
### JDK
OpenJDK Runtime Environment 17.0.7+7-Debian-1deb12u1
### Apache NetBeans packaging
Apache NetBeans binary zip
### Anything else
bug similar to #6258
### Are you willing to submit a pull request?
No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists