autocomplete for standard php functions (ZST 9)

General discussion on Zend Studio

Re: autocomplete for standard php functions (ZST 9)

Postby automatix on Thu Jul 12, 2012 11:51 am

Hello again guys!

Now I got the same problem like half a year ago, but the solution/workaround from December does not work anymore.

@Kalin Yanev
> Did you create your current workspace and project using ZendStudio version earlier than 9?
I think no, but I'm not sure.
> Did you reproduce this problem in another workspace and php project, both created by ZendStudio 9?
There is another workspace (created by ZendStudio 9), where I don't get this problem.
> Did you get standard.php and SPL.php extracted in the following location just after you have created the php project
> <path_to_your_workspace>\<workspace_name>\.metadata\.plugins\org.eclipse.php.core\__language__\<folder_name>
I don't know, how to extract standard.php and SPL.php, but this folder contains several subfolders with PHP files and functions in them.

The only difference between the workspace, where I get the autosompletion problem and the one where not, is, that the other on was (possibly) created by ZS9. I need my current workspace. Is it possible to solve this problem without having to switch to a different workspace?
automatix
 
Posts: 10
Joined: Sun Aug 08, 2010 12:37 pm

Re: autocomplete for standard php functions (ZST 9)

Postby kalinyanev on Thu Jul 12, 2012 2:45 pm

@automatix,

> Did you create your current workspace and project using ZendStudio version earlier than 9?
I think no, but I'm not sure.

Kalin:
I have to say that I re-tested now in ZendStudio 9 in different workspaces and still cannot reproduce the problem you met.
---
> Did you reproduce this problem in another workspace and php project, both created by ZendStudio 9?
There is another workspace (created by ZendStudio 9), where I don't get this problem.

Kalin:
It sounds like a random problem and in that case it will be difficult to catch. Could you please send me the ZendStudio support file taken from the workspace where you get the problem?
How to do that:
Open Studio in the problematic workspace > Go to main menu > Help > Support Tool > you will be suggestred to save the support file in any archive format (e.g. .zip file). Do it, then send it to me.
---
> Did you get standard.php and SPL.php extracted in the following location just after you have created the php project
> <path_to_your_workspace>\<workspace_name>\.metadata\.plugins\org.eclipse.php.core\__language__\<folder_name>
I don't know, how to extract standard.php and SPL.php, but this folder contains several subfolders with PHP files and functions in them.

Kalin:
Just search in the workspace (in this one where you met the Content Assist problem) for standard.php and SPL.php.
Once you have created a PHP/ZF project in this workspace, you have to get these files in some fub-folder under org.eclipse.php.core folder.
For example, on my Win 7 machine these files are located here:
C:\Users\zend\Zend\workspaces\DefaultWorkspace66644\.metadata\.plugins\org.eclipse.php.core\__language__\c8e76182
where DefaultWorkspace66644 is my current worspace.
In case you don't get these files, copy them from another workspace and paste them to the given location, restart ZendStudio, then try Content Assist again.
---
The only difference between the workspace, where I get the autosompletion problem and the one where not, is, that the other on was (possibly) created by ZS9. I need my current workspace. Is it possible to solve this problem without having to switch to a different workspace?

Kalin:
In case it no so crucial for you, you can switch ZendStudio to another workspace and import the projects from the problematic workspace. (Import -> Existing project from workspace).
Did you try Hekko's workaround suggested here: viewtopic.php?f=59&t=43078#p150093 ?


Regards,
Kalin
User avatar
kalinyanev
 
Posts: 89
Joined: Thu Jul 02, 2009 7:20 am

Re: autocomplete for standard php functions (ZST 9)

Postby clarkphp on Tue Jul 17, 2012 5:51 am

This has also worked on the odd occasion that this problem crops up. Hasn't happened to me at all in the most recent versions of Studio 9:

Replace the contents of the project's .buildpath file with the following:

<?xml version="1.0" encoding="UTF-8"?>
<buildpath>
<buildpathentry kind="src" path=""/>
<buildpathentry kind="con" path="com.zend.php.phpunit.CONTAINER"/>
<buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>
<buildpathentry kind="con" path="org.zend.php.framework.CONTAINER"/>
</buildpath>

1. First close project in Zend Studio
2. Open or create the file .buildpath file in the workspace.
If the file already exists, replace the content with the XML indicated above
If the file does not exist, create it /path/to/workspace/<project>/.buildpath
-- insert the XML contents indicated above
3. In Zend Studio Open the project
4. Then do Project - Clean
User avatar
clarkphp
 
Posts: 19
Joined: Sat Jun 30, 2012 9:59 pm
Location: Tennessee, United States

Re: autocomplete for standard php functions (ZST 9)

Postby varky on Fri Nov 09, 2012 2:37 am

hekkoe wrote:What worked for me was this:

Deleting all folders from:
{workspace}\.metadata\.plugins\org.eclipse.php.core\__language__

Then removing the PHP Language Library from the build path (right click in the PHP explorer and then buildpath -> remove from build-path)

cleaning the project

then adding this line to .buildpath file in the project root:
Code: Select all
<buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>

then cleaning the project again and restarting Zend Studio.

Hope this helps!
Hekko


I have the same problem. That not work for me.
varky
 
Posts: 2
Joined: Fri Nov 06, 2009 4:23 pm

Re: autocomplete for standard php functions (ZST 9)

Postby hshhbd on Mon Dec 24, 2012 2:43 am

I had the same problem. Core API not working at all after updating to 9.0.4 today. Tried all suggestions, no joy.
hshhbd
 
Posts: 1
Joined: Mon Dec 24, 2012 2:41 am

Re: autocomplete for standard php functions (ZST 9)

Postby brun7574 on Thu Aug 01, 2013 5:44 am

This problem is just a matter of comparing different project.
Try this:
01 - Create a new PHP project in the workspace.
02 - After the project is created, check if the autocomplete functions is working correctly in a new php file inside this project.
03 - Now, that it is working (I hope so), just open the folder where your created project's folder is.
04 - And compare theses files with your old "not working" imported project:
01 - ".settings/org.eclipse.core.resources.prefs"
02 - ".buildpath"

Probably your imported project don't have this buildpath file or it's not ok.
I hope this work for you with this problem.
brun7574
 
Posts: 1
Joined: Thu Aug 01, 2013 5:35 am

Previous

Return to Zend Studio

Who is online

Users browsing this forum: No registered users and 3 guests