Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Code Completion: include require
Code Completion: include require [message #80459] Wed, 17 September 2008 14:25 Go to next message
Eclipse UserFriend
Originally posted by: nomail.nomail.it

As a new feature, with low priority (Is more importat and easy for now to
make code completion take care of variables scope: at the moment private
variables are considered like public), it would be nice having the code
completion take care of files included and NO the overall projects.

That is: if I open a big project, create a new php file, and type $, the
code completion shows every variable of the project. In large application
could probably tilt the IDE or at least make the developer a little nervous.

In other words is important to limit code completion to the real available
variables in a specific file, taking care of include and require (AND not
only for static paths, but also things like BASE_PATH . "/mydir", in view o
making PDT the best for big projects! :-)

Should I write this down on bugzilla or this issue is already well known?

Hi all!
Rik - Riksoft.
Re: Code Completion: include require [message #80474 is a reply to message #80459] Fri, 19 September 2008 13:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.chanibal.net

I vote against as PHP kind of doesn't work this way - you've got
autoloaders, automaticly included files, lots of magic etc. Limiting it
to the explicitly (inclu|require)ded files is not a good idea.

The only thing I can think of that could be usefull is to add some kind
of directory metadata that files in this dir only have content assist
from these directories (and a list or regex to select them). I'd prefer
through that PDT developers focus on more important things first.
Re: Code Completion: include require [message #80679 is a reply to message #80474] Thu, 25 September 2008 10:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nomail.nomail.it

Yes, I said "low priority".
Whatever the case, is an error to have have the overall project in the code
completion because it says: "Hey, you can use this and this" while is not
true, is out of scope. In other words, "code completion" should be named
"code I-Feel-Lucky"! :-)
When one try to use PDT to make big projects, the code completion showing
the overall project, everywhere, make it useless to have.

Maybe include/require are not sufficient. Maybe can be decided by an option.
Maybe there are other solution. In any case this is a big problem for big
projects.

We are in year 2008, almost 2009. A good code completion is the basis of an
editor of choice and today good editors make the difference from how many
develop in one language and how many in another. Is not only a choice based
on the mere language.
So, it is importat to take care, very much, of the code completion feature,
sooner or later.



"ChanibaL" <eclipse@chanibal.net> ha scritto nel messaggio
news:gb0af6$lmf$1@build.eclipse.org...
>I vote against as PHP kind of doesn't work this way - you've got
>autoloaders, automaticly included files, lots of magic etc. Limiting it to
>the explicitly (inclu|require)ded files is not a good idea.
>
> The only thing I can think of that could be usefull is to add some kind of
> directory metadata that files in this dir only have content assist from
> these directories (and a list or regex to select them). I'd prefer through
> that PDT developers focus on more important things first.
Re: Code Completion: include require [message #80800 is a reply to message #80679] Fri, 26 September 2008 01:39 Go to previous messageGo to next message
David Muir is currently offline David MuirFriend
Messages: 63
Registered: July 2009
Member
I also agree that code completion should be limited to the current scope.
And I don't really agree with CanibaL's assertion that PHP doesn't work
this way. Autoloaded code is a moot point in this case, as any global
variables in the autoloaded file are bound to the scope of the autoloader,
and thus won't be included into the scope you're currently working in.
Limiting things to explicitly included/required files makes perfect sense,
and you could include a fall-back for variable includes. Eg. if you're
including a file explicitly, then include the variables from that file. If
the include is variable, then include all variables in the global scope of
the project.

Rik wrote:

> Yes, I said "low priority".
> Whatever the case, is an error to have have the overall project in the code
> completion because it says: "Hey, you can use this and this" while is not
> true, is out of scope. In other words, "code completion" should be named
> "code I-Feel-Lucky"! :-)
> When one try to use PDT to make big projects, the code completion showing
> the overall project, everywhere, make it useless to have.

> Maybe include/require are not sufficient. Maybe can be decided by an option.
> Maybe there are other solution. In any case this is a big problem for big
> projects.

> We are in year 2008, almost 2009. A good code completion is the basis of an
> editor of choice and today good editors make the difference from how many
> develop in one language and how many in another. Is not only a choice based
> on the mere language.
> So, it is importat to take care, very much, of the code completion feature,
> sooner or later.



> "ChanibaL" <eclipse@chanibal.net> ha scritto nel messaggio
> news:gb0af6$lmf$1@build.eclipse.org...
>>I vote against as PHP kind of doesn't work this way - you've got
>>autoloaders, automaticly included files, lots of magic etc. Limiting it to
>>the explicitly (inclu|require)ded files is not a good idea.
>>
>> The only thing I can think of that could be usefull is to add some kind of
>> directory metadata that files in this dir only have content assist from
>> these directories (and a list or regex to select them). I'd prefer through
>> that PDT developers focus on more important things first.
Re: Code Completion: include require [message #80827 is a reply to message #80800] Fri, 26 September 2008 09:36 Go to previous message
Eclipse UserFriend
Originally posted by: nomail.nomail.it

Vote for
https://bugs.eclipse.org/bugs/show_bug.cgi?id=247932

and also the more simpler, but also important
https://bugs.eclipse.org/bugs/show_bug.cgi?id=247930

:-)


"David Muir" <david@davidkmuir.com> ha scritto nel messaggio
news:a9f9dc930899ee829049b29ea9f3c2b8$1@www.eclipse.org...
>I also agree that code completion should be limited to the current scope.
>And I don't really agree with CanibaL's assertion that PHP doesn't work
>this way. Autoloaded code is a moot point in this case, as any global
>variables in the autoloaded file are bound to the scope of the autoloader,
>and thus won't be included into the scope you're currently working in.
>Limiting things to explicitly included/required files makes perfect sense,
>and you could include a fall-back for variable includes. Eg. if you're
>including a file explicitly, then include the variables from that file. If
>the include is variable, then include all variables in the global scope of
>the project.
> Rik wrote:
>
>> Yes, I said "low priority".
>> Whatever the case, is an error to have have the overall project in the
>> code completion because it says: "Hey, you can use this and this" while
>> is not true, is out of scope. In other words, "code completion" should be
>> named "code I-Feel-Lucky"! :-)
>> When one try to use PDT to make big projects, the code completion showing
>> the overall project, everywhere, make it useless to have.
>
>> Maybe include/require are not sufficient. Maybe can be decided by an
>> option. Maybe there are other solution. In any case this is a big problem
>> for big projects.
>
>> We are in year 2008, almost 2009. A good code completion is the basis of
>> an editor of choice and today good editors make the difference from how
>> many develop in one language and how many in another. Is not only a
>> choice based on the mere language.
>> So, it is importat to take care, very much, of the code completion
>> feature, sooner or later.
>
>
>
>> "ChanibaL" <eclipse@chanibal.net> ha scritto nel messaggio
>> news:gb0af6$lmf$1@build.eclipse.org...
>>>I vote against as PHP kind of doesn't work this way - you've got
>>>autoloaders, automaticly included files, lots of magic etc. Limiting it
>>>to the explicitly (inclu|require)ded files is not a good idea.
>>>
>>> The only thing I can think of that could be usefull is to add some kind
>>> of directory metadata that files in this dir only have content assist
>>> from these directories (and a list or regex to select them). I'd prefer
>>> through that PDT developers focus on more important things first.
>
>
Previous Topic:Eclipse download site performance is terrible
Next Topic:Code Completion: Private variables
Goto Forum:
  


Current Time: Fri Apr 19 09:46:09 GMT 2024

Powered by FUDForum. Page generated in 0.02194 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top