|Re: Find & Replace? [message #1792238 is a reply to message #1791751]
||Fri, 13 July 2018 06:19
| Patrick Moran
Registered: March 2018
I have no idea what "line 6" and "line 7" are. Your programmer seems to be using an xml plug-in for Eclipse, so you probably need to hunt up some tutorials to learn the basics of how to run it. |
That being said, the general kind of thing you are doing is something I often do when moving from one working version of a java project to another version that I am going to change a lot. I keep the old copy intact so that when the new version blows up I can just go back to the old one, make another copy of it, and *rename* appropriate components thereof.
If I had a project called Photo-carousel_1, I would have gone through several generations of minor changes by copying the project and pasting it into the same general area in the "Package Explorer" (along the left side of the basic Eclipse screen. When I did that I would automatically get a new project called "Photo-carousel_2. This part of the process is quite superficial. I could have gone into my computer's directory or folder where I already had Photo-carousel_1, and then copied it, changed the name, just as one might duplicate any folder. However, when I went back to Eclipse I wouldn't see the second file until I had used "import" and found that file and directed that it be imported into my workspace. So it's a lot easy to do everything from within Eclipse.
Lately I've noticed that when I want to track down a specific version of P-carousel.java, I have to do a lot of detective work since every time I copy a project and get an incremental improvement version_2, I've kept the same old java file file name. So if I search for P-carousel.java from outside Eclipse I am finding dozens of files with the same name but different dates of creation. Sometimes even the dates of creation are not clear. So it would be better if I could have a P-carousel_1,java, a P-carousel_2.java, and so on.
If I were to go into the file structure of my computer and change the most recent P-carousel.java to P-carousel2.java, and then when back inside Eclipse and tried to work with that new project, I would find that an error was kicked up. Why? Because the class name used in P-carousel2.java cannot be P-carousel(). Simply changing that by opening and editing that java file won't be all I have to do because "P-carousel" may get used several times, and I'd better be able to get them all changed throughout my whole project wherever the name occurs. It's not only a pain to do that, but I might miss one and have an error that would take me a long time to discover because I would glance right over a reference to the old class name.
Therefore, for what I have to do, I should let the computer do the checking for me. I go to source/defaultpackage/P-carousel, hilight that "P-carousel" mention, go to Refactor, and then select "rename" in the drop-down. Eclipse will go through and change everything that needs to be changed.
I suspect that the same general method should work for you, although I am puzzled as to why you make the double swap changes you've described. Not having my stuff set up like yours I have no way of checking out my idea.
Your original programmer should be able to tell you exactly how to do this in a minute or two. You can probably find a tutorial on-line by googling for something like:
Eclipse java swap log file names or use "change," "exchange," "filename log file swap" ... I don't know for sure. Sometimes it takes me a long time to guess the right question to ask when using Google.
[Updated on: Fri, 13 July 2018 18:01]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.03596 seconds