Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 808259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T00:32:01+00:00 2026-05-15T00:32:01+00:00

I have used file search functionality in eclipse to replace a specific occurrence of

  • 0

I have used file search functionality in eclipse to replace a specific occurrence of text with a replace text which contains a java method name in all files across the workspace.

But now in all those files I have to add the import statement (for the method name to resolve).

Is there an automatic way of doing this instead of manually searching and importing the package myself in all files?

P.S.: I can’t use java refactoring since the text I have changed is not a java element and Organize import option will make changes to lot of files (re-ordering imports) which will be problematic when I need to commit, I again have to manually check differences to see which files have actual changes instead of just organize import statements.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T00:32:02+00:00Added an answer on May 15, 2026 at 12:32 am

    Instead of doing this with search and replace, try to use Refactor->rename which will do it correctly.
    another options is to use organize imports, you can do it for an entire project as well (source -> organize imports).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to create a file with name FicheBail sign+®eDC.pdf i have used utf-8,
I want to do search and replace with the help of java. I have
I have used the following css file to over background bg.jpg with a repeat-x
I have used the andengine.jar file in our application. I have run the physicsexample.
I have recently used an icon file received from our marketing team. The icon
I have used xmltextwriter to create xml file and saved on development D: drive.
I have used following code to create a simple PDF file. It executes fine
I have used this code to store Object to a file: try{ FileOutputStream saveFile=new
I would like to update an xml file from another xml file.I have used
I'm processing a UTF-8 file in Python, and have used simplejson to load it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.