A commenter enables the user to comment-out a line of code at the cursor or selected code automatically. The
Commenter defines support for and actions.
Define a Commenter
SimpleCommenter for Simple Language defines the line comment prefix as
Register the Commenter
SimpleCommenter implementation is registered in the plugin configuration file using the
com.intellij.lang.commenter extension point.
Run the Project
Run the plugin by using the Gradle
Open the example Simple Language properties file in the IDE Development Instance. Place the cursor at the
website line. Select . The line is converted to a comment. Select again, and the comment is converted back to active code.