This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 150458 - Tooltip add docstring recommended and does nothing
Summary: Tooltip add docstring recommended and does nothing
Status: CLOSED FIXED
Alias: None
Product: python
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Torbjorn Norbye
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-17 00:56 UTC by tonybeckham
Modified: 2017-06-22 18:00 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
error message shown along with tooltip (201.74 KB, image/png)
2008-10-17 01:21 UTC, tonybeckham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tonybeckham 2008-10-17 00:56:35 UTC
When you begin a def, tooltip appears to insert oneliner or multi-line docstring.  If the statement has not been
followed by a ":" then choosing any item from that tooltip does nothing.

Steps:
Create a new Python project
add def foo(self)
on the tool tip select any action, oneliner, preview...nothing happens
place ":" at end to get def foo(self):
now click on tool tip, all actions work as expected

System:
Product Version: NetBeans IDE 6.5 RC1 (Build 20081016214629)
Java: 1.5.0_16; Java HotSpot(TM) Client VM 1.5.0_16-133
System: Mac OS X version 10.5.5 running on i386; MacRoman; en_US (nb)
Comment 1 Torbjorn Norbye 2008-10-17 01:00:19 UTC
That's not valid Python code (try running it).

I wonder with Jython doesn't generate an error for it...
Comment 2 tonybeckham 2008-10-17 01:20:07 UTC
Both Python and Jython give an error, but it is not at the place of the tooltip.  (see screen shot)  Of course this is
not valid code but that is part of the issue.  Do you want to offer tooltips/quickfixes even for invalid code(I think
yes), or disable them the code is invalid.
Comment 3 tonybeckham 2008-10-17 01:21:23 UTC
Created attachment 72057 [details]
error message shown along with tooltip
Comment 4 Torbjorn Norbye 2008-10-27 23:52:39 UTC
I have added automatic insertion of the closing : when you type def foo() now - so it's much harder to accidentally run into this for people new to Python. 
Therefore, this issue is quite a bit less likely to ever occur, so lowering priority to P3.
Comment 5 Jenselme 2017-06-22 17:45:40 UTC
Not sure it is still relevant with the current version. Closing this as old bug. If this is still a thing, please reopen and accept my apologies.
Comment 6 Jiri Kovalsky 2017-06-22 18:00:58 UTC
Thanks for your evaluation Julien. Closing then.