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

Disable LSP rename handler for Java file #494

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion org.eclipse.lsp4e/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,24 @@
class="org.eclipse.lsp4e.operations.rename.LSPRenameHandler"
commandId="org.eclipse.ui.edit.rename">
<activeWhen>
<reference definitionId="org.eclipse.lsp4e.textSelectionHasLanguageServer" />
<and>
<!-- LSP rename handler is active when: -->
<!-- 1. The file is not a Java file to avoid conlict with JDT UI rename handler -->
<not>
<with variable="editorInput">
<or>
<adapt type="org.eclipse.core.resources.IFile">
<test property="org.eclipse.core.resources.contentTypeId" value="org.eclipse.jdt.core.javaSource" />
</adapt>
<adapt type="org.eclipse.jdt.core.IClassFile">
<instanceof value="org.eclipse.jdt.core.IClassFile" />
</adapt>
</or>
</with>
</not>
<!-- 2. The file is mapped with a language server -->
<reference definitionId="org.eclipse.lsp4e.textSelectionHasLanguageServer" />
</and>
</activeWhen>
</handler>
<handler
Expand Down