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

   ### Apache NetBeans version
   
   Apache NetBeans 15
   
   ### What happened
   
   When you edit an XML file that uses the *Object/relational mapping file 
schema* (specifically, those that use the namespace 
`http://xmlns.jcp.org/xml/ns/persistence/orm`), the options *Cut*, *Copy* and 
*Paste* get disabled. This occurs in both the toolbar and also in the context 
menu of the editor.
   
   Copying and pasting using the keyboard still works fine. However, sometimes, 
when you're using your mouse than your keyboard, it's more practical to do it 
using the GUI.
   
   
   ### How to reproduce
   
   I've been experiencing this error at least since version 8.2, I believe. I 
hadn't informed about it because it has been hard to reproduce. But today I've 
spent time investigating the cause and I think I've found the way:
   
   1. In a Java project based on Maven, create an XML file. For example, in 
`src/main/resources/META-INF/`.
   
   2. Write this code:
   
   ```xml
   <?xml version="1.0" encoding="UTF-8"?>
   <entity-mappings xmlns="http://xmlns.jcp.org/xml/ns/persistence/orm"/>
   ```
   
   3. Right-click on the editor and view that the options *Cut*, *Copy* and 
*Paste* are enabled in the context menu:
   
   
![image](https://user-images.githubusercontent.com/2098654/199925945-e629659e-118d-4fe0-a4cd-44de698a5b28.png)
   
   4. Close the file (**very important**) and then, close NetBeans IDE. Not 
closing the file was the reason why I could never reproduce this error.
   
   5. Run NetBeans IDE and open the file again. Then, right-click on the editor 
and open the context menu, and view that the mentioned options are disabled now:
   
   
![image](https://user-images.githubusercontent.com/2098654/199926034-63f98d0f-5593-44b9-a30f-7268269589e8.png)
   
   6. The same happens with the toolbar. See:
   
   
![image](https://user-images.githubusercontent.com/2098654/199926627-32c982ff-fbc6-4228-910e-ebd900da4370.png)
   
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   Debian GNU/Linux 11.5 (Bullseye)
   
   ### JDK
   
   OpenJDK Runtime Environment (build 17.0.4+8-Debian-1deb11u1)
   
   ### Apache NetBeans packaging
   
   Apache NetBeans binary zip
   
   ### Anything else
   
   I've tested this in versions 13, 14 and 15. But I believe that this *bug* 
dates back from version 8.2 days.
   
   
   ### Are you willing to submit a pull request?
   
   No
   
   ### Code of Conduct
   
   Yes


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