From 116145b99c1fad0a76a4386be73a6feb14bf9849 Mon Sep 17 00:00:00 2001 From: gou-jingjing Date: Wed, 23 Oct 2024 17:52:31 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9vscode=E6=8F=92=E4=BB=B6r?= =?UTF-8?q?eadme=E5=AD=97=E4=BD=93=E5=8A=A0=E7=B2=97=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: gou-jingjing --- src/vscode_plugin/readme.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vscode_plugin/readme.md b/src/vscode_plugin/readme.md index f31607c4..d7ca8f37 100644 --- a/src/vscode_plugin/readme.md +++ b/src/vscode_plugin/readme.md @@ -1,6 +1,6 @@ # 模板生成和语言转换工具 -napi-gen插件为OpenHarmony开发者提供模板生成(**sa**模板、**hdf**模板)和语言转换功能(依据**h**头文件转换生成**dts**接口文件 和 **native C++**工程文件)。 +napi-gen插件为OpenHarmony开发者提供模板生成(**sa**模板、**hdf**模板)和语言转换功能(依据**h**头文件转换生成**dts**接口文件 和 **native C++** 工程文件)。 ## 功能: @@ -24,19 +24,19 @@ napi-gen插件为OpenHarmony开发者提供模板生成(**sa**模板、**hdf** 验证过的平台如下: - | DecEco Studio | 4.1 Release(Build Version: 4.1.0.400, built on April 9, 2024) | - | ------------- | ------------------------------------------------------------ | | 平台 | 版本 | + | ------------- | ------------------------------------------------------------ | + | DecEco Studio | 4.1 Release(Build Version: 4.1.0.400, built on April 9, 2024) | ## 使用: -- **方式1**: 右键.h文件在弹出菜单里选择子菜单**[OHOS_Gen]**内的功能: +- **方式1**: 右键.h文件在弹出菜单里选择子菜单 **[OHOS_Gen]** 内的功能: ![](https://gitee.com/openharmony/napi_generator/raw/master/src/vscode_plugin/images/h2sa4-1.png) -- **方式2**: 通过在工具栏选择**[帮助]**->**[显示所有命令]** 或者 快捷命令**[ctrl + shift + p]**在弹出窗口里输入h2dts等命令使用功能 +- **方式2**: 通过在工具栏选择 **[帮助]** -> **[显示所有命令]** 或者 快捷命令 **[ctrl + shift + p]** 在弹出窗口里输入h2dts等命令使用功能 ![](https://gitee.com/openharmony/napi_generator/raw/master/src/vscode_plugin/images/ctrl_shift_p.png) -- Gitee From 19836bf7ae55311d3ba3b6109271df08e44b64c6 Mon Sep 17 00:00:00 2001 From: gou-jingjing Date: Wed, 23 Oct 2024 17:58:31 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=88=A0=E9=99=A4sa=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E6=97=A0=E7=94=A8=E6=96=87=E4=BB=B6=EF=BC=9A?= =?UTF-8?q?i=5Fservicecpp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: gou-jingjing --- .../template/sa/sa_i_servicecpp_template.ts | 22 ------------------- src/vscode_plugin/src/template/sa/sadir.ts | 3 +-- 2 files changed, 1 insertion(+), 24 deletions(-) delete mode 100644 src/vscode_plugin/src/template/sa/sa_i_servicecpp_template.ts diff --git a/src/vscode_plugin/src/template/sa/sa_i_servicecpp_template.ts b/src/vscode_plugin/src/template/sa/sa_i_servicecpp_template.ts deleted file mode 100644 index f8436084..00000000 --- a/src/vscode_plugin/src/template/sa/sa_i_servicecpp_template.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* -* Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -import { FileTemp } from "../../datatype"; - -export let iServiceCppTemplate: FileTemp = { - name: 'i_[serviceName]_service.cpp', - content: `#include "i_[lowServiceName]_service.h" - ` -}; \ No newline at end of file diff --git a/src/vscode_plugin/src/template/sa/sadir.ts b/src/vscode_plugin/src/template/sa/sadir.ts index 41529103..ec468109 100644 --- a/src/vscode_plugin/src/template/sa/sadir.ts +++ b/src/vscode_plugin/src/template/sa/sadir.ts @@ -32,7 +32,6 @@ import { profileJsonTemplate } from './sa_profilejson_template'; import { serviceCfgTemplate } from './sa_cfg_template'; import { serviceCfgTemplate41 } from './sa_cfg_template41'; import { serviceCfgGnTemplate } from './sa_cfggn_template'; -import { iServiceCppTemplate } from './sa_i_servicecpp_template'; import { saReadmeTemplate } from './sa_readme_template'; import { saReadmeTemplate41 } from './sa_readme_template41'; import { DirTemp } from '../../datatype'; @@ -75,7 +74,7 @@ export let sa_profile3_2_dir: DirTemp = { export let src_dir: DirTemp = { name: 'src', - files: [ proxyCppTemplate, stubCppTemplate, serviceCppTemplate, clientCppTemplate,iServiceCppTemplate], + files: [ proxyCppTemplate, stubCppTemplate, serviceCppTemplate, clientCppTemplate], dirs: [] } -- Gitee