# 18. Commenter Sample implementation of Simple language code commenter. **Reference**: [](additional_minor_features.md#comment-code) **Code**: [`SimpleCommenter`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleCommenter.java) **Testing**: [](commenter_test.md) A commenter enables the user to comment-out a line of code at the cursor or selected code automatically. The [`Commenter`](%gh-ic%/platform/core-api/src/com/intellij/lang/Commenter.java) defines support for Code | Comment with Line Comment and Code | Comment with Block Comment actions. ## Define a Commenter The [`SimpleCommenter`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleCommenter.java) for Simple Language defines the line comment prefix as `#`. ```java ``` {src="simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleCommenter.java" include-symbol="SimpleCommenter"} ## Register the Commenter The `SimpleCommenter` implementation is registered in the plugin configuration file using the `com.intellij.lang.commenter` extension point. ```xml ``` ## Run the Project Run the plugin by using the Gradle [`runIde`](creating_plugin_project.md#running-a-plugin-with-the-runide-gradle-task) task. Open the example Simple Language [properties file ](lexer_and_parser_definition.md#run-the-project) in the IDE Development Instance. Place the cursor at the `website` line. Select Code | Comment with Line Comment. The line is converted to a comment. Select Code | Comment with Line Comment again, and the comment is converted back to active code. ![Commenter](commenter.png)