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 7940059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:16:32+00:00 2026-06-03T23:16:32+00:00

I have a lot of reformatting to do in a old Java project. I

  • 0

I have a lot of reformatting to do in a old Java project.

I have over than 300 different classes created by factories and I would like to automatize changes with a plugin for Eclipse or with a tool.

I need to remove the same parameter for the 300 classes (as Foo class above) and to change mother class name every time.

example:

public Foo extends **OldClass** {

    public Foo(A a, **B b**){
        //..
    }

}

to

public Foo extends newClass {

    public Foo(A a){
        //..
    }

}

I would also like to be able to “batch find and replace” a lot of declarations. I mean, I would like to have a tool with a list of replacements (with regex patterns) and just to replace everything in one click.

Do you know how I could do this? I am on a Windows 7 system.

  • 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-06-03T23:16:33+00:00Added an answer on June 3, 2026 at 11:16 pm

    You can use Eclipse’s Search dialog (Ctrl+H) to do this. Next to the ‘Search’ button there is a ‘Replace’ button. This can be used to find every occurrence across multiple files (specifying for example, every filename matching *.java), and replace them in a single user action.

    eclipse search dialog with replace option

    Once you have configured your search criteria (e.g. ” extends OldClass”) and search for that, you will be presented with a dialog to enter a replacement value (e.g. ” extends NewClass”). Upon pressing ‘OK’ for that dialog, it will do the search and replace.

    replace dialog

    This also allows regular expressions, both in the search and replace (I’m assuming this would allow using regex group captures, but I haven’t tested it). It should be possible to apply the same principle to the parameter you also want to remove.

    Note that it gets trickier if you only want to modify classes where both extends OldClass AND , B b) appear, and they can occur independently.

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

Sidebar

Related Questions

I have a few classes in a project that should be created only once.
At the moment, I have lot's of Java which does all kind of nifty
i have lot of pictureboxes named this way: PBr1_1, PBr1_2, ... PBr1_9 I'd like
I have been working with webservices for over 2 years now. I have lot
We have lot of code like: IPerson { Eat(); } Persion : IPerson {
We have lot of configuration files used in our application. Atleast 100 different xml
I have a configuration structure I would like to save on the internal flash
I have lot of code in our solution like this: Localization.Current.GetString(abc.def.gih.klm); I want to
I have lot of stored procedures used across different clients, for few clients there
I have lot of confusion over fakeroot utility. I am trying to add a

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.