Discussions related to Visual Prolog
jarnold30
Posts: 19
Joined: 9 Aug 2020 15:30

How to delete a source file

Unread post by jarnold30 »

Hi, how can I delete a source file within the VP IDE? There doesn't seem to be any way to do that.
Harrison Pratt
VIP Member
Posts: 439
Joined: 5 Nov 2000 0:01

Re: How to delete a source file

Unread post by Harrison Pratt »

There is no way in the Vip9x or 8x IDE. The right-click context menu option to Remove from Project also is limited to Packages, text files and resources, which makes sense since deleting just one of a class's files is illogical (although it might be logical to delete an interface whose name does not correspond to a .pro file name).

When I want to delete a class's files I open Explorer (Ctrl-E) in the containing package folder, select (highlight) the class's files (.cl, .i, .pro) and press F2 (or use the context menu) to rename the selected group of files. By personal convention I rename them by inserting a leading underscore and keep them until I am certain they are no longer needed; the IDE will remove the now-missing files from the project when you rebuild the package.

Of course, I could just delete the files from Explorer, but this old scalded cat is even afraid of cold water! :-)
User avatar
Thomas Linder Puls
VIP Member
Posts: 1398
Joined: 28 Feb 2000 0:01

Re: How to delete a source file

Unread post by Thomas Linder Puls »

I can highly recommend old cats and other ones to use a version control system. git seems to be the flavor of the year.

I agree that the simplest way to "eliminate" a file from a project is by "eliminating" it from the disk and then build again.
Regards Thomas Linder Puls
PDC
jarnold30
Posts: 19
Joined: 9 Aug 2020 15:30

Re: How to delete a source file

Unread post by jarnold30 »

OK, thanks both
Post Reply