NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Code insight works intermittently


Joined: 09 Sep 2003
Posts: 12
Reply with quote
I'm using PHPEd 3.3.3 on Win2K. Sometimes code insight (AKA code completion) works, sometimes not. It seems to always work with variables defined in the page. Properties of classes that are defined in included files often are not seen by code insight.

I went into Project > Properties > Files and set "Include path" to the root of my project. All the defined classes are under than root. But code insight often does not find the properties or functions anyway.

Currently, all my project files are in one directory.

Is there any way to get code completion/code insight to work all the time?

Thanks,

E
View user's profileFind all posts by elektrophyteSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
suppose you have two files and two files included in them:
a.php:
<?
include "incdir/inc1.php"
?>

and
b.php:
<?
include "incdir2/inc2.php"
?>

inc1.php is located in /somedir/incdir/inc1.php
and inc2.php is located in /somedir/someotherdir/incdir2/inc1.php

in this case both /somedir/someotherdir and /somedir should be listed in the "include path" setting.


Forthcoming PHPED 4.0 besides others is targeted to this problem.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 09 Sep 2003
Posts: 12
Reply with quote
Actually, it often doesn't work when the included file is in a directory in the include path. It fails to know about declared classes, methods, variables, etc.

All needed files parent directories are definitely in the configured include path.

E
View user's profileFind all posts by elektrophyteSend private message


Joined: 09 Sep 2003
Posts: 12
Reply with quote
Here is an example of what I'm talking about. This is some code from my current project:

Code:
$interests = new SGroup($grp);
$interests->baseParam = 'interests';
$interests->d1 = 'Interests';
$interests->d2 = 'Select all interests that apply.';
SUnit::initPerson($inMY_CURSOR_HERE , 'localhost', 'username', 'password', 'persons', 'interest');


I try to add a parameter for the initPerson() function call. The cursor is where it says "MY_CURSOR_HERE". Note that I've already typed "$in" and I'm looking for the IDE to complete it to "$interests". However, the IDE does not pop up a list of completion options. If I hit CTRL > SPACE, nothing happens.

But if the cursor is at the start of a blank like, code completion does work for "$interests". Is it that code completion does not work within function call parameter lists?

Thanks,

E
View user's profileFind all posts by elektrophyteSend private message


Joined: 09 Sep 2003
Posts: 12
Reply with quote
Here is another illustration from my project...

Code:
$userPrefs = new PrefSet;
$activities = new Pref($u  <-- looking for code completion "$userPrefs"


As above, no code completion popup.

Here is more information to help specify the issue.

When I am working on a function declaration parameter list code completion popup menu comes up when I type "$".

I type...

Code:
function i // Code completion popup appears.


Don't need completion because I'm defining a function name. I type the rest of the name and start the parameter list...

Code:
function initUserPrefs($  // Code completion popup appears.
View user's profileFind all posts by elektrophyteSend private message


Joined: 04 Aug 2004
Posts: 13
Reply with quote
ddmitrie, I hope you are finanlly gonna believe my post as well that code completion is not working - I posted full examples for you, and all you kept saying is it worked, while it obviously doesn't, as this user is now confirming...

I really need this to be fixed, or I'll need to find another solution, which would be a shame, since I like nusphere a lot.
View user's profileFind all posts by speedpacketSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
Quote:
and all you kept saying is it worked

Actually not. It's known that in some situations v 3.3 does not provide code completion due to its limitations. It's not an ideal code insight tool. All I said is below:
Quote:
Forthcoming PHPED 4.0 besides others is targeted to this problem.

And it's what I keep saying Smile
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Code insight works intermittently
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic