Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renaming class with the Rename Also File With the Declaration option ends with an error #4620

Open
r-man opened this issue Sep 11, 2022 · 3 comments
Labels
can not reproduce kind:bug Bug report or fix needs:triage Requires attention from one of the committers PHP [ci] enable extra PHP tests (php/php.editor)

Comments

@r-man
Copy link

r-man commented Sep 11, 2022

Apache NetBeans version

Apache NetBeans 15

What happened

When I try to rename the class name and the file, NB first renames the file and then gives me the error "File seems no longer valid!"

How to reproduce

  1. Create php class
  2. Try rename class name
  3. In rename dialog check Rename Also File With the Declaration option

Did this work correctly in an earlier version?

Apache NetBeans 14

Operating System

windows 11 pro

JDK

Java: 18.0.1; Java HotSpot(TM) 64-Bit Server VM 18.0.1+10-24

Apache NetBeans packaging

Apache NetBeans binary zip

Anything else

No response

Are you willing to submit a pull request?

No

Code of Conduct

Yes

@r-man r-man added kind:bug Bug report or fix needs:triage Requires attention from one of the committers labels Sep 11, 2022
@Daniel-Peder
Copy link

Daniel-Peder commented Feb 3, 2023

Confirmed still happens. Hard to isolate. Sometimes happens, sometimes not. Mostly for newly created classes, not yet referenced from other files.

The issue dissapears once the "reference" gets created. For example:

$o = new myclass();
$o->some_method();

Then click some_method and use navigate to the declaration. Since then, the myclass file can be refactored without issues.

--

Also after the issue occurs, there still appears the old file (before rename) in the list of files (sorry cannot recall where ATM) but it disappears from the above list after netbeans close-open. The point is, the issue leaves the reference of the old file somewhere until app restart.

@troizet troizet added the PHP [ci] enable extra PHP tests (php/php.editor) label Jan 23, 2024
@junichi11
Copy link
Member

I can't reproduce it.

Product Version: Apache NetBeans IDE 20
Java: 19.0.2; OpenJDK 64-Bit Server VM 19.0.2+7-Ubuntu-0ubuntu322.04
Runtime: OpenJDK Runtime Environment 19.0.2+7-Ubuntu-0ubuntu322.04
System: Linux version 6.5.0-17-generic running on amd64; UTF-8;

@Daniel-Peder
Copy link

I can't reproduce it.

Product Version: Apache NetBeans IDE 20
Java: 19.0.2; OpenJDK 64-Bit Server VM 19.0.2+7-Ubuntu-0ubuntu322.04
Runtime: OpenJDK Runtime Environment 19.0.2+7-Ubuntu-0ubuntu322.04
System: Linux version 6.5.0-17-generic running on amd64; UTF-8;

yes, as said before, sometimes happens, sometimes not, not sure but seems to be related to the size of project or number of project files

Product Version: Apache NetBeans IDE 21
Java: 11.0.22; OpenJDK 64-Bit Server VM 11.0.22+7-post-Ubuntu-0ubuntu220.04.1
Runtime: OpenJDK Runtime Environment 11.0.22+7-post-Ubuntu-0ubuntu220.04.1
System: Linux version 5.4.0-173-generic running on amd64; UTF-8; en_US (nb)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
can not reproduce kind:bug Bug report or fix needs:triage Requires attention from one of the committers PHP [ci] enable extra PHP tests (php/php.editor)
Projects
None yet
Development

No branches or pull requests

4 participants