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.
Start NetBeans with a clean userdir. Select a file such as README. Press CTRL-C. Select its parent folder. Press CTRL-V. Nothing happens. Open the main Edit menu. Paste is disabled. Now right click the parent folder. Paste action is enabled. Open the main Edit menu. Paste action is now enabled there too. This is not a recent problem - I reproduced it on a build from late December.
OK, but why is this reported as winsys problem? I believe winsys doesn't play any role in this, it's something between AWT-Actions-Explorer.
True, I was trying to evaluate the fix for 38441 when it came up, and I misfiled it. Anyway, I'm working on it now.
Check issue 39678 for possible similarity.
Well, I put logging in various places...so far, it looks like there is simply nothing bound to CTRL-C, etc. There is some code in TreeView.ExplorerTree to *remove* shortcuts the L&F binds. I'm having difficulty figuring out where the keystroke should actually be bound - the ways to get a keystroke handled are pretty byzantine. So I'm not sure if Explorer *should* be putting bindings for these keystrokes into its InputMap (seems reasonable), or somebody else should be doing it, or some global handler should do it. We have: - Deprecated ExplorerActions, which is what Explorer actually uses - Non-deprecated, non-public ExplorerActionsImpl, which looks like a slightly modified copy of ExplorerActions - who uses this? Anyway, doesn't matter, they don't deal with keybindings. Then there's NbKeymap... Or the bindings could go into NbMainExplorer in core... I will probably put correct bindings into the input map of TreeView.ExplorerTree, as that seems like the normal and natural thing to do, so I can test issue 38441, and put the patch here.
Okay, now this is really weird. I've got logging in CopyAction, PasteAction & CallableSystemAction. ant build-nozip tryme Navigate the Explorer tree with the keyboard, press ctrl-c Copy/cut/paste in explorer works from the keyboard, I see logging when I press ctrl-c Navigate to a folder node, press ctrl-v - file is pasted, works as expected cd netbeans\bin runide.exe -userdir \tmp\someDirThatDoesntExistYet Copy/cut/paste DO NOT work from the keyboard, no logging that they are invoked when I press ctrl-c, etc. runide.exe -userdir ..\..\testuserdir Same thing, actions don't work. BTW, this is running with one small code change - the actions we remove from the tree's action map in TreeView.ExplorerTree are changed to use the default menu accelerator key from Toolkit instead of KeyStroke.getKeyStroke ("control C") etc. Shouldn't make any difference. Passing this issue to Jirka/Explorer - he knows more about what this code is doing and what might be going wrong.
The CopyAction, CutAction and PasteAction delegates to TopComponent ActionMap which in turn delegates to ActionMap of the selected component inside itself.
Tim, sorry I'm a little puzzled what's wrong what is have to fix. Copy/Paste via main Edit menu basically works for me. Could you restate a problem and decribe any test case? In the meantime I close as WORKSFORME, reopen or file new issue if a problem persists.
closed