1# SERVICE框架生成工具IntelliJ插件说明(暂不支持) 2 3## 简介 4 5SERVICE框架生成工具,根据用户提供的.h头文件,工具会自动生成整个Service框架的代码。目前工具支持可执行文件、VS Code插件、IntelliJ插件三种入口,本文主要介绍IntelliJ插件使用说明。 6 7## 目录 8 9 ├── napi_generator/src/intellij_plugin/h2sa # SERVICE框架生成工具 10 │ ├── service_IntelliJ_plugin # IntelliJ插件代码 11 │ │ ├── docs # IntelliJ插件说明 12 │ │ ├── resources # IntelliJ插件所需资源文件 13 │ │ ├── src # IntelliJ插件源码 14 │ │ └── README_zh # IntelliJ插件说明 15 16## 约束 17 18系统:不限 19 20依赖版本:JDK 11 21 22开发工具:DevEco stdio、IDEA Community 2021.3.3 23 24## 使用方法 25 26### 使用对象 27 28系统开发者 29 30### 使用场景 31 321)移植CMakeLists.txt编译方式的三方库到OpenHarmony源码中。 33 34### 工具使用 35 36插件下载路径如下: 37 38[下载链接](暂无) 39 40具体的工具使用步骤,可以左键单击以下链接了解: 41 42[工具使用说明](https://gitee.com/openharmony/napi_generator/tree/master/src/intellij_plugin/h2sa/service_IntelliJ_plugin/docs/usage/INSTRUCTION_ZH.md) 43 44### 工具输出 45 46根据使用者指定的.h头文件,工具会输出SERVICE框架代码。为了方便使用者快速上手工具,可供测试的.h文件内容如下所示: 47 48``` 49#ifndef TEST_H 50#define TEST_H 51 52namespace OHOS { 53 namespace Example { 54 /** 55 * @brief service服务,提供IPC调用接口 56 * @ServiceClass 57 */ 58 class test { 59 public: 60 int testFunc(int v1, int v2, bool v3); 61 }; 62 } // namespace Example 63} // namespace OHOS 64#endif // TEST_H 65``` 66 67在window环境下的,根据输入.h文件生成的输出文件,如下所示: 68 69 70 71## 开发说明 72 73### 对象 74 75工具的开发者 76 77### 开发场景 78 79若当前工具的功能已经不能满足开发者的全部需求,则开发者可以基于已有的源码对工具进行二次开发,来增强工具的能力,编译打包生成自定义的可执行文件和插件。 80 81### 开发步骤 82 83开发者可以根据如下的步骤来完成对工具IntelliJ插件的开发: 84 85[工具开发说明](https://gitee.com/openharmony/napi_generator/tree/master/src/intellij_plugin/h2sa/service_IntelliJ_plugin/docs/guide/DEVELOP_ZH.md) 86 87## FAQ 88 89对于常见问题解决方法指导如下: 90 91[FAQ](https://gitee.com/openharmony/napi_generator/tree/master/src/cli/h2sa/docs/guide/FAQ.md) 92 93## 相关仓 94 95暂无