Refactor with eclipse

2

By itself does eclipse already have what is needed for refactoring, or would you suggest some tool to link to the eclipse editor and use it more accurately?

    
asked by anonymous 29.01.2014 / 13:56

3 answers

1

Refactoring features for the Java language are sufficient for 99% of cases. In fact, in my experience, I never needed to use all of them.

However, depending on the technology you work with, additional plugins are required for both editing, auto-completing, and refactoring. Classic examples are plugins such as JBoss Tools, Spring Tool Suite and Google GWT, which add important features to the technologies of each distributor.

On the other hand, it is important to note that in many cases automatic refactoring is not enough. This happens a lot when we store settings and class names in strings or properties , XML, Json, etc. files. In this case, use the search in files by pressing ctrl + H on the File Search tab. Add a hint of Regular Expressions, make the necessary replacements and you will not have too many difficulties.

    
29.01.2014 / 14:11
1

Depending on what types of refactoring you want, eclipse is already built-in with the most basic refactorings:

  • Rename
  • Move
  • Extract methods
  • Extract variables
  • Enter parameters

full documentation (in English)

There are also various plugins that can give you greater flexibility in refactoring, however, by default eclipse already supports the standard refactoring functions.

    
29.01.2014 / 14:01
1

There are several levels of refactoring. If it's just a variable name, it's really worth using the features of Eclipse, now if you need more in depth I recommend reading the following book, which by the way, Google offers you for free :) and in Portuguese. Refactoring (Martin Fowler)

link

    
29.01.2014 / 14:02