apache / apache/netbeans

[PHP] Autocompletion does not work correctly for including operators

Open
#5,640 7 comments 0 reactions 0 assignees View on GitHub
kind:bug PHP
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Apache NetBeans version

Apache NetBeans 17

### What happened

When using file including operators, like `include`, `include_once`, `require`, `require_once`, once you type the operator name you open quotes and press autocompletion keyshorts, but instead of list of files you get general list of autocompletion items. In order to make it work you first need to put a semicolon symbol at the end of the line and then return cursor into the quotes and only then autocompletion will give you a list of files.

First it's very inconvenient, second it's not the way it works in other languages, at least not for HTML & JS (I didn't checked Java or any other language). There if you start writing the line the file autocompletion works fine.

I hope my explanation of the bug is clear. If not, I may add some video demonstrating the issue.

### How to reproduce

_No response_

### Did this work correctly in an earlier version?

No / Don't know

### Operating System

Widows 10

### JDK

16.0.1

### Apache NetBeans packaging

Apache NetBeans provided installer

### Anything else

_No response_

### Are you willing to submit a pull request?

No

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue in the PHP editor with include, include_once, require, and require_once, checking completion before and after adding a semicolon. Trace the completion entry point for quoted file paths and verify that the file list appears immediately after the opening quote without requiring a completed statement.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, php
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.