apache / apache/netbeans

HTML Editor - Stack Overflow When Refactoring

Open
#4,844 3 comments 0 reactions 0 assignees View on GitHub
HTML kind:bug needs:triage
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Apache NetBeans version

Apache NetBeans 15

### What happened

The error message I got when trying to refactor/rename an HTML file.

![image](https://user-images.githubusercontent.com/6260602/197357408-16ed76c8-9e47-45ea-9c69-a132410212e0.png)
[messages.log](https://github.com/apache/netbeans/files/9845114/messages.log)

### How to reproduce

In file **aadraclo.htm**, I created a link pointing to file **link-test.htm**. Both files are in the same folder:

![image](https://user-images.githubusercontent.com/6260602/197357551-6d6c40fa-0fe6-4817-a74c-01e143bdb6fd.png)

The link code:

`[This phrase](https://github.com/apache/netbeans/issues/link-test.htm) is a link to another page`

I tested the link in a browser, and it worked as expected.

Then, in the project folder tree, I right-clicked the file **link-test.htm** and chose **Refactor>Rename** from the popup context menu.

When the **Rename** dialog opened, I changed the file name to **link-tester.htm** and clicked the **Refactor** button.

After a pause of about 3 minutes, the error dialog appeared, reporting a stack overflow (see the **What happened** field above).

I Googled how to refactor file names in NetBeans, but all the examples I found were for refactoring Java code, not file names.

I need to migrate my Web site from Expression Web 4 (now obsolete & unsupported), and trying to determine whether NetBeans would be a good successor. Does NetBeans not fully support file name refactoring?

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

No / Don't know

### Operating System

Windows 10 Home, version 21H2, OS build 19044.2130, Windows Feature Experience Pack 120.2212.4180.0

### JDK

java version "18.0.2" 2022-07-19 Java(TM) SE Runtime Environment (build 18.0.2+9-61) Java HotSpot(TM) 64-Bit Server VM (build 18.0.2+9-61, mixed mode, sharing)

### Apache NetBeans packaging

Apache NetBeans provided installer

### Anything else

Tried the file rename twice, and got the stack overflow error both times.

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

No

### Code of Conduct

Yes

Contributor guide

Open the contributing guide

Research direction

Start by reading the linked messages.log and reproducing the rename from link-test.htm to link-tester.htm in Apache NetBeans 15, using the aadraclo.htm link setup described in the issue. Investigate the HTML editor's refactoring path and verify that the rename completes without a stack overflow.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, java
Domain
tooling, web-dev
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.