[prev in list] [next in list] [prev in thread] [next in thread] 

List:       quanta
Subject:    Re: [Quanta] Class Variables autocompletion
From:       Andrew Lowe <andrew.lowe () manildra ! com ! au>
Date:       2007-02-07 10:21:59
Message-ID: 45C9A847.5000002 () manildra ! com ! au
[Download RAW message or body]

Andras Mantia wrote:

>On Tuesday 06 February 2007, Andras Mantia wrote:
>  
>
>>Patch is welcome.
>>    
>>
>
>And of course, it should start by adding the following to the PHP 
>description.rc under [StructGroup_2] :
>
>AppendToTags = true
>ParentGroup = Classes
>
>
>This will give you the member variables, but it will give you too much, 
>as all the variables included inside the class will be treated as 
>members, so there is a need for filtering out the "wrong" ones. E.g. 
>only thouse which are "declared" should remain.
>
>And always keep in mind that this has to be done in a language 
>independent way.
>  
>
>
Thanks,
I started to play with the code, and, without making any changes, except 
those to the description.rc file you suggested, it works!

Variables and functions are now listed (functions first, variables 
second....). 
The "wrong" variables (class function variables) are filtered as well!

The only real problem is when you select the autocomplete entry it 
appends the function open bracket "(" to the variables as well. I figure 
this is in the auto-complete section in document.cpp, rather then the 
sagroupparser.cpp file?

I have attached my testcase file: testcaseClass.php

I might look into reading doxygen/javadoc/PHPDoc, etc style comments and 
displaying them? any recomendations for how to implement?
I will warn you, I am very rusty in my c++ :-)

I am subscribed to the Quanta Development List, so we can move this 
discussion there if it is getting off topic for this list?

-- 
Andrew Lowe
    System Administrator & Programmer
        Information Technology
            Manildra Group

Email:   andrew.lowe@manildra.com.au
Phone:   02 4423 8270
Mobile:  04 1323 8270
Fax:     02 4421 7760 


["testcaseClass.php" (text/html)]

<?php
include("Myfile.php");
class testClass
{
	public $classvar1;
	public $classvar2;
	private $classvar3;
	private $classvar4;
	var $classvar5;
	
	public function classfunction1()
	{
		echo $this->classvar1;
	}
	public function classfunction2()
	{
		echo $this->classvar2;
	}
	private function classfunction3()
	{
		echo $this->classvar3;
	}
	private function classfunction4()
	{
		echo $this->classvar4;
		$classfunction4var=0;
		$this->classvar1=0;
	}
}

$myvar1=1;
$myvar2=2;
function myfunction1()
{
	echo $myvar1;
}
function myfunction2()
{
	echo $myvar2;
}
$myTestClass=new testClass();

while($myvar1)
{
	if($myvar1)
		$myvar1--;
	elseif($myvar1==0)
		$myvar1=FALSE;
	else
		echo "error";
}
$myvar3=trim($myvar2);
?>

_______________________________________________
Quanta mailing list
Quanta@mail.kde.org
https://mail.kde.org/mailman/listinfo/quanta


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic