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

Add rename support #43

Closed
dbaeumer opened this issue Jul 11, 2016 · 12 comments
Closed

Add rename support #43

dbaeumer opened this issue Jul 11, 2016 · 12 comments

Comments

@dbaeumer
Copy link

Now that the primary document provider is hooked to the text buffer framework we can add rename support as well.

@gorkem
Copy link
Contributor

gorkem commented Jul 11, 2016

duplicate of #19 ?

@egamma
Copy link

egamma commented Jul 11, 2016

yes, but this one has more info. Closing #19.

@egamma egamma closed this as completed Jul 14, 2016
@ecmel
Copy link

ecmel commented Aug 4, 2016

Both duplicates are closed, this one should be open.

@gorkem gorkem reopened this Aug 4, 2016
@gorkem
Copy link
Contributor

gorkem commented Aug 18, 2016

For more proper support see microsoft/language-server-protocol#41 and its VS Code counterpart microsoft/vscode#10659

@gorkem
Copy link
Contributor

gorkem commented Feb 24, 2017

org.eclipse.jdt.internal.corext.refactoring.rename.JavaRenameProcessor and friends is a good starting point for this.

yaohaizh pushed a commit to yaohaizh/eclipse.jdt.ls that referenced this issue Jul 4, 2017
Signed-off-by: Fred Bricon <fbricon@gmail.com>
yaohaizh pushed a commit to yaohaizh/eclipse.jdt.ls that referenced this issue Jul 4, 2017
yaohaizh pushed a commit to yaohaizh/eclipse.jdt.ls that referenced this issue Jul 4, 2017
fbricon pushed a commit to fbricon/eclipse.jdt.ls that referenced this issue Aug 21, 2017
* 1.add variable list

Signed-off-by: andxu <andxu@microsoft.com>

* 1.fix a constructor error: missing field assignment.

Signed-off-by: andxu <andxu@microsoft.com>

* ArrayUtils.toStringArray is not available in a low version, remove the usage.

Signed-off-by: andxu <andxu@microsoft.com>

* add javadoc back

Signed-off-by: andxu <andxu@microsoft.com>

* remove local debug code

Signed-off-by: andxu <andxu@microsoft.com>

* remove local debug code

Signed-off-by: andxu <andxu@microsoft.com>

* adjust class signature about util class

Signed-off-by: andxu <andxu@microsoft.com>

* change the options per request.

Signed-off-by: andxu <andxu@microsoft.com>

* change the options per request.

Signed-off-by: andxu <andxu@microsoft.com>

* 1. check all thread running to recycle all ids.
2. remove a unused method in variable formatter.

Signed-off-by: andxu <andxu@microsoft.com>

* 1. check all thread running to recycle all ids.
2. remove a unused method in variable formatter.

Signed-off-by: andxu <andxu@microsoft.com>
@schiegl
Copy link

schiegl commented Nov 8, 2017

Renaming of classes seems to work but if the renamed class import is a path e.g. import com.mycompany.app.SomeClass; the path will get lost during renaming and you end up with just import SomeClass;.

@gorkem
Copy link
Contributor

gorkem commented Nov 8, 2017

@tepf without proper support on LSP for file level operations it will not get any better. Perhaps we should disable rename for classes completely for now. @fbricon WDYT?

@schiegl
Copy link

schiegl commented Nov 8, 2017

I understand that file level operations are needed in case the file is named after the class or maybe moving the file around. But shouldn't basic renaming still work while preserving the namespace of the class?

Please don't disable it for now. It's still better than nothing.

@fbricon
Copy link
Contributor

fbricon commented Nov 8, 2017

@gorkem I think we should keep it. Anonymous class renaming works fine. Current situation just requires 1 manual operation to complete the Class renaming, which shouldn't be a big deal. Since package renaming is disabled (intentionally or not), we should be fine.

@tepf please open another ticket about renaming the import, this is a specific use case that's broken in jdt.ls (works fine in stock Eclipse).

@fbricon
Copy link
Contributor

fbricon commented Oct 4, 2018

@snjeza eclipse-lsp4j/lsp4j#257 needs to be tackled 1st.
According to @tsmaeder, che-jdt-ls already implemented renaming support from @gorkem's initial protocol proposal. So, assuming @svor gives you the right pointers, it should be fairly straightforward to
1- propose a PR for lsp4j
2- port the che-jdt-ls renaming support back to jdt.ls

@yaohaizh
Copy link
Contributor

yaohaizh commented Oct 29, 2018

@fbricon LSP4J PR: eclipse-lsp4j/lsp4j#277

@fbricon fbricon added this to the End November 2018 milestone Nov 28, 2018
@fbricon
Copy link
Contributor

fbricon commented Nov 28, 2018

Mostly fixed with #864 . Still need to support package renaming

@fbricon fbricon closed this as completed Nov 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants