Displaying Documentation Window Next to Completion Window

Do you use a wide screen? Or have you noticed that the documentation window hides the text in the editor at the moment when you want to see one or two lines above the caret? A few days ago I was discussing with the editor guys, why NetBeans displays the documentation window above the code completion window. As a result there is issue #144362, which was resolved at the beginning of this month.

If you switch on the Display Documetation Window Next to Completion property in the Tools -> Options -> Editor category, the documentation window is displayed on the left or right of the code completion window.



Comments:

Great improvement!

Posted by honza on September 12, 2008 at 02:51 AM CEST #

Hello,

This question is kind of off-topic but relates to auto-completion.

Is it possible to add auto-completion for css class names? By this I mean that the editor would pop out a list of css classes that's associated with the page from inline styles or externally linked stylesheet.

For exampple: I started typing something like:

<div class="bo

Then the system would pop out a list of the css classes that's available.

Posted by raymond on September 12, 2008 at 01:33 PM CEST #

Hi Raymond,

this is not very simple task and I'm afraid that this will not be possible in NetBeans 6.5 timeframe. Anyway I have entered news enhancement: http://www.netbeans.org/issues/show_bug.cgi?id=147134 .

Regards,
Petr

Posted by Petr on September 12, 2008 at 02:20 PM CEST #

Nice improvement.

One question, are phpdoc comments @var and @return supported for the autocompletion?

Posted by optik on September 14, 2008 at 09:17 AM CEST #

Hi Optik,

I don't know what you exactly mean, but I will try to answer.

If you write before a method, a fanction or a field declaration chars /\*\* and pres ENTER, then NetBeans complete the php doc including @var, @param and @return php doc tags.

Also all php doc tags are offered in the a php doc coment after @. If you invoke code completion after @var, @return, @param etc, the code completion offers all classes, which are found in the project and in the include path.

Does it answer your question?

Ragards,
Petr

Posted by Petr Pisl on September 14, 2008 at 02:22 PM CEST #

Thanks Petr, but it isn't what I realy thought,

I have this classes

class User {
public Id;
}

class System
/\*\* @var User \*/
public static $userInfo;
}

when I typing somewhere in the code

$currentUser = System::$userInfo->

recognizes the IDE type for the $userInfo from the phpDoc comment and offers me its properties like ->Id ? If yes, it would be very nice and helpful feature. Sorry, I have currently no access to the Ide for testing this.

Posted by optik on September 16, 2008 at 03:47 PM CEST #

Hi Optik,

thanks for the explanation. This is definitely bug, because the code completion doesn't work in your case

<?php

class User {
public $id;
}

class System {
/\*\* @var User \*/
public static $userInfo;
}

$currentUser = System::$userInfo->|

?>

but it works in the case when the $userInfo is not static:

<?php

class User {
public $id;
}

class System {
/\*\* @var User \*/
public $userInfo;
}

$currentUser = new System;
$currentUser->userInfo->

?>

I have entered new issue for this.

Thanks,
Petr

Posted by Petr on September 16, 2008 at 04:08 PM CEST #

Thanks Petr

Posted by raymond on September 16, 2008 at 07:42 PM CEST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

This blogs is written by NetBeans developers who contribute to the PHP support mainly.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today