junichi11 / cakephp3-netbeans

CakePHP3/4 support in NetBeans
Apache License 2.0
46 stars 10 forks source link

Netbeans error in editor #54

Open r-da opened 7 years ago

r-da commented 7 years ago

Hello, I'm not sure this is a problem with Cakephp3 plugin, but I have the following issue. If i have javascript code in a ctp file, marked with cakephp Html->scriptStart and scriptEnd, I have errors highlighted by netbeans (see attached screenshot). Is there a way to avoid this and convince netbeans to parse the javascript correctly?

netbeans-bug

junichi11 commented 7 years ago

Unfortunately, it is not a bug. It is not a correct syntax of PHP. So the IDE recognizes it as an error.

But I may be able to improve it a bit. I cannot promise to do it soon, sorry.

r-da commented 7 years ago

So this means that it's not possible to instruct Netbeans that Html->scriptStart and scriptEnd are delimiters for javascript?

junichi11 commented 7 years ago

So this means that it's not possible to instruct Netbeans that Html->scriptStart and scriptEnd are delimiters for javascript?

Yes, users cannot do it by default. But as I wrote the above, maybe, it can be improved. (Sorry if it is not possible)

acomerlatto commented 6 years ago

You can resolve that with this trick, at the end of the file put that

<?= $this->Html->scriptStart(['block' => true]); ?>
/*<script>*/
[insert you code here]
<?= $this->Html->scriptEnd(); ?>
r-da commented 6 years ago

Hi Danilo, The error message is very clear. You don't have php installed or php is not in the PATH.

Have a nice day

Il lun 7 mag 2018, 16:04 Danilo Batista de Queiroz notifications@github.com ha scritto:

I don't know what I did wrong. The version of my CakePHP is 3.6 and NetBeans IDE 8.2 The server don't start up. Can you help me?

[image: project] https://user-images.githubusercontent.com/32627919/39705607-47b07210-51e5-11e8-837b-3e55ebb2a701.PNG [image: output] https://user-images.githubusercontent.com/32627919/39705611-4b7b84d4-51e5-11e8-9817-78a2cbfbbb0e.PNG [image: configurations] https://user-images.githubusercontent.com/32627919/39705616-4d6fa400-51e5-11e8-9065-23cf86344f09.PNG

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/junichi11/cakephp3-netbeans/issues/54#issuecomment-387075024, or mute the thread https://github.com/notifications/unsubscribe-auth/AX5MOPHt-4yHZOMbglfuMQwdnZPqCMcXks5twFRQgaJpZM4LitT7 .