sdedic edited a comment on pull request #3043:
URL: https://github.com/apache/netbeans/pull/3043#issuecomment-887274773


   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.


-- 
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

Reply via email to