March 25, 2022 at 10:24 am #680050
I would like to use MyEclipse on a WordPress project, which means coding in PHP.
How can I import my PHP files in MyEclipse? How can I activate PHP syntax validation?
I use latest version of MyEclipse. I found some doc on the web, but it is about CodeMix and seems deprecated.March 25, 2022 at 10:51 am #680051
You can install the PHP Development tools into MyEclipse and this will add the PHP support you need. To do this, go to Help > Install from Catalog … and then you can search for, “PHP Development Tools” – you should see version 7.1 listed. Go ahead and install this and restart MyEclipse.
You should now be able to use File > Open Projects from File System to point to the folder containing the files you would like to edit. Another option is to create a new PHP project and import / reference your files from within that folder. More info here: https://help.eclipse.org/latest/index.jsp?topic=/org.eclipse.php.help/html/table_of_contents.html
Hope this helps!March 31, 2022 at 11:34 am #680232
I have installed PHP Development tools and restarted MyEclipse.
Then, when I try File > Open Projects from File System and point to the folder containing my files, and then click on Finish, nothing happens. No error, but the project does not appear in MyEclipse Explorer.
When I try the other option, create a new PHP project and import my files, I get an error, see attached screen copy.
Basically, I want to use MyEclipse to edit PHP files of a WordPress theme and WordPress plugins, and of course I don’t want to move the source since WordPress and related local web site are already configured and running well.April 1, 2022 at 6:47 am #680243
It’s odd that the Open Projects from File system does not work – that wizard is supposed to create a dummy Eclipse project if one is not already there in that location. Could you check the Project Explorer view as well, or restart and try again? It’s also possible that you have a working set filter selected in the ME Explorer view (check the options in the view menu). Could you look at the wp-content folder in the Windows Explorer and see if there’s a
.projectfile in there?
As for the other technique, looks to me like a bug in the PHP wizard – have you tried a different project name (in case this is the same project name you used for the first technique, which will now be “used” somehow).
A final solution would be to use the PHP wizard above to create a new PHP project. Then, create a folder in the project using Eclipse’s new folder wizard. However, use the advanced option to link to your
wp-contentfolder (see screenshot) – this will link to your existing folder without moving the resources, and you should be able to edit them in MyEclipse.
Hope this helps!April 4, 2022 at 3:29 am #680279
Hi Brian, I made some progress. I was only able to use the last option you proposed: use the PHP wizard to create a new PHP project. Then, create a folder in the project using Eclipse’s new folder wizard. Use the advanced option to link to my wp-content folder.
The folders and files appear in MyEclipse Explorer.
I can edit them, but I cannot save my edits, see attached screen copy.
My wp-content folder is a sub-folder of a WordPress local install, and I use this local install to have a local WordPress test site on my local machine, hosted on the IIS server provided by Win11.
So, it sounds that all my issues may be related to a permission issue on this folder.
If you tell me which specific security permissions I must give to MyEclipse on this folder, it should solve the problem.
April 4, 2022 at 4:59 am #680283
- This reply was modified 1 year, 11 months ago by knowledgeplaces.
Right, permissions would explain why the other options are failing. If you want a reduced list, I believe the Modify, Read, Write, and List folder contents permissions might be enough for MyEclipse to function. However, see no harm in giving all permissions on the folder to the user that you use to run MyEclipse.
Hopefully this fixes things, and you may even want to go back to creating a new PHP project in this location as it might set up additional natures / facets in the project that would allow you to fine tune the PHP support for the project.April 4, 2022 at 10:36 am #680290
Hi Brian, permissions updated and edits are saved.
I can now use MyEclipse for all my devs: Java, Angular and PHP. Great!April 4, 2022 at 12:54 pm #680307
You are living the MyEclipse dream! Glad you are up and running, and thank you for keeping us posted. Happy coding!