Skip to content

Commit

Permalink
📝 Update Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmai-dev committed Jul 25, 2023
1 parent 9a9c59d commit de49ff8
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 14 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## [Unreleased]

## [1.2.1] - 2023-07-22
## [1.2.1] - 2023-07-25

### Added

Expand All @@ -13,6 +13,7 @@
### Fixed

- Fix GoFrame ORM unsupported syntax.
- Fix Outdated stub in index Exception.

## [1.2.0] - 2023-07-15

Expand Down
24 changes: 24 additions & 0 deletions README-zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,32 @@

## 使用

### 代码补全
https://www.jetbrains.com/help/go/auto-completing-code.html#code-completion-for-functions

![guide.gif](assets%2Fguide.gif)

### 注解辅助
有些写法此插件可能无法兼容,导致无法补全。你可以使用 @Model 或者 @Table 解决此问题。
![annotation.gif](assets%2Fannotation.gif)

插件会扫描项目中所有Struct,建议设置扫描范围。

![setting.png](assets%2Fsetting.png)

### 实时模版

![live-template.gif](assets%2Flive-template.gif)

### SQL 转 Struct
#### 粘贴方式
![paste.gif](assets%2Fpaste.gif)

#### 菜单操作
选中 SQL -> 点击编辑器右键菜单 -> Go ORM 助手工具箱 -> SQL 转 Struct

![manual-sql-to-struct.png](assets%2Fmanual-sql-to-struct.png)

## 安装

> 兼容范围:
Expand Down
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,34 @@ for writing ORM code. Supports: Gorm、Xorm、Beego、GoFrame, etc.<br/>⭐️ S
- [More Supported](./SUPPORTED.md)

## Usage

### Code Completion
https://www.jetbrains.com/help/go/auto-completing-code.html#code-completion-for-functions

![guide.gif](assets%2Fguide.gif)

### Annotation
If the plugin is not compatible with your syntax, you can use the @Model or @Table helper.

![annotation.gif](assets%2Fannotation.gif)

The plugin will scan the Structs in your project. It is recommended to set the scanning scope.

![setting.png](assets%2Fsetting.png)

### Live Template

![live-template.gif](assets%2Flive-template.gif)

### SQL to Struct
#### Paste
![paste.gif](assets%2Fpaste.gif)

#### Menu Action
Selected SQL -> Editor Popup Menu -> Go ORM Helper Tool -> SQL Convert Struct

![manual-sql-to-struct.png](assets%2Fmanual-sql-to-struct.png)

<!-- Plugin description end -->

## Installation
Expand Down
Binary file added assets/annotation.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/live-template.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/manual-sql-to-struct.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/paste.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/setting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pluginGroup = com.github.maiqingqiang.goormhelper
pluginName = Go ORM Helper
pluginRepositoryUrl = https://github.com/maiqingqiang/go-orm-helper
# SemVer format -> https://semver.org
pluginVersion = 1.2.1-SNAPSHOT-20230722
pluginVersion = 1.2.1-SNAPSHOT-20230725

# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild = 222
Expand Down
13 changes: 2 additions & 11 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,13 @@
<vendor>John Mai</vendor>

<depends>com.intellij.modules.platform</depends>
<!-- <depends>com.intellij.modules.go</depends>-->
<depends>org.jetbrains.plugins.go</depends>

<resource-bundle>messages.GoORMHelperBundle</resource-bundle>

<extensions defaultExtensionNs="com.intellij">

<!-- <liveTemplateContext implementation="com.github.maiqingqiang.goormhelper.codeInsights.template.GoORMTemplateContextType"/>-->
<!-- <liveTemplateContext implementation="com.goide.editor.template.GoLiveTemplateContextType$Tag"/>-->
<defaultLiveTemplates file="liveTemplates/Go ORM Tags.xml"/>


<projectService serviceImplementation="com.github.maiqingqiang.goormhelper.services.GoORMHelperCacheManager"/>
<projectService
serviceImplementation="com.github.maiqingqiang.goormhelper.services.GoORMHelperProjectSettings"/>
Expand All @@ -33,12 +28,8 @@

<projectConfigurable
parentId="tools"
instance="com.github.maiqingqiang.goormhelper.ui.SettingConfigurable"
displayName="Go ORM Helper"/>
</extensions>

<extensions defaultExtensionNs="com.goide">

key="name"
instance="com.github.maiqingqiang.goormhelper.ui.SettingConfigurable"/>
</extensions>

<projectListeners>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name=Go ORM \u52A9\u624B
# actions
group.GoORMHelper.EditorPopupMenu.text=Go ORM Helper \u5DE5\u5177\u7BB1
group.GoORMHelper.EditorPopupMenu.text=Go ORM \u52A9\u624B\u5DE5\u5177\u7BB1
# intializing
initializing.title=\u521D\u59CB\u5316 Go ORM \u52A9\u624B
# convert struct
Expand Down

0 comments on commit de49ff8

Please sign in to comment.