NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Safety net for replace in files


Joined: 02 Nov 2006
Posts: 17
Reply with quote
Lets say you change all double quotes to nothing inside a file. Then decide it was a mistake. There is undo.

Now make the same "mistake" with replace in files. No safety net, no undo. You can foul up an entire directory structure and many of the files in it. And it is too easy to be in a rush and pick replace in files instead of simple replace within a file. You only need to make the mistake once to create quite a mess. I can see where it would be a technical nightmare to have an "undo" for this but ...

... not sure what the recommended approach would be. At a minimum make prompt on replace be the default for replace in files or have one of those "do you really want to" dialog boxes (though I generally hate those).
View user's profileFind all posts by fkellySend private message
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
I don't think there is a single application out there that supports undo for replace in files (like you said, technical nightmare).

However IMHO it is a REALLY bad idea to put both "replace" and "replace in files" in a single dialog, it hugely increases the risk of making mistakes.

So my suggestion would be to either remove the tabs or make clear that your dealing with the "in files" part... perhaps a different background color or something, I don't know.
View user's profileFind all posts by BlizzSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
Quote:
No safety net, no undo. You can foul up an entire directory structure and many of the files in it.


This is just one of many reasons why people who develop software are using source control systems like CVS, SVN, and the others. With them all your risk is to lose all unsubmitted sources.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 02 Nov 2006
Posts: 17
Reply with quote
I use a SVN. I didn't do unrepairable damage to myself -- it was just inconvenient. But even in a development environment, not all directories are going to be under the control of a SVN. For instance, I was working on some changes to a directory that I had downloaded from a web server. After I screwed up I could re-download it of course but nonetheless I had lost a bit of time and work.

You folks seem genuinely interested in making your product "friendly" and convenient for developers. So I was just making a suggestion that replace in files, which inherently has no undo, could use a bit of a safety net. Of as Blizz suggested, put replace and replace in files in separate dialogs so that the likelihood of clicking the wrong option is reduced. Or have a "do you really want to" message associated with replace in files.
View user's profileFind all posts by fkellySend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
Quote:
You folks seem genuinely interested in making your product "friendly" and convenient for developers

aha

Quote:
Or have a "do you really want to" message associated with replace in files.

aha, please don't forget to check "Prompt on replace" before pressing Replace All.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Safety net for replace in files
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic