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 150588 - Rename context menu is enabled when it should not be
Summary: Rename context menu is enabled when it should not be
Status: CLOSED INVALID
Alias: None
Product: python
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: Torbjorn Norbye
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-17 22:22 UTC by tonybeckham
Modified: 2017-06-22 18:03 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
image capture of issue (129.72 KB, image/png)
2008-10-17 22:24 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 22:22:26 UTC
If you have:

    selection1 = raw_input('>')
    selection2 = raw_input('>')

Selecting ">" and bringing up the context menu on it has the rename option available but selecting that option gives
"cannot perform rename here" in the editor window tray.  In such cases, rename should be disabled.

System:
Product Version: NetBeans IDE 6.5 RC1 (Build 20081017144645)
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)

To Reproduce:
1. Create a new python project and change code in default page to:

if __name__ == "__main__":
    selection1 = raw_input('>')
    selection2 = raw_input('>')
    print "Hello";

2. Highlight ">", right click
3. Select Rename, you will see error in editor tray.
Comment 1 tonybeckham 2008-10-17 22:24:24 UTC
Created attachment 72161 [details]
image capture of issue
Comment 2 Torbjorn Norbye 2008-10-17 22:29:23 UTC
This is working as designed - that's why there is an error message instead of having the action disabled.
Enabling/disabling the action on the fly would involve a lot of computation just to post a context menu, which could
make the context menu sluggish.
Comment 3 tonybeckham 2008-10-17 22:53:06 UTC
In the XML we had many context items that were enabled disabled depending on circumstance...wait...maybe that's why XML
performance for large files can be so slow;)

Still, this is a gripe/nit I have.

Since it is by design I will make it an enhancement and downgrade.
Comment 4 Jenselme 2017-06-22 17:49:10 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 5 Jiri Kovalsky 2017-06-22 18:03:27 UTC
Thanks for your evaluation Julien. Closing then.