Skip to content

Commit 8c03160

Browse files
committed
Update readme
1 parent 0619293 commit 8c03160

2 files changed

Lines changed: 41 additions & 3 deletions

File tree

README-ZH.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
4. 与小伙伴分享你的模板
1515

1616
### 使用
17-
1. 在设置中配置插件的模板: <b>File > Settings > Tools > Module Template Settings
17+
1. 在设置中配置插件的模板: File > Settings > Tools > Module Template Settings
1818
2. 在 Structure 中配置目录树, 右键编辑树结构.
1919
3. 目录树可以使用占位符, 占位符是这样的 -> <b>${YOUR_PLACEHOLDER_HERE}.
2020
4. File Template 中可以配置指定文件的模板, 文件名中可以使用占位符, 会自动替换成你创建时配置的.
@@ -23,6 +23,22 @@
2323
7. 如果插件更新升级了, 则之前配置保存的模板可能会存在不兼容问题.
2424
8. 你的 star, 是我更新的动力.
2525

26+
### 构建
27+
IDEA 无法正常导入这个项目, 不是 gradle , pom, java 项目, 而是 IDEA Platform Plugin 项目, 需要手动处理一些问题.
28+
29+
#### 导入
30+
必须使用 IDEA Community版本, `File -> New -> Project from Exsiting Sources -> Create project from exsiting sources` 然后一直点 next 直到 Finish.
31+
32+
快捷键 `Ctrl + Alt + Shift + S` 打开 **Project Structure** 窗口, 选择 **Project** tab, 将 **Project SDK** 改为 `IntelliJ IDEA Community Edition IC-xxxx`, 然后应用改变关闭窗口.
33+
34+
最后, 编辑根目录下的 `GenerateModuleFromTemplate.iml`, 把 `module` 节点的 `type` 改为 `PLUGIN_MODULE`, 最小化IDEA然后恢复, IDE 会检测到插件项目.
35+
36+
最最后, `Run -> Edit Configuretions -> Alt + Insert -> Plugin -> Apply`, 项目就导入成功了.
37+
38+
### 输出 Jar 文件
39+
40+
`Run -> Prepare Plugin Module xxx For Deployment`
41+
2642
### 更新日志
2743
- 1.4.0: feature: Support export and import template to file, adjust action button position.
2844
- 1.3.1: fix: AucFrame module template bugs.

README.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ Using this plugin, help you create directories and files from customizable templ
1212
### Feature
1313
1. custom directory structure.
1414
2. support placeholders, and replace it when you create module.
15-
3. create file from template.
15+
3. create file from IDE custom/build-in template.
1616
4. support file template variables.
17-
5. share your template with partner.
17+
5. output/import template file. share your template with partner.
1818

1919
### Usage
2020
1. Configure template in plugin settings: <b>File > Settings > Tools > Module Template Settings</b>
@@ -23,6 +23,28 @@ Using this plugin, help you create directories and files from customizable templ
2323
4. The 'File Template' tab lists which template the specified file uses, you can also use placeholders for FileName field.
2424
5. The 'Placeholder' tab's table defines placeholders for replacing filenames and file templates
2525

26+
### Build
27+
28+
#### Dependencies
29+
30+
- IntelliJ IDEA (Community Edition) 19.1+
31+
32+
#### Import Project
33+
34+
This project is not a gradle or pom project, but a **IntelliJ Platform Plugin** project, IDEA cannot import this project normally.
35+
36+
In **IDEA Community** (necessary) `File -> New -> Project from Exsiting Sources -> Create project from exsiting sources`, then click next until finish import.
37+
38+
Pressing the `Ctrl + Alt + Shift + S` to open **Project Structure** dialog, choose **Project** tab, change **Project SDK** to `IntelliJ IDEA Community Edition IC-xxxx`, then apply change.
39+
40+
Then, edit `GenerateModuleFromTemplate.iml` in the project root directory, change the `type` attribute of `module` node to `PLUGIN_MODULE`, minimize the IDEA and restore it, the plugin project will be detected.
41+
42+
Finally, `Run -> Edit Configuretions -> Alt + Insert -> Plugin -> Apply`, the project configuration completed.
43+
44+
#### Generate Plugin Jar
45+
46+
`Run -> Prepare Plugin Module xxx For Deployment`
47+
2648
### Changelog
2749
- 1.4.0: feature: Support export and import template to file, adjust action button position.
2850
- 1.3.1: fix: AucFrame module template bugs.

0 commit comments

Comments
 (0)