0

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.

hakre
  • 193,403
  • 52
  • 435
  • 836
NIck
  • 67
  • 13
  • Please check this question: [How to manually trigger DLTK indexing in Eclipse PDT for a PHP project](https://stackoverflow.com/q/25040424/367456) – hakre Jun 29 '17 at 21:26
  • thanks, but it does not work, I see no behavior changes. Perhaps a reason could be my downloaded files are stored in sub-folder with temp names – NIck Jun 30 '17 at 06:22
  • They need to be PHP files to have that working.Open one of these files, are they shown as PHP files? Unless not, they can not get indexed. – hakre Jun 30 '17 at 06:26
  • They are php files. I have an Eclipse project named 'Test' (workspace/Test). I created a php file via Eclipse named 'newfile.php', it is recognized (in header it is written Test/newfile.php). My client downloads files to Test//file.php. I open it in Eclipse, then perform cleaning of my project and no changes appears. Still no full php support in edited file. – NIck Jun 30 '17 at 07:02
  • Ensure that that directory is part of the Eclipse build path so that DLTK knows that it needs to index it. Also check with the product documentation which preconditions need to be matched to become that folder indexed. If you find that cumbersome, try the 30 day trial of Phpstorm. – hakre Jun 30 '17 at 08:50
  • It is set Included: (All). If I try to set inclusion pattern it shows only Eclipse settings directory in project folder. Although there are other subfolders created by SFTP client in project folder. All setting are default nothing special was set. – NIck Jul 03 '17 at 11:40

1 Answers1

0

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.

NIck
  • 67
  • 13