Author Topic: Project wide replace without opening all files?  (Read 4408 times)

Offline Tobi

  • Single posting newcomer
  • *
  • Posts: 3
    • Spring RTS
Project wide replace without opening all files?
« on: November 12, 2008, 09:13:38 pm »
Is there a way in Code::Blocks to turn off project wide replace opening all files in which it does replacements?

I couldn't find this in the settings, sorry if I missed it :-)

If this isn't possible yet then this is a feature suggestion again :P

Online ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5916
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Project wide replace without opening all files?
« Reply #1 on: November 27, 2008, 05:03:13 pm »
you mean : let the code::blocks only do replacements in opened files?
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Tobi

  • Single posting newcomer
  • *
  • Posts: 3
    • Spring RTS
Re: Project wide replace without opening all files?
« Reply #2 on: December 17, 2008, 12:36:33 pm »
No, I mean, now when I do project wide replacement, C::B open alls files in which it does replacements. (I presume so you can undo?)

I want it to not open any files, just do the replacement without opening the file in the editor.
If I want undo I restore backup or revert using my version control system :-)

Is this possible?

Online ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5916
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Project wide replace without opening all files?
« Reply #3 on: December 17, 2008, 01:55:28 pm »
sorry, I still can't understand what's you means.

First, you  can right click on the tab, and select "close all" to close all tabs.

Quote
If I want undo I restore backup or revert using my version control system
what does this sentence mean?
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Project wide replace without opening all files?
« Reply #4 on: December 17, 2008, 02:19:52 pm »
No, I mean, now when I do project wide replacement, C::B open alls files in which it does replacements. (I presume so you can undo?)

I want it to not open any files, just do the replacement without opening the file in the editor.
If I want undo I restore backup or revert using my version control system :-)

Is this possible?

As far as I know: no.

But what about a feature request or even better creating a patch ?
The user should be able to chose if he/she wants to force replacement without to (visibly) open the files and of course be warned that an undo is impossible then.

sorry, I still can't understand what's you means.

First, you  can right click on the tab, and select "close all" to close all tabs.

Quote
If I want undo I restore backup or revert using my version control system
what does this sentence mean?

"Close all" or "Close all other" does what it says: closing all files and that's normally not wanted, even if the user just did a "Replace in files".

The second means that Tobi uses a backup and/or a version control system to be able to restore damaged files/filesystems (either by hardware or user errors) in (mostly) any cases.

Online ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5916
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Project wide replace without opening all files?
« Reply #5 on: December 17, 2008, 02:42:48 pm »
Thanks, Tiger  :D , I understand the meaning now.
Thanks for your explanation.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.