简体   繁体   中英

Eclipse Refactoring

I am trying to change my code from Java Utility Logging to Log4J2. To change the code I want to use code refactoring in Eclipse. For example change : import java.util.logging.Logger; to import org.apache.logging.log4j.LogManager; Logger to LogManager. I am new to code refactoring in eclipse have not done so in large project with more than 1000 Classes. Can you please guide me how to go about it.

That is beyond Eclipse's "Refactor" capabilities. What can do is use the Search > File capabilities, which allows you to search and replace in your entire workspace or in selected packages. Look for an example in your code and use that as a pattern for your search. Make sure the search pattern is as specific as possible, to avoid unwanted changes.

Bottom line, it's still a manual process.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM