Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Usage of org.eclipse.ltk.core.refactoring.Refactoring
Usage of org.eclipse.ltk.core.refactoring.Refactoring [message #1791030] Thu, 21 June 2018 15:58 Go to next message
KHALID ALQHTANI is currently offline KHALID ALQHTANIFriend
Messages: 1
Registered: June 2018
Junior Member
Hello

I need to implement a software that will do some code refactoring "rename only"


  1. Package refactoring "rename"
  2. Type refactoring "rename"
  3. Global variable refactoring "rename"
  4. Method refactoring "rename"
  5. Local variable refactoring "rename"

And after a lot of searches, I found
org.eclipse.ltk.core.refactoring.Refactoring
may be helpful in my software

and I have multiple questions

1-does org.eclipse.ltk.core.refactoring.Refactoring supper these 5 type of refactoring?
if yes
2- Can I use it in my personal software that is not an eclipse plugin?
if yes
3- How I can use it because I did not find it in my eclipse on my machine?

sorry for my many questions
Re: Usage of org.eclipse.ltk.core.refactoring.Refactoring [message #1791800 is a reply to message #1791030] Thu, 05 July 2018 12:56 Go to previous message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1627
Registered: July 2009
Senior Member
Rather than "Refactoring" you would be looking at org.eclipse.ltk.core.refactoring.participants.RenameRefactoring.

I would, however, doubt that this is easily usable outside Eclipse, because Eclipse refactorings are implemented in terms of TextEdits (among other concepts), which rely on org.eclipse.jface.text.IDocument etc. IOW, refactoring is a non-trivial machinery that depends on many parts of the Eclipse platform.

You may want to have a look at the jdtls project, which aims at providing JDT functionality in a language-server context: https://projects.eclipse.org/projects/eclipse.jdt.ls

PS: https://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/tree/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/participants/RenameRefactoring.java
You'll automatically have access to these sources if you install the Eclipse SDK from http://download.eclipse.org/eclipse/downloads/index.html
Previous Topic:NoClassDefFoundError when calling Class.forName
Next Topic:No JavaFX
Goto Forum:
  


Current Time: Wed Sep 26 10:51:11 GMT 2018

Powered by FUDForum. Page generated in 0.01608 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top