stollr opened a new issue, #6947:
URL: https://github.com/apache/netbeans/issues/6947

   ### Description
   
   Almost every time I am using Netbeans I am missing the automatic import of 
types when I select them from code completion.
   
   To make it clear I would like to provide some screenshots. The first one 
shows how Netbeans suggests a class:
   
   
![grafik](https://github.com/apache/netbeans/assets/1118790/43ed1228-5af6-4f2d-96c9-dc5b616e7c50)
   
   
   This works great. Now I select the suggested type by hitting enter:
   
   
![grafik](https://github.com/apache/netbeans/assets/1118790/0a0b592e-fc44-4a6e-9ec3-55b642e199a1)
   
   As you see in the screenshot the full qualified class name is inserted.
   
   But usually I want the class to be added as import and only the class name 
to be inserted at the caret's position.
   So the result should look like this:
   
   
![grafik](https://github.com/apache/netbeans/assets/1118790/2ceaab68-05bc-42d5-912a-0d811532bf6e)
   
   ## To be considered
   
   Before Netbeans inserts the import, it has to check if the type already is 
imported or if there is already another type imported with the same name but 
different namespace. In the latter case it might insert the full qualified 
class name (like today).
   
   ### Use case/motivation
   
   The current situation requires some manual work for each code completion, 
when working with namespace.
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No


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