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.
After marking some text in java file, Cut + Copy Buttons should be enabled.
And they are, at least in my 6.8dev build. Ulfzibis, please with all due respect I think you have been with Netbeans for quite some time now and so you surely are not going to be surprised that I am closing this as INCOMPLETE for an obvious lack of steps how to reproduce the problem. I really am sorry.
Created attachment 91364 [details] Toolbar settings Sorry, I do not have something special for reproduce: - Start NetBeans - open a file in editor - mark some text --> Cut + Copy Buttons stay disabled Maybe my toolbar settings would help
Created attachment 91366 [details] Screenshot In contrast, context menu items are enabled
I can confirm that this happens for me as well. Just enabled the clipboard toolbar and the buttons are disabled even when I select some text. I disabled the clipboard toolbar and re-enabled it and then the cut and copy buttons were stuck in the enabled state. If I had nothing selected Cut would cut the entire line where the cursor was. This was in build 200911180645.
I see. The buttons really seem to be broken and not even in the editor. Although the problem is most visible in the editor. Here are the steps that seem to reproduce it on my laptop: 1. fresh userdir, start the ide 2. open a java project, but no files 3. turn on the clipboard toolbar 4. open a file in the editor -> both copy and cut buttons are disabled (and can't be enabled no matter if you select text or not) 5. turn off the toolbar and turn it on again -> the buttons are now enabled 6. but as soon as you close and reopen the edited file they will be disabled again Strange thing is that the same actions in the main menu work fine and the keyboard shortcuts work as well. So it seems to be just the toolbar buttons. Milo, could this be somehow related to the actions registration (ie. annotations, the auto-generated layer stuff, etc)? Ulf, did you intentionally assigned this to yourself? If so, thanks a lot for your help.
I can reproduce it as well
I guess this should be assigned to someone else than the reporter ... Ulf, did you assign it to yourself by mistake? Should it be assigned to Vita or Mila? If Jirka can reproduce - is it visible for all users? If so I guess this might be even a stopper (P1) ...
(In reply to comment #7) > If Jirka can reproduce - is it visible for all users? If so I guess this might > be even a stopper (P1) ... Well, the actions work (eg. ctrl+c, ctrl+x and the main menu actions) and the Clipboard toolbar is turned off by default. So, I'd say it's a stupid and annoying bug, but since most users use the shortcuts (eg. in the editor) or popup menu (eg. on nodes) they probably won't even notice. But I guess the final call should be made by QA.
I was debugging the problem and we properly set enabled state of editor's copy action Action a = kit.getActionByName(BaseKit.copyAction); if (a != null) { // In order to allow the action to operate even if there is no selection // (to copy a single line) the action is always enabled. a.setEnabled(true); } and also the system action updater should properly bridge editor's copy action to openide's one. I'll continue until it gets revealed.
> Ulf, did you intentionally assigned this to yourself? If so, thanks a lot for your help. This happened automatically, don't know why. Had this several times, filing a bug, maybe happens on reopen.
Since this does not work also e.g. in explorer for cut/copy of files I'm raising priority to P1. After some significant debugging, Yarda has found the problem (diff of the fix attached). Reassigning to Yarda.
Created attachment 91548 [details] Diff of the fix
Fixed in trunk, please review: http://hg.netbeans.org/core-main/rev/9d814160420d
Thanks for the fix. I approve it.
Integrated into 'main-golden', will be available in build *200911241400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/9d814160420d User: Jaroslav Tulach <jtulach@netbeans.org> Log: #177041: No enabled state change was delivered when changing action delegate
Product Version: NetBeans IDE 6.8 RC1 (Build 200911252200) Java: 1.6.0_16; Java HotSpot(TM) Client VM 14.2-b01 System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb) Verified