facebook

PHP files not working correctly

  1. CodeMix & Angular IDE
  2.  > 
  3. Getting Help
Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #610793 Reply

    raphi
    Participant

    In PHP files i don’t get proposals for functions in the file.

    I only get proposals for default functions like for example “echo”.

    I also cannot jump to a function with “Ctrl” and “Mouseclick”.

    Could you maybe help me with that problem?

    Thanks,
    Raphi

    #610795 Reply

    support-swapna
    Moderator

    Raphi,

    Sorry that you are seeing this problem in PHP files.

    I ran few quick tests and see proposals for functions in the PHP file. Attached is the screenshot for your reference.
    The Ctrl+Click navigation is not working at my end too. I will file a bug with the dev team to work on it.
    Can you please share your PHP files or code snippets along with screenshot to help us replicate the problem with the missing function proposals?

    Apologies for inconvenience caused.

    –Swapna
    Genuitec Support

    Attachments:
    You must be logged in to view attached files.
    #610798 Reply

    raphi
    Participant

    Hi Swapna,

    attached is a screenshot of the non working php proposals.
    I am using Eclipse 2018-12 (4.10.0) and newest CodeMix Version.

    -Raphi

    Attachments:
    You must be logged in to view attached files.
    #610806 Reply

    support-swapna
    Moderator

    raphi,

    Thank you for the details and the screenshot.
    I installed CodeMix to a fresh copy of Eclipse 2018-12 and still do not see the problem.
    Can you please clarify if the PHP file is opened in the CodeMix PHP editor? From your screenshot, it does not look like the PHP file is opened in the CodeMix editor. Please right click on the file in the explorer view, Open With > PHP :: CodeMix and check if you are still seeing the problem.

    –Swapna
    Genuitec Support

    #610807 Reply

    raphi
    Participant

    Hi Swapna,

    I saw that the default php editor was “PHP Editor” and not “PHP :: CodeMix”.
    Don’t know why this happened because I have never set the editor since I installed Eclipse and CodeMix.

    Now after setting CodeMix Editor as default everything’s working fine. Proposals and also “Ctrl” + “Click” is working!

    Thanks for your fast support.

    Greets,
    Raphi

    #610808 Reply

    raphi
    Participant

    Would be nice if “Ctrl” + “Click” would also work if the function is not in the same file.

    For example if you require another PHP file, than it is not working.
    Maybe the devs can have a look at this 🙂

    #610812 Reply

    support-swapna
    Moderator

    raphi,

    Glad that it works now. Eclipse remembers if you’ve used Open With in the past for particular files and overrides any default editor.
    Please go to Window > Preferences > CodeMix > Languages > Preferred Editors and check if you have the expected/desired file extensions checked
    for PHP and under PHP.

    I see the ctrl+click working even for a function which is in a different file in the same project.
    Can you please share with us the sample code showing how you are referencing the other file to help us replicate the problem at our end?

    –Swapna
    Genuitec Support

    #610820 Reply

    raphi
    Participant

    Hi Swapna,

    PHP was unchecked under this settings. I checked it now.

    I did some tests an I found out that “Ctrl”+”Click” only works when the PHP File has the ending Tag ?>

    The problem is now when i add the ending tag to my PHP files everytime i format “Ctrl”+”Shift”+”F” the file the ending tags get deleted by the PHP formatter.

    Is there any possibility to disable this behavior or that also PHP files without ending tags get recognized?

    Thanks,
    Raphi

    #610961 Reply

    support-swapna
    Moderator

    Raphi,

    I see the problem with formatter deleting the ending tag in a PHP file. I have filed a bug report for the dev team to work on it.
    I am afraid there is no workaround for now. We will keep you posted when the fix is out.

    Apologies for inconvenience caused.

    –Swapna
    Genuitec Support

    #616307 Reply

    raphi
    Participant

    Hi,

    is there some news with the go to definition for php functions that are not in the same file?
    Found out that it is still not working. Now it also doesn’t work if I add an ending tag ?> in the php file.

    I want to go to definition of functions in files wich I include like this:
    require ‘../../webresources/php/functions.php’;

    Do I also have to make a config file like the jsconfig.json for JS files?

    Thanks for your help!

    Greets,
    Raphi

    • This reply was modified 4 years, 10 months ago by raphi.
    #616353 Reply

    Hi raphi,

    Regarding go to definition, please try the following:

    – Download the vsix extension file of PHP Intellephense (you can find a link to it here: http://intelephense.net/).
    – Open CodeMix Extensions Manager (Help -> CodeMix Extensions…).
    – Disable the PHP IntelliSense extension (Click on the checkmark to disable)
    – Choose Browse for Extensions.
    – Now choose Install from VISX file… and select the file from step 1.

    This should improve the behavior of go to definition.

    Cheers,
    Sal

    #616422 Reply

    raphi
    Participant

    Hi Sal,

    thanks i have installed intelephense now.
    It always shows the message “intelephense indexing…” but it never finishes and the go to definition behavior is still not working. In the console it shows that it has finished.

    Do you now what could cause this problem?

    Addition: It seems to work when I have the PHP file (in another project) which I want to go to definition opened in editor . As soon as I close the file it doesn’t work again.

    Thanks,
    Raphi

    • This reply was modified 4 years, 10 months ago by raphi.
    • This reply was modified 4 years, 10 months ago by raphi.
    Attachments:
    You must be logged in to view attached files.
    #616475 Reply

    Hi raphi,

    Regarding to got to definition for files in other projects not working correctly, try enabling project registration on startup for those other projects.
    To do so, check the “Always register project at CodeMix startup”, checkbox on the “Project Properties > CodeMix > Miscellaneous” page for each of the involved projects.

    Please note that projects are not registered by the engine by default in order to save resources by projects that might not be in use, so they’re registered until they’re actually detected by being in use (e.g. when you open a file from the project).

    If you want know more about this, please check: https://www.genuitec.com/docs/workbench/codemix-getting-started/#project_registration

    About the “intelephense indexing…” message not going away, that’s a problem with status bar management.
    I’m filing a report so the development team can take a look and find a solution.

    Cheers,
    Sal

    #616505 Reply

    raphi
    Participant

    Hi Sal,

    with this setting it works. Thank you very much!

    Okay cool so I’m sure they will fix it in an upcoming release 🙂

    Thanks for your great support guys I will definitely renew my CodeMix license!

    Cheers,
    Raphi

    #624173 Reply

    raphi
    Participant

    Hi guys,

    the “intelephense indexing…” message is still showing up the whole time.
    Can you take a look at this?

    Thanks,
    Raphi

Viewing 15 posts - 1 through 15 (of 16 total)
Reply To: PHP files not working correctly

You must be logged in to post in the forum log in