Skip to content

Commit f2067ee

Browse files
authored
Merge pull request #224 from domaframework/document/update-readme
CleanUp Document
2 parents 5a55a7b + ee5b6d0 commit f2067ee

30 files changed

+96
-95
lines changed

CHANGELOG.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
### Bug Fixes
4141

42-
- Fix to not display Dao parameter information in the document for elements defined with the for directive. ([#167])
42+
- Fix to not display DAO parameter information in the document for elements defined with the for directive. ([#167])
4343
- Do not suggest element names you define in the for directive element ([#166])
4444
- Fix: issue where grouped conditions in block comments were recognized as bind variables ([#159])
4545
- Fixed check for List type test data ([#157])
@@ -178,35 +178,35 @@
178178

179179
## [0.3.0] - 2025-03-07
180180

181-
### Dao Support Features
181+
### DAO Support Features
182182

183183
- **Actions**
184-
- **Jump to SQL:** Added an action (with a gutter icon) that jumps to the SQL file from the Dao method.
184+
- **Jump to SQL:** Added an action (with a gutter icon) that jumps to the SQL file from the DAO method.
185185
- Shortcut key: Alt+D
186186
- **Generate SQL:** Added an action to generate SQL files.
187187
- Shortcut key: Ctrl+Alt+G
188188
- **Code Inspection**
189-
- Displays a quick fix when the corresponding SQL template file for a Dao method requiring one is not found.
189+
- Displays a quick fix when the corresponding SQL template file for a DAO method requiring one is not found.
190190
- Shows an error if there are parameter arguments not used as SQL bind variables.
191191

192192
### SQL Support Features
193193

194194
- **Actions**
195-
- **Jump to Dao:** Added an action to jump from the SQL file to the Dao method.
195+
- **Jump to DAO:** Added an action to jump from the SQL file to the DAO method.
196196
- Shortcut key: Alt+D
197-
- **Jump to Declaration:** Added an action to jump from SQL bind variables to Dao parameters or class definitions.
197+
- **Jump to Declaration:** Added an action to jump from SQL bind variables to DAO parameters or class definitions.
198198
- Shortcut key: Alt+E
199199
- **Code Inspection**
200-
- Displays an error when fields or methods that do not exist in the Dao parameters or class definition are used.
200+
- Displays an error when fields or methods that do not exist in the DAO parameters or class definition are used.
201201
- **Code Completion**
202-
- Provides code completion for Dao method parameters, instance fields, and methods when used as bind variables.
202+
- Provides code completion for DAO method parameters, instance fields, and methods when used as bind variables.
203203
- Provides code completion for static fields and methods during static property calls.
204204
- Offers code completion for directive names.
205205
- Provides code completion for Doma built-in functions.
206206
- **Refactoring**
207-
- Rename SQL file when renaming Dao method
208-
- Rename SQL file directory when renaming Dao
209-
- Change Dao package name or SQL file directory configuration when changing configuration
207+
- Rename SQL file when renaming DAO method
208+
- Rename SQL file directory when renaming DAO
209+
- Change DAO package name or SQL file directory configuration when changing configuration
210210

211211
[Unreleased]: https://github.com/domaframework/doma-tools-for-intellij/compare/v0.8.0...HEAD
212212
[0.8.0]: https://github.com/domaframework/doma-tools-for-intellij/compare/v0.7.0...v0.8.0

README.md

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -6,63 +6,63 @@
66
<!-- Plugin description -->
77
"Doma Tools" is a plugin that supports the development of [Doma](https://github.com/domaframework/doma) based projects in IntelliJ.
88

9-
It checks associations between DAO and SQL, and offers coding support features for Doma syntax,
10-
such as generating SQL template files, navigating between files, and inspections to ensure the validity of bind variables.
9+
It checks associations between DAO and SQL and offers coding support features for Doma syntax,
10+
such as generating SQL template files, navigating between files, and inspecting the validity of bind variables.
1111

1212
<!-- Plugin description end -->
1313

1414
# Features
1515

1616
## Actions
17-
The plugin adds some actions, gutter icons.
18-
Shortcut keys can be used for actions
17+
The plugin adds several actions and gutter icons.
18+
Shortcut keys can be used for these actions.
1919
![FileJump.gif](images/gif/FileJump.gif)
2020

2121
- **Jump to SQL**
22-
- Jump to from DAO to SQL
23-
- You can also jump to the SQL file from the gutter icon that is displayed together.
22+
- Jump from DAO to SQL.
23+
- You can also jump to the SQL file using the gutter icon displayed alongside.
2424
- **Generate SQL**
25-
- Generate SQL file
25+
- Generate an SQL file.
2626
- **Jump to DAO**
27-
- Jump to from SQL to DAO
28-
- You can also jump to the DAO Method from the gutter icon that is displayed together.
27+
- Jump from SQL to DAO.
28+
- You can also jump to the DAO method using the gutter icon displayed alongside.
2929

3030
## Inspection
31-
Check that bind variables are used appropriately for DAO and SQL associations.
31+
Checks that bind variables are used appropriately for DAO and SQL associations.
3232
The plugin also provides quick fixes for DAO methods where the required SQL files do not exist.
3333

34-
- Quick fix for generate SQL template file.
34+
- Quick fix to generate SQL template file.
3535
![quickfix.png](images/quickfix.png)
36-
- Checking for DAO method arguments not used.
36+
- Checks for unused DAO method arguments.
3737
![inspection.png](images/inspection.png)
38-
- Check for undefined bind variable names.
39-
- Check the class name and package name for static property calls.
38+
- Checks for undefined bind variable names.
39+
- Checks the class name and package name for static property calls.
4040
![inspectionPackageName.png](images/inspectionPackageName.png)
41-
- Optional types are recognized as their element type (e.g. a parameter of type `Optional<String>` is treated as type `String`).
41+
- Optional types are recognized as their element type (e.g., a parameter of type `Optional<String>` is treated as type `String`).
4242
- For custom functions, checks for methods that are not defined in the configured ExpressionFunctions implementation class.
4343

4444
## Completion
45-
Code completion is available to assist you in coding within the directives.
45+
Code completion is available to assist you in coding within directives.
4646

47-
- Suggest DAO method arguments in bind variable directives.
47+
- Suggests DAO method arguments in bind variable directives.
4848
![Completion.gif](images/gif/Completion.gif)
49-
- It looks at DAO method argument types and suggests instance fields, methods.
49+
- Analyzes DAO method argument types and suggests instance fields and methods.
5050
- Suggests package and class names for class names used in static property calls.
5151
![CompletionStatic.gif](images/gif/CompletionStatic.gif)
52-
- Suggest members defined as static in static fields and method calls.
53-
- Directives such as Condition, Loop, Population are suggested after `%`.
52+
- Suggests members defined as static in static fields and method calls.
53+
- Directives such as Condition, Loop, and Population are suggested after `%`.
5454
- Suggests built-in and custom functions after `@`.
55-
- Optional types are recognized as their element type (e.g. a parameter of type `Optional<String>` is treated as type `String`).
55+
- Optional types are recognized as their element type (e.g., a parameter of type `Optional<String>` is treated as type `String`).
5656

5757
## Refactoring
58-
Along with the DAO change, we will refactor the SQL file directory and file name.
58+
Along with DAO changes, the plugin will refactor the SQL file directory and file name.
5959

60-
- After refactoring the DAO name, change the SQL directory name as well.
61-
- After refactoring the DAO method name, we will also change the SQL file name.
62-
- After refactoring the DAO package, we will also change the SQL directory.
60+
- After refactoring the DAO name, the SQL directory name will also be updated.
61+
- After refactoring the DAO method name, the SQL file name will also be updated.
62+
- After refactoring the DAO package, the SQL directory will also be updated.
6363
![RenameDao.gif](images/gif/RenameDao.gif)
6464

65-
## Formatter(Preview)
65+
## Formatter (Preview)
6666
Provides code formatting for SQL syntax.
6767
This feature is in preview. You cannot customize the indentation or keywords to be broken down!
6868

@@ -74,34 +74,34 @@ To enable auto-indentation, toggle the corresponding flag in the settings screen
7474

7575
![Format.gif](images/gif/Format.gif)
7676

77-
## Reference resolution
78-
Ctrl+Click on a bind variable in an SQL file to jump to its source symbol:
77+
## Reference Contributor
78+
Ctrl+Click on a bind variable in an SQL file to jump to its source symbol.
7979

8080
This feature works in source JARs as well, but in binary JARs, if the DAO method’s argument parameter names have been changed, the references cannot be resolved and the feature will not function.
8181

82-
- The DAO method’s argument parameter definition
83-
- The field and method definitions on that parameter’s type
84-
- The class definition referenced by @ClassName@
85-
- Custom functions in the configured ExpressionFunctions implementation class
82+
- The DAO method’s argument parameter definition.
83+
- The field and method definitions on that parameter’s type.
84+
- The class definition referenced by @ClassName@.
85+
- Custom functions in the configured ExpressionFunctions implementation class.
8686
- You can also jump using the **Go To > Declaration Usage** menu.
8787

8888
![Reference.gif](images/gif/Reference.gif)
8989

9090
## Settings
9191
Some functions of "Doma Tools" can be customized from the settings screen.
9292

93-
- Enabling/disabling inspections and customizing error levels
94-
- Highlight color settings for SQL elements
93+
- Enable/disable inspections and customize error levels.
94+
- Highlight color settings for SQL elements.
9595
![setting_highlight.png](images/setting_highlight.png)
96-
- Customize action shortcut keys
97-
- Enable/disable automatic indentation when breaking SQL lines
96+
- Customize action shortcut keys.
97+
- Enable/disable automatic indentation when breaking SQL lines.
9898

9999
**If you want to use custom functions defined in your own ExpressionFunctions implementation class,
100-
place a `doma.compile.config` file directly under the resources directory and describe the `doma.expr.functions` entry.**
100+
place a `doma.compile.config` file directly under the resources directory and specify the `doma.expr.functions` entry.**
101101

102102
[Doma Setting Options with Configuration File](https://doma.readthedocs.io/en/stable/annotation-processing/#setting-options-with-configuration-file)
103103

104-
ex) doma.compile.config
104+
Example: doma.compile.config
105105
```properties
106106
doma.expr.functions=example.expression.MyExpressionFunctions
107107
```

images/gif/FileJump.gif

504 KB
Loading

src/main/kotlin/org/domaframework/doma/intellij/action/dao/GenerateSqlAction.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import org.domaframework.doma.intellij.common.psi.PsiDaoMethod
2828
import org.domaframework.doma.intellij.common.util.PluginLoggerUtil
2929

3030
/**
31-
* Action class that generates SQL from Dao method
31+
* Action class that generates SQL from DAO method
3232
*/
3333
class GenerateSqlAction : AnAction() {
3434
private var currentFile: PsiFile? = null

src/main/kotlin/org/domaframework/doma/intellij/action/sql/JumpToDaoFromSQLAction.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import org.domaframework.doma.intellij.common.isSupportFileType
2727
import org.domaframework.doma.intellij.common.util.PluginLoggerUtil
2828

2929
/***
30-
* Action to jump from SQL file to corresponding Dao function
30+
* Action to jump from SQL file to corresponding DAO function
3131
*/
3232
class JumpToDaoFromSQLAction : AnAction() {
3333
private var currentFile: PsiFile? = null

src/main/kotlin/org/domaframework/doma/intellij/common/FileTypeCheck.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ fun getExtension(type: String): String =
3535
}
3636

3737
/**
38-
* Does it match the Dao file type condition?
38+
* Does it match the DAO file type condition?
3939
*/
4040
fun isJavaOrKotlinFileType(daoFile: PsiFile): Boolean {
4141
if (daoFile.virtualFile == null) return false

src/main/kotlin/org/domaframework/doma/intellij/common/dao/DaoMethodUtil.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import org.domaframework.doma.intellij.extension.getModule
4242
import org.jetbrains.kotlin.idea.base.util.module
4343

4444
/**
45-
* Get Dao method corresponding to SQL file
45+
* Get DAO method corresponding to SQL file
4646
*/
4747
fun findDaoMethod(
4848
originalFile: PsiFile,
@@ -120,7 +120,7 @@ private fun getDaoClassName(
120120
): String = methodDaoFilePath.substringBefore(".$extensionName").substringAfter("dao/")
121121

122122
/**
123-
* Get jump destination Dao method file from SQL file
123+
* Get jump destination DAO method file from SQL file
124124
*/
125125
fun findDaoFile(
126126
project: Project,
@@ -136,7 +136,7 @@ fun findDaoFile(
136136
}
137137

138138
/**
139-
* Dao file search for SQL file
139+
* DAO file search for SQL file
140140
*/
141141
private fun searchDaoFile(
142142
module: Module?,
@@ -171,7 +171,7 @@ private fun findDaoClass(
171171
): PsiClass? = module.getJavaClazz(includeTest, daoClassName)
172172

173173
/**
174-
* Generate Dao deployment path from SQL file path
174+
* Generate DAO deployment path from SQL file path
175175
* @param sqlFile SQL File
176176
* @param projectRootPath project content Root Path
177177
* @return
@@ -204,9 +204,9 @@ private fun getDaoPathFromSqlFilePath(
204204
}
205205

206206
/**
207-
* Generate SqlFile path from Dao file path
208-
* @param daoFile Dao File
209-
* @param module The module to which the Dao file belongs
207+
* Generate SqlFile path from DAO file path
208+
* @param daoFile DAO File
209+
* @param module The module to which the DAO file belongs
210210
* @return SqlFile path ex) META-INF/package/dao/DaoClassName/
211211
*/
212212
fun getRelativeSqlFilePathFromDaoFilePath(

src/main/kotlin/org/domaframework/doma/intellij/common/psi/PsiDaoMethod.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import java.io.File
4747
import java.io.IOException
4848

4949
/**
50-
* Class that handles Dao method information
50+
* Class that handles DAO method information
5151
*/
5252
class PsiDaoMethod(
5353
private val psiProject: Project,

src/main/kotlin/org/domaframework/doma/intellij/common/sql/validator/result/ValidationDaoParamResult.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import org.domaframework.doma.intellij.bundle.MessageBundle
2222
import org.domaframework.doma.intellij.common.psi.PsiParentClass
2323

2424
/**
25-
* no Dao parameter matching the name of the field access top was found
25+
* no DAO parameter matching the name of the field access top was found
2626
*/
2727
open class ValidationDaoParamResult(
2828
override val identify: PsiElement,

src/main/kotlin/org/domaframework/doma/intellij/common/util/ForDirectiveUtil.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ class ForDirectiveUtil {
178178
targetForItem: PsiElement? = null,
179179
): PsiParentClass? {
180180
// Get the type of the top for directive definition element
181-
// Defined in Dao parameters or static property calls
181+
// Defined in DAO parameters or static property calls
182182
if (forDirectiveBlocks.isEmpty()) return null
183183
val topDirectiveItem = forDirectiveBlocks.first().item
184184
val file = topDirectiveItem.containingFile ?: return null
@@ -290,7 +290,7 @@ class ForDirectiveUtil {
290290
referenceClazz,
291291
)
292292
} else {
293-
// Defined by Dao parameter
293+
// Defined by DAO parameter
294294
if (daoMethod == null) return null
295295

296296
val topElementText =

0 commit comments

Comments
 (0)