Skip to content

Fix move/copy/rename/etc for standalone java files.#8679

Merged
ebarboni merged 1 commit intoapache:deliveryfrom
mbien:standalone-file-move-fix_delivery
Jul 28, 2025
Merged

Fix move/copy/rename/etc for standalone java files.#8679
ebarboni merged 1 commit intoapache:deliveryfrom
mbien:standalone-file-move-fix_delivery

Conversation

@mbien
Copy link
Member

@mbien mbien commented Jul 27, 2025

  • disable some refactoring actions for standalone source files, since they throw exceptions without having project context
  • they will now delegate to the respective generic file actions like in NB 26

alternative would be to revert #8442 instead of attempting this selective approach

tested by dragging java files around which triggers the move refactoring, renamed some etc. This should work with "source file launcher indexing" enabled and disabled (file properties). With indexing disabled it should handle files without doing any code refactoring (like in NB 26).

Not all refactorings work but those which failed, failed gracefully, e.g window telling that the file is outside a project.

targets delivery

 - disable some refactoring actions for standalone source files, since
   they throw exceptions without having project context
 - this will delegate to generic file actions

Co-authored-by: Michael Bien <mbien42@gmail.com>
@mbien mbien added this to the NB27 milestone Jul 27, 2025
@mbien mbien requested review from lahodaj and neilcsmith-net July 27, 2025 02:07
@mbien mbien added Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) labels Jul 27, 2025
Copy link
Member

@neilcsmith-net neilcsmith-net left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quickly tested your branch before you opened the PR. Seems to re-enable key file actions, including with default settings. Some refactoring operations working with indexing.

Agree with merge for rc2. However, refactoring support for source launcher files, particularly as not enabled by default, is quite niche compared to basic file operations on them. Any further sign of regressions from NB26, and we should revert the lot in rc3.

Thanks for adding the TODO line! We really need to fix the dependency relationships here.

Copy link
Contributor

@lahodaj lahodaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable, thanks!

@ebarboni ebarboni merged commit 29844be into apache:delivery Jul 28, 2025
71 of 72 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants