[KDE Dot News]
 faq
 flatforty
 contribute
 subscribe
 configure
 search
 rdf

 main
 parent
 thread


Re: PHP
by Eric Laffoon on Wednesday 20/Apr/2005, @09:42
> The only thing I'm sometimes envious of are Zend Studio's function parameter hints for user-defined functions. You can include a file somewhere with functions you wrote and when you are in the main file it actually tells you what parameters there are. Great!

For built in functions this is stored in the DTEP. I'd have to talk with Andras about this. The new object syntax auto completion was done with an external temporary DTEP file and I don't know if the hooks are still active but the ability to add this should not be difficult as it would only need to follow the XML definition used in the DTEP and Quanta would need to know to read it. In fact... technically you could place or link files into the DTEP files you have currently. I have written a PHP file to parse PHP docs and generate the DTEP files and it can also accept external data input. If you are willing to accept certain limitations like having to create the files and having them be global to all projects this is there now. Ideally we would like to be able to generate files for a project on demand.

I note though that the parameters are included in the structure tree so they should be in the tip. Additional project DTEP files would enable additional information like the version specification we added for 3.4, though I'm not sure how it would be used. In addition to this you can also generate PHP docs for your project and have project documentation in the doc panel.

> Even better would be a Delphi-like "right-click->go to definition". I dont know any PHP editor that can do that, though.

This should be easy enough to add. In fact both things you want are already in the document structure tab. Open a PHP file and click the structure view in the left. You will see groups for functions, variables, inclusions, objects and classes. If you look at a function you will see the parameters. If you see a file address you can expand these are included functions in the file they originate in. Quanta understands the scoped linking and if you click on that function it will open the file and take you there.

So both features you imagine to be unlikely exist, but in the structure tree. As for the rest of it we just have so many things we can do with our resources... and as it turns out those are more than most people expect.
  Related Links
 ·   Articles on Applications
 ·   Also by Eric Laffoon
 ·   Contact author

Thread Threshold:

The Fine Print: The following comments are owned by whomever posted them.
( Reply )

Re: PHP
by Andras Mantia on Wednesday 20/Apr/2005, @09:56
The parameters do not appear unless the function/class is declared in a .tag file in the DTEP. This is what Eric says, that we might generated in the feature project specific DTEP tags from PHP classes and functions. Right now what you can get from Quanta is autocompletion for external functions, classes and class methods:
included_file.php:
<?
class includedClass {
function includedClass_ctor(int i)
{
if ($a) {
$b = $a;
}
}

function includedClass_method2(string s)
{
}

function includedClass_method1(int i, int j)
{
}
}

function externalFunc(int i) {
}

$includevar;

?>

main_file.php:
<?
include ("included_file.php");
class qmyClass{

function qmyClass_ctor(int i)
{
$i = 0;
}

function qmyClass_method2(string s)
{
}

function qmyClass_method1(int i, int j)
{
$this-> [will show the methods of qmyClass]
}
}

function qmyFunction(int i, int j)
{
}

$test = new [will show the qmyClass and includedClass]
$q = new qmyClass;
$f_included = new includedClass;

$q-> [will show the qmyClass methods]
$f_included-> [will shot the includedClass methods[
ext [CTRL-SPACE will show the externalFunc declared in the included file]
qmy [CTRL-SPACE will show the qmyFunction declared here]
$ [will show all the used variables, including the ones from the included files, except of the "i" and "this" from inside qmyClass]
?>

Class member variable autocompletion and hints for the function/member arguments will come in the next versions.
NOTE: autocompletion either pops up automatically in some cases (like when typing $ or ->) or you can invoke manually with CTRL-SPACE.
[ Reply To This | View ]
  • Re: PHP
    by Aslak Berby on Monday 13/Jun/2005, @04:33
    This is great, but it some what buggy if it not I that do something wrong.
    (This was also posted on the Quantra mailing list)

    I notice the following:
    if I do:
    $a = new aClass;

    then start typing:
    $a->
    it will show all functions in the class.

    But the following construction does not work with autocompletion:
    $a = &new aClass;
    $a = new aClass();
    $a = &new aClass();

    I don't know if this is something I can set up or if it is in the code.
    Will there be done anything about it? Its not a main couse for me, but rather annoying as the functionality for class compleate obvius is there...

    (I am using the one that was included in SuSE 9.3 Distro (3.4) If this is dealth with in a later version I appoligy for the ignoranse.)
    [ Reply To This | View ]

 
The Fine Print: The previous comments are owned by whomever posted them.
( Reply )

  "Ironically, we are working on that right now!" -- Kurt Granroth
KDE®, "K Desktop Environment", "KDE Dot News", "got the dot?" and the KDE Logo® are trademarks or registered trademarks of KDE e.V. in the European Union, the United States and other countries. All other trademarks and copyrights on this page are owned by their respective owners. Comments are owned by the poster. The rest: Copyright © 2000-2008 KDE e.V. for The KDE Project. For further information or comments on this site, please contact the Webmaster.
[ home | post article | flat forty | subscribe | search | rdf ]