eclipse-tm4e / tm4e

TextMate support in Eclipse IDE
https://projects.eclipse.org/projects/technology.tm4e
Eclipse Public License 2.0
93 stars 56 forks source link

TM4E context menu actions should not be allowed in read-only documents #789

Open rubenporras opened 2 months ago

rubenporras commented 2 months ago

Currently, if you open a read-only file and try to perform any of the comment actions (Toggle Line Comment, Add Block Comment, Remove Block Comment), the contents of the file will appear to change.

Note that it is not possible to save the file with these modifications.

Nevertheless, it should not be possible to apply commenting to a read-only document, even just at the UI level, if the document is read only, the menu items should be disabled, as for the delete/copy actions in the screenshot.

image-2024-08-13-15-37-13-332

Probably same problem and same pattern for the fix as in https://github.com/eclipse/lsp4e/issues/1078