Get multiline comments format based on lang of document.
Answered
I am writing code that will insert multiline comments in a document as a disclaimer on top. Since, different languages can have diff types of multiline comments, is there any way to achieve this using some library function?
Python for example takes triple inverted commas and c++ takes /**/ but XML files have different way to achieve it. Writing if conditions for every language seems tedious.
Please sign in to leave a comment.
Hi,
This use case sounds similar to generating copyright action. Please see how it is implemented:
https://github.com/JetBrains/intellij-community/blob/master/plugins/copyright/src/com/maddyhome/idea/copyright/actions/GenerateCopyrightAction.java