asbachb commented on pull request #3043: URL: https://github.com/apache/netbeans/pull/3043#issuecomment-890586098
> I think that having 'copy qualified name' on file node may not be the best idea. After all, project explorer view is file-oriented, not class-oriented. As someone noted, (simple) name, qualified name or file paths are valid text/plain `Transferables` for a file node. FWIW, the basic Copy should copy a filename or project-relative path to the file into `text/plain` targets, but that's out of scope here. > > Also note that there may be _multiple_ qualified name(s) as the file can contain nested classes, for example. Or even worse, multiple toplevel classes, which is not widely used, but valid. In this case, copy FQN on file node is not sufficient, or may be misleading (copies the 1st or public toplevel class FQN only). > > The mentioned (obsolete) plugin integrates with the Navigator (which allows to copy FQNs of individual classes based on navigator node selection) and Java Editor (which allows the same by inspecting caret position -> ElementHandle at that position). With a shortcut attached to the navigator / editor action, this could be better approach: Goto Type -> open file (caret positions) -> shortcut-copy-fqn (fqn of found class copied) -> CTRL-F4 (previous editor selects) -> paste. I slightly agree that the position in projects view might not be optimal. On the other hand I wonder if the other menu entries apply to a file only context. e.g. `Find usages` looks for class usage not for the file usage. I fully agree that - in case a menu entry is available in editor view - it should be caret position aware as I also see the end user expectation to be that way. So I removed that entry for now. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
