I am having problem with my Eclipse PDT version. I keeps opening older version of a file until I close it and open it again.
So what is happening. I edit a file with Eclipse - test.php. I close it. Then I compare it (test.ph) with another one in WinMerge, save the changes and when I open the file again in Eclipse it is still the same as it was before I changed it in WinMerge. I have to close the Eclipse and start it again to be able to open the file with it latest modifications.
I have noticed the same problem when I am opening a file downloaded from FileZilla. I have a local copy of the file that is online opened in Eclipse, then someone changed the file online. I right click -> "View/edit" from FileZilla, choosing to overide the old local file with the one online, but then I see the old file again, without the changes. I am sure that there are changes cause when I downlaod the file somewhere and open it , I see them.
Is there something like a cache in the Eclipse that may prevents me from viewing the latest changes. I seems that is happens only when the changes were made outside/not usign Eclipse. Any ideas?
Yes, Eclipse likes caching a lot... one of the reasons I hate it.
You should be able to have Eclipse auto-refresh your files in the Preferences window in the Window menu (type Refresh to show up the relevant pages). In my not so recent version of Eclipse, I have to put checkmarks on these:
Refresh workspace on startup (in Startup and Shutdown)
Refresh automatically (in Workspace)
Is there any way to open a file outside the project without it being cached and to be able to reopen it and see the actual code?
This is a huge disadvantage of the Eclipse. I do not know how things like this could be left the way they are?
The answer given by Archimedix solved a similar problem (in Java) that I have where the config files (hbm config and log4j) that I have modified in the eclipse editor are not being copied to the output folder. Instead an older version of the file is being copied every time I compile. I followed Archemedix solution, however, note that you still need to restart eclipse for it to take effect. After restarting eclipse, during compilation, any changes I make to the config files are now being copied to the output folder and not the old version.
Related
first of all I explain the reason why I try to do it.
I tried many editors/IDEs which could provide convenient syntax and variables check. Eclipse did the best.
But it works correctly only if I work with its project, otherwise there are a lot of glitches and no correct support of syntax suggestion/auto-complete.
I set my FTP client to download files into project's folder, but Eclipse does not recognize them as a part of this project so I still don't have it's full support. If I create PHP files with Eclipse in the same folder it works just fine. Is there a way to make read all PHP files in project folder as parts of a project?
Or, if you can suggest IDE which performs syntax check/auto-complete tasks as Eclipse does please do, I check if I tried it. I can't include all CMS into project, because it is Bitrix, it can kill any IDE which can try to chew it, so I just need a reliable tool which could work as code validation of currently edited script. The perfect tool could just be set for PHP 5.6/7.1 for example and perform validation based on language rules.
If you are trying to get Eclipse php support for randomly downloaded files you can set your FTP client to download that files in project's folder. Then you open Project Explorer in Eclipse, press refresh button to get actual folders/files list, find you file in there and open it by that project explorer. That makes Eclipse to consider that file as a part of your project so auto-complete and validation works fine. Other ways of opening it does not count.
I'm trying out PHPStorm by Jetbrains at the moment, which I think is an awesome IDE.
The only complain I have is that Im always in fear that I will overwrite changes other people made.
I'm currently working on a project without Git, just pure FTP. If I start PHPstorm, the first thing I have to do is synchronize my local files manually using the "Compare with local version..." dialog, which takes a lot of time at bigger projects.
Is it possible that PhpStorm behaves like Eclipse Remote Explorer?
It would be awesome if PhpStorm would check the file I just opened for a newer version on my default remote and replaces it automatically.
In the Tools > Deployment > Options dialog, you will see the following option:
Changing these options will allow you to customize how your uploads are pushed and when you're warned about overwriting changes
I'm using Netbeans 8 with remote files project.
The files are located on remote server and Netbeans access them via SFTP.
I would like that Netbeans will download fresh copy every time I open a file, same as notepad++ does.
any idea how to do that?
couldn't find solution on the web.
I ended up here after looking for an answer for the same question. I couldn't find automatic download of fresh copy during every time you open the IDE but there is an option to Download manually.
Right click on "Source Files" of your project in "Projects" window and click "Download".
If you are looking only to download files which are modified in server directly then you go for "Synchronize" which is just below the "Download".
Cheers!
You have to go on new project, and then press your java file, then make a name for your file then you are in.
I have an existing project utilizing git and have just installed eclipse along with egit. I pointed to the git repository with egit and can see all my files, my existing branches and can switch between branches.
When I open a file from the view of the git repository it does not seem to recognize that it is a php file, doesn't show me the classes within it and doesn't do code completion. If I just drag a file in from explorer it at least recognizes that file as php, but doesn't understand the project well enough to show me code completion from installed libraries. I think I need to configure eclipse to understand the projects home directory, but am a bit lost. Any help would be appreciated.
Your answer may fall within this guide to change the "nature" of your project. It's at least worth exploring. I will be attempting to do the exact thing you've described some time this week so hopefully it will work. The wiki doc also suggests that certain "natures" may conflict with each other but hopefully that won't be the case here. Link -->
http://wiki.eclipse.org/IRC_FAQ#How_do_I_manually_assign_a_project_Nature_or_BuildCommand.3F
After just trying to reproduce your steps I am having the exact same experience. I believe this may be "expected" behavior. For clarity, when I open a php file from the "PHP Explorer" view everything seems to work fine but when I open a php file from the "Git Repositories" view Eclipse treats it as a text file (no code highlighting etc.). I suggest that you work from the PHP Explorer view and leave the Git Repositories view open separately only to watch/monitor the repository not as a working view of files to edit and what not.
You need to open it as a PHP Project from existing source (GIT working folder) then share the project with Git, ie, right-click on the project, go to Team > Share project, click on Git.
See http://www.youtube.com/watch?v=-Zba8iAnLms for a demo.
Did you install the pdt plugin in eclipse? It should recognize any .php file opened. Shouldn't matter where it's located.
I noticed a strange sync problem. I have my project setup as a remote project and everything works fine. I have it set to upload on save. However, if someone on my server is working on a file and saves it. I don't see this change in netbeans and I end up opening a older version of the file and overwriting my colleague's changes when I press save.
Is there a way to have netbeans check the remote server for the latest file before saving?
thanks
No, NetBeans can not check the remote file automatically. It's just not set up to do that. Even if it were, you would still run into problems where you would clobber your colleague's changes, or he would clobber yours.
What you have is a basic version control problem, which is best solved by implementing one of the several version control systems out there (e.g., CVS, Subversion, Git, Mercurial, etc.) and then "building" your website out to the server from version control. Short of that, an imperfect solution would be to partition the files such that you are forbidden to edit files assigned to your colleague, and vice-versa.
NetBeans can download the file for you, but only when you tell it to by right-clicking on the file and choosing the Download command. This downloads the file whether it has been updated by someone else or not.