Skip to content

feat: language-server powered file/folder create, rename, delete#1415

Merged
sebthom merged 3 commits intoeclipse-lsp4e:mainfrom
sebthom:will-rename
Nov 25, 2025
Merged

feat: language-server powered file/folder create, rename, delete#1415
sebthom merged 3 commits intoeclipse-lsp4e:mainfrom
sebthom:will-rename

Conversation

@sebthom
Copy link
Copy Markdown
Member

@sebthom sebthom commented Nov 21, 2025

Project Explorer actions now call LSP willCreate/willRename/willDelete and apply returned edits when supported. Supports both files and folders; honors server filters (glob + file/folder kind). Ensures pending didChange is sent before didClose to preserve LSP event order during renames.

Fixes #823

Copy link
Copy Markdown
Contributor

@rubenporras rubenporras left a comment

Choose a reason for hiding this comment

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

I will continue the review next week.

@sebthom sebthom force-pushed the will-rename branch 2 times, most recently from 23373ad to 1854fce Compare November 21, 2025 15:59
Copy link
Copy Markdown
Contributor

@rubenporras rubenporras left a comment

Choose a reason for hiding this comment

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

Most of my comments are about style, but I think #1415 (comment) needs to be addressed.

Comment thread org.eclipse.lsp4e/src/org/eclipse/lsp4e/operations/rename/LSPCreateParticipant.java Dismissed
Comment thread org.eclipse.lsp4e/src/org/eclipse/lsp4e/operations/rename/LSPDeleteParticipant.java Dismissed
Comment thread org.eclipse.lsp4e/src/org/eclipse/lsp4e/operations/rename/LSPMoveParticipant.java Dismissed
Comment thread org.eclipse.lsp4e/src/org/eclipse/lsp4e/operations/rename/LSPRenameParticipant.java Dismissed
@sebthom sebthom requested a review from rubenporras November 24, 2025 10:46
Comment thread org.eclipse.lsp4e/.classpath
Project Explorer actions now call LSP willCreate/willRename/willDelete
and apply returned edits when supported. Supports both files and
folders; honors server filters (glob + file/folder kind). Ensures
pending didChange is sent before didClose to preserve LSP event order
during renames.
Copy link
Copy Markdown
Contributor

@rubenporras rubenporras left a comment

Choose a reason for hiding this comment

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

After this one, I think I will not have more comments :)

@sebthom
Copy link
Copy Markdown
Member Author

sebthom commented Nov 24, 2025

After this one, I think I will not have more comments :)

Your feedback is very much appreciated. Here at least someone talks with me. In TM4E and WildWebDeveloper projects I feel like mostly talking to myself.

@mickaelistria
Copy link
Copy Markdown
Contributor

In TM4E and WildWebDeveloper projects I feel like mostly talking to myself.

Don't worry, there are people listening, it's just that they don't have anything more interesting to add in most cases ;)
Also, thanks for the continuous effort of working in the open, using PRs, commenting on those although it can sometimes feel useless; such communication effort is vital for the project sustainability and is really worth it: it always payback on quality, business or community growth one day or the other.

.toArray(CompositeChange[]::new);
} catch (final InterruptedException ex) {
Thread.currentThread().interrupt();
throw new CoreException(new Status(IStatus.ERROR, LanguageServerPlugin.PLUGIN_ID,
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@rubenporras I now let the exceptions bubble up. what should we do with the per-language-server exceptions that are currently logged only (line 75-84)? Should the whole operation be aborted if potentially only one LS times out?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I do not know. I also do not know in which case multiple language servers would participate in one operation. I would that if we do not know better, we can go with the current implementation

.toArray(CompositeChange[]::new);
} catch (final InterruptedException ex) {
Thread.currentThread().interrupt();
throw new CoreException(new Status(IStatus.ERROR, LanguageServerPlugin.PLUGIN_ID,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I do not know. I also do not know in which case multiple language servers would participate in one operation. I would that if we do not know better, we can go with the current implementation

@rubenporras
Copy link
Copy Markdown
Contributor

rubenporras commented Nov 25, 2025

fyi: I would like to do a release before Friday so that we follow https://eclipse.dev/simrel/?file=wiki/SimRel/2025-12.md and then wait with new features until the 10th of December.

@sebthom
Copy link
Copy Markdown
Member Author

sebthom commented Nov 25, 2025

fyi: I would like to do a release before Friday so that we follow eclipse.dev/simrel?file=wiki/SimRel/2025-12.md and then wait with new features until the 10th of December.

Ok, let's hold back merging the PR for now.

@sebthom
Copy link
Copy Markdown
Member Author

sebthom commented Nov 25, 2025

Ah I misread the dates. I thought we are already passed the feature freeze...

@sebthom sebthom merged commit e27c3c2 into eclipse-lsp4e:main Nov 25, 2025
10 checks passed
@sebthom sebthom deleted the will-rename branch November 25, 2025 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for willRenameFiles/willCreateFiles/willDeleteFiles

4 participants