Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Code completion beyond 1 level
Code completion beyond 1 level [message #80084] Sat, 13 September 2008 10:23 Go to next message
Eclipse UserFriend
Originally posted by: nomail.nomail.it

I don't know if this is a real limitation or something I haven't optionally
set. However the problem can be easily explaind with an example.(hope the
indentation will work).

I am very interested in having the code completion in that code working! The
reason is that some strategies for big applications rely just on this.
Imagine classes that map a DB. One can use something like PDO::FETCH_OBJ,
but the best is statically type fields in classes then using
PDO::FETCH_CLASS. In the second way, you don't have the need to skip from
code e DB (or documentation) to remember fields (so attributes) of the DB
(so DataClass). But all vanish if the code below is not working. To me,
having DB mapped without code completion is almost useless in view of coding
facilities.

Hi all!
Rik.

<?php
class class2
{
public $attr1,$attr2,$attr3;
}

class class1
{
public $o1;
public function __construct()
{
$o1=new class2;
}


public function assign()
{
//Here code completion work only for $this-> not $this->o1->
$this->o1->attr1='value attr1';
}
}

$o=new class1;
$o->assign();
//Same as above: only work for first level ($o-> not $o->o1->)
echo $o->o1->attr1;
?>
Re: Code completion beyond 1 level [message #80136 is a reply to message #80084] Sun, 14 September 2008 08:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: michael.zend.com

Hi,

What version of PDT are you using?
This problem is solved PDT 2.0 nightlies.

"Rik" <nomail@nomail.it> wrote in message
news:gag488$2ao$1@build.eclipse.org...
>I don't know if this is a real limitation or something I haven't optionally
>set. However the problem can be easily explaind with an example.(hope the
>indentation will work).
>
> I am very interested in having the code completion in that code working!
> The reason is that some strategies for big applications rely just on this.
> Imagine classes that map a DB. One can use something like PDO::FETCH_OBJ,
> but the best is statically type fields in classes then using
> PDO::FETCH_CLASS. In the second way, you don't have the need to skip from
> code e DB (or documentation) to remember fields (so attributes) of the DB
> (so DataClass). But all vanish if the code below is not working. To me,
> having DB mapped without code completion is almost useless in view of
> coding facilities.
>
> Hi all!
> Rik.
>
> <?php
> class class2
> {
> public $attr1,$attr2,$attr3;
> }
>
> class class1
> {
> public $o1;
> public function __construct()
> {
> $o1=new class2;
> }
>
>
> public function assign()
> {
> //Here code completion work only for $this-> not $this->o1->
> $this->o1->attr1='value attr1';
> }
> }
>
> $o=new class1;
> $o->assign();
> //Same as above: only work for first level ($o-> not $o->o1->)
> echo $o->o1->attr1;
> ?>
>
Re: Code completion beyond 1 level [message #80151 is a reply to message #80136] Sun, 14 September 2008 10:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nomail.nomail.it

Monstruously great!
Gonna try!!!!!! :-)
Thanks.

Rik.

"Michael Spector" <michael@zend.com> ha scritto nel messaggio
news:gaignf$vst$1@build.eclipse.org...
> Hi,
>
> What version of PDT are you using?
> This problem is solved PDT 2.0 nightlies.
>
> "Rik" <nomail@nomail.it> wrote in message
> news:gag488$2ao$1@build.eclipse.org...
>>I don't know if this is a real limitation or something I haven't
>>optionally set. However the problem can be easily explaind with an
>>example.(hope the indentation will work).
>>
>> I am very interested in having the code completion in that code working!
>> The reason is that some strategies for big applications rely just on
>> this. Imagine classes that map a DB. One can use something like
>> PDO::FETCH_OBJ, but the best is statically type fields in classes then
>> using PDO::FETCH_CLASS. In the second way, you don't have the need to
>> skip from code e DB (or documentation) to remember fields (so attributes)
>> of the DB (so DataClass). But all vanish if the code below is not
>> working. To me, having DB mapped without code completion is almost
>> useless in view of coding facilities.
>>
>> Hi all!
>> Rik.
>>
>> <?php
>> class class2
>> {
>> public $attr1,$attr2,$attr3;
>> }
>>
>> class class1
>> {
>> public $o1;
>> public function __construct()
>> {
>> $o1=new class2;
>> }
>>
>>
>> public function assign()
>> {
>> //Here code completion work only for $this-> not $this->o1->
>> $this->o1->attr1='value attr1';
>> }
>> }
>>
>> $o=new class1;
>> $o->assign();
>> //Same as above: only work for first level ($o-> not $o->o1->)
>> echo $o->o1->attr1;
>> ?>
>>
>
Re: Code completion beyond 1 level [message #80166 is a reply to message #80136] Sun, 14 September 2008 16:21 Go to previous message
Eclipse UserFriend
Originally posted by: nomail.nomail.it

I confirm: It works! :-)
It's a little tricky to install the 2.0 but finally the result worth the
effort!
Rik


"Michael Spector" <michael@zend.com> ha scritto nel messaggio
news:gaignf$vst$1@build.eclipse.org...
> Hi,
>
> What version of PDT are you using?
> This problem is solved PDT 2.0 nightlies.
>
> "Rik" <nomail@nomail.it> wrote in message
> news:gag488$2ao$1@build.eclipse.org...
>>I don't know if this is a real limitation or something I haven't
>>optionally set. However the problem can be easily explaind with an
>>example.(hope the indentation will work).
>>
>> I am very interested in having the code completion in that code working!
>> The reason is that some strategies for big applications rely just on
>> this. Imagine classes that map a DB. One can use something like
>> PDO::FETCH_OBJ, but the best is statically type fields in classes then
>> using PDO::FETCH_CLASS. In the second way, you don't have the need to
>> skip from code e DB (or documentation) to remember fields (so attributes)
>> of the DB (so DataClass). But all vanish if the code below is not
>> working. To me, having DB mapped without code completion is almost
>> useless in view of coding facilities.
>>
>> Hi all!
>> Rik.
>>
>> <?php
>> class class2
>> {
>> public $attr1,$attr2,$attr3;
>> }
>>
>> class class1
>> {
>> public $o1;
>> public function __construct()
>> {
>> $o1=new class2;
>> }
>>
>>
>> public function assign()
>> {
>> //Here code completion work only for $this-> not $this->o1->
>> $this->o1->attr1='value attr1';
>> }
>> }
>>
>> $o=new class1;
>> $o->assign();
>> //Same as above: only work for first level ($o-> not $o->o1->)
>> echo $o->o1->attr1;
>> ?>
>>
>
Previous Topic:New integration build I20080909
Next Topic:Re: Xdebug stopped breaking breakpoints
Goto Forum:
  


Current Time: Wed Feb 08 23:24:17 GMT 2023

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

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

Back to the top