mirror of
https://gitee.com/openharmony/napi_generator
synced 2024-12-03 15:00:54 +00:00
style: modify napi tool filename check restricions and add assist_tools_intellij_plugin README.zh
Signed-off-by: zhaojunxia <zhaojunxia@kaihong.com>
This commit is contained in:
parent
c2b890166f
commit
5fde760c40
63
hdc/assist/assist_tools_IntelliJ_plugin/README_zh.md
Normal file
63
hdc/assist/assist_tools_IntelliJ_plugin/README_zh.md
Normal file
@ -0,0 +1,63 @@
|
||||
# ASSIST工具IntelliJ插件说明
|
||||
|
||||
## 简介
|
||||
|
||||
ASSIST统一入口工具,可以将各北向工具统一起来,用户只需下载统一入口工具,在统一入口工具中按需下载北向工具,实现对工具链的使用。目前工具支持IntelliJ插件一种入口,本文主要介绍IntelliJ插件使用说明。
|
||||
|
||||
## 目录
|
||||
|
||||
|
||||
```
|
||||
├── assist
|
||||
│ ├── ... # 其它文件
|
||||
│ ├── assist_tools_IntelliJ_plugin # IntelliJ插件代码
|
||||
│ │ ├── docs # IntelliJ插件说明
|
||||
│ │ ├── resources # IntelliJ插件说明
|
||||
│ │ ├── src # IntelliJ插件源码
|
||||
│ │ └── README_zh # IntelliJ插件说明
|
||||
```
|
||||
|
||||
## 约束
|
||||
|
||||
系统:建议Windows 10
|
||||
|
||||
依赖版本:JDK 11
|
||||
|
||||
开发工具:DevEco stdio、IDEA Community 2021.3.3
|
||||
|
||||
## 使用方法
|
||||
|
||||
### 工具使用
|
||||
|
||||
插件下载路径如下,选择assist_tool.jar下载。
|
||||
|
||||
[下载链接1]( 暂无)
|
||||
|
||||
[下载链接2](暂无)
|
||||
|
||||
[下载链接3]( 暂无)
|
||||
|
||||
具体的工具使用步骤,可以左键单击以下链接了解:
|
||||
|
||||
[工具使用说明](暂无)
|
||||
|
||||
## 开发说明
|
||||
|
||||
### 对象
|
||||
|
||||
工具的开发者
|
||||
|
||||
### 开发场景
|
||||
|
||||
若当前工具的功能已经不能满足开发者的全部需求,则开发者可以基于已有的源码对工具进行二次开发,来增强工具的能力,编译打包生成自定义的可执行文件和插件。
|
||||
|
||||
### 开发步骤
|
||||
|
||||
开发者可以根据如下的步骤来完成对工具IntelliJ插件的开发:
|
||||
|
||||
[工具开发说明](暂无)
|
||||
|
||||
|
||||
## 相关仓
|
||||
|
||||
暂无
|
@ -193,7 +193,7 @@ public class FileUtil {
|
||||
* @return boolean 是否匹配
|
||||
*/
|
||||
public static boolean patternFileName(String fileName) {
|
||||
String pattern = "(@ohos.([.a-z_A-Z0-9]+).d.ts|([.a-z_A-Z0-9]+).h)";
|
||||
String pattern = "((@ohos\\.)*([.a-z_A-Z0-9]+).d.ts|([.a-z_A-Z0-9]+).h)";
|
||||
return Pattern.matches(pattern, fileName);
|
||||
}
|
||||
|
||||
|
@ -126,7 +126,7 @@ function register(context, command) {
|
||||
}
|
||||
}, undefined, context.subscriptions);
|
||||
let fn = re.getFileInPath(uri.fsPath);
|
||||
let tt = re.match("(@ohos.[a-zA-Z_0-9]+.d.ts)|([a-zA-Z_0-9]+.h)", fn);
|
||||
let tt = re.match("((@ohos\.)*[a-zA-Z_0-9]+.d.ts)|([a-zA-Z_0-9]+.h)", fn);
|
||||
var result = {
|
||||
msg: "selectInterPath",
|
||||
path: tt ? uri.fsPath : ""
|
||||
|
@ -100,7 +100,7 @@ function checkGenerate(fileName) {
|
||||
return;
|
||||
}
|
||||
let fn = re.getFileInPath(fileName);
|
||||
let tt = re.match('@ohos([.a-z_A-Z0-9]+).d.ts', fn);
|
||||
let tt = re.match('(@ohos\.)*([.a-z_A-Z0-9]+).d.ts', fn);
|
||||
if (tt) {
|
||||
let result = checkFileError(fileName);
|
||||
if (result[0]) {
|
||||
|
@ -21,7 +21,7 @@ var fs = require('fs');
|
||||
function doGenerate(ifname, destdir, imports,numberType) {
|
||||
let structOfTs = analyzeFile(ifname);
|
||||
let fn = re.getFileInPath(ifname);
|
||||
let tt = re.match('@ohos.([.a-z_A-Z0-9]+).d.ts', fn);
|
||||
let tt = re.match('(@ohos\.)*([.a-z_A-Z0-9]+).d.ts', fn);
|
||||
if (tt) {
|
||||
let moduleName = re.getReg(fn, tt.regs[1]);
|
||||
let importsStr = '' + imports
|
||||
|
Loading…
Reference in New Issue
Block a user