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.
Product Version: NetBeans IDE Dev (Build 200906300200) Java: 1.6.0_14; Java HotSpot(TM) Client VM 14.0-b16 System: Linux version 2.6.28-13-generic running on i386; UTF-8; en_US (nb) If I expand a properties node and select a subnode, then invoke copy, nothing is copied. By that I mean that the Paste action is greyed out on the properties node. Even copy+paste between two different .properties files does not work. Invoking paste in a text file also produces nothing.
It is valid issue. Additional investigation is needed to understand why the implementation doesn't work. Note, the Architecture Description file "No answer" here: http://hg.netbeans.org/main/file/08f0948ec986/properties/arch.xml#l473
This issue was added to the list of NetFIX [1] candidates. If module owner does not agree, please speak up. Thanks! [1] http://wiki.netbeans.org/NetFIXIssues
Created attachment 96867 [details] Changed paste implementation of PropertiesDataNode I think the problem is that the properties files are represented by PropertiesDataNodes in the project tree. But this class creates PasteTypes only if the clipboard contains a PropertiesLocalNode. However the subnodes of a properties file are KeyNodes. So when they are copied and the properties file is right clicked, no PasteType instances are created, so the paste action is greyed out. The strange thing is, that the class PropertiesLocalNode already contains a KeyNode based paste implementation, but PropertiesLocalNodes are not on the project tree (at least I never saw them). They are instantiated only when a properties file is displayed in the editor. Even if I customize the properties file by adding a new locale, there will be 2 single files, both represented by PropertiesDataNodes (no PropertiesLocalNodes in between). So in the patch I copied most of the paste implementation from ProperiesLocalNode to replace the paste related stuff in PropertiesDataNode. So works now. But since I only have limited knowledge of the module I'm not sure that this is the best thing to do here. Could you please have a look? Any comments and suggestions are welcome.
Victor, can you please review Gabor's patch and integrate it if you don't have any objections? Thanks!
The proposed patch is OK from viewpoint of copy/paste of key nodes, and I've committed it with minor refactoring http://hg.netbeans.org/main/rev/3e943de0f2c6 Nevertheless, I've rollback these changes, because it destroys copy/paste for nodes of the properties files http://hg.netbeans.org/main/rev/34cd3b509aca So we need have copy/paste processing for both key nodes and nodes of the properties files.
Thanks Victor for the review & polishing & integration and especially thank you Gabor for your patch!
Fixed again in the main trunk: http://hg.netbeans.org/main/rev/14ab22d60b21 I didn't notice very small bug yesterday. Now, it is fixed, and seems all functionality is working well. Gabor, Thanks a million for the patch. It has made the NetBeans a bit better. Good work.