Code completion beyond 1 level [message #80084] |
Sat, 13 September 2008 06:23  |
Eclipse User |
|
|
|
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 #80166 is a reply to message #80136] |
Sun, 14 September 2008 12:21  |
Eclipse User |
|
|
|
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;
>> ?>
>>
>
|
|
|
Powered by
FUDForum. Page generated in 0.28856 seconds