mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-29 01:37:51 +08:00
22 lines
479 B
Markdown
22 lines
479 B
Markdown
---
|
|
title: 17. Commenter
|
|
---
|
|
|
|
A commenter allows user to comment the code at the cursor or selected code automatically via corresponding actions.
|
|
|
|
### 17.1. Define a commenter
|
|
|
|
```java
|
|
{% include /code_samples/simple_language_plugin/src/com/simpleplugin/SimpleCommenter.java %}
|
|
```
|
|
|
|
### 17.2. Register the commenter
|
|
|
|
```xml
|
|
<lang.commenter language="Simple" implementationClass="com.simpleplugin.SimpleCommenter"/>
|
|
```
|
|
|
|
### 17.3. Run the project
|
|
|
|

|