Skip to content

Commit c86ce81

Browse files
authored
Merge pull request #342 from Achal1607/telemetry
Initial structure of telemetry feature in the extension
2 parents 52b6a53 + 254a59f commit c86ce81

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1754
-14
lines changed

build.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
patches/l10n-licence.diff
7171
patches/no-security-manager-allow.diff
7272
patches/dev-dependency-licenses.diff
73+
patches/nb-telemetry.diff
7374
</string>
7475
<filterchain>
7576
<tokenfilter delimoutput=" ">

patches/nb-telemetry.diff

Lines changed: 421 additions & 0 deletions
Large diffs are not rendered by default.

vscode/.vscode/launch.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,22 @@
2020
"env": {
2121
"nbcode_userdir": "global"
2222
}
23+
},{
24+
"name": "Debug Telemetry",
25+
"type": "extensionHost",
26+
"request": "launch",
27+
"runtimeExecutable": "${execPath}",
28+
"args": [
29+
"--extensionDevelopmentPath=${workspaceFolder}"
30+
],
31+
"outFiles": [
32+
"${workspaceFolder}/out/**/*.js"
33+
],
34+
"preLaunchTask": "${defaultBuildTask}",
35+
"env": {
36+
"nbcode_userdir": "global",
37+
"oracle.oracle-java.enable.debug-logs": "true"
38+
}
2339
},
2440
{
2541
"name": "Extension Tests",

vscode/l10n/bundle.l10n.en.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,6 @@
9393
"jdk.extension.debugger.error_msg.debugAdapterNotInitialized":"Oracle Java SE Debug Server Adapter not yet initialized. Please wait for a while and try again.",
9494
"jdk.workspace.new.prompt": "Input the directory path where the new file will be generated",
9595
"jdk.extension.utils.error_message.failedHttpsRequest": "Failed to get {url} ({statusCode})",
96-
"jdk.extension.error_msg.notEnabled": "{SERVER_NAME} not enabled"
97-
}
96+
"jdk.extension.error_msg.notEnabled": "{SERVER_NAME} not enabled",
97+
"jdk.telemetry.consent": "Do you want to enable telemetry for {extensionName} extension? You may opt-out or in at any time from the Settings for jdk.telemetry.enabled."
98+
}

vscode/l10n/bundle.l10n.ja.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,6 @@
9393
"jdk.extension.debugger.error_msg.debugAdapterNotInitialized":"Oracle Java SEのデバッグ・サーバー・アダプタが、まだ初期化されていません。しばらく待ってから再試行してください。",
9494
"jdk.workspace.new.prompt": "新しいファイルを生成するディレクトリのパスを入力してください",
9595
"jdk.extension.utils.error_message.failedHttpsRequest": "{url}の取得に失敗しました({statusCode})",
96-
"jdk.extension.error_msg.notEnabled": "{SERVER_NAME}が有効化されていません"
97-
}
96+
"jdk.extension.error_msg.notEnabled": "{SERVER_NAME}が有効化されていません",
97+
"jdk.telemetry.consent": "Do you want to enable telemetry for {extensionName} extension? You may opt-out or in at any time from the Settings for jdk.telemetry.enabled."
98+
}

vscode/l10n/bundle.l10n.zh-cn.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,6 @@
9393
"jdk.extension.debugger.error_msg.debugAdapterNotInitialized":"Oracle Java SE 调试服务器适配器尚未初始化。请稍候,然后重试。",
9494
"jdk.workspace.new.prompt": "输入生成新文件的目录路径",
9595
"jdk.extension.utils.error_message.failedHttpsRequest": "无法获取 {url} ({statusCode})",
96-
"jdk.extension.error_msg.notEnabled": "{SERVER_NAME} 未启用"
97-
}
96+
"jdk.extension.error_msg.notEnabled": "{SERVER_NAME} 未启用",
97+
"jdk.telemetry.consent": "Do you want to enable telemetry for {extensionName} extension? You may opt-out or in at any time from the Settings for jdk.telemetry.enabled."
98+
}

vscode/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,11 @@
236236
"type": "boolean",
237237
"default": false,
238238
"description": "%jdk.configuration.disableProjectSearchLimit.description%"
239+
},
240+
"jdk.telemetry.enabled": {
241+
"type": "boolean",
242+
"description": "%jdk.configuration.telemetry.enabled.description%",
243+
"default": false
239244
}
240245
}
241246
},

vscode/package.nls.ja.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"jdk.configuration.runConfig.cwd.description": "作業ディレクトリ",
4747
"jdk.configuration.disableNbJavac.description": "拡張オプション: nb-javacライブラリを無効化すると、選択したJDKからのjavacが使用されます。選択したJDKは少なくともJDK 23である必要があります。",
4848
"jdk.configuration.disableProjectSearchLimit.description": "拡張オプション: プロジェクト情報が含まれているフォルダの検索に対する制限を無効化します。",
49+
"jdk.configuration.telemetry.enabled.description": "Allow the Oracle Java Visual Studio Code extension to collect and send usage data to Oracle servers to help improve the Java platform support. No personal information nor source code is collected. You may refer to our general privacy policy at https://www.oracle.com/legal/privacy/services-privacy-policy/",
4950
"jdk.debugger.configuration.mainClass.description": "プログラムのメイン・クラスへの絶対パス。",
5051
"jdk.debugger.configuration.classPaths.description": "JVMの起動のためのクラスパス。",
5152
"jdk.debugger.configuration.console.description": "プログラムを起動する指定されたコンソール。",
@@ -64,4 +65,4 @@
6465
"jdk.configurationSnippets.name": "Javaアプリケーションの起動",
6566
"jdk.configurationSnippets.label": "Java+: Javaアプリケーションの起動",
6667
"jdk.configurationSnippets.description": "デバッグ・モードでのJavaアプリケーションの起動"
67-
}
68+
}

vscode/package.nls.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"jdk.configuration.runConfig.cwd.description": "Working directory",
4747
"jdk.configuration.disableNbJavac.description": "Advanced option: disable nb-javac library, javac from the selected JDK will be used. The selected JDK must be at least JDK 23.",
4848
"jdk.configuration.disableProjectSearchLimit.description": "Advanced option: disable limits on searching in containing folders for project information.",
49+
"jdk.configuration.telemetry.enabled.description": "Allow the Oracle Java Visual Studio Code extension to collect and send usage data to Oracle servers to help improve the Java platform support. No personal information nor source code is collected. You may refer to our general privacy policy at https://www.oracle.com/legal/privacy/services-privacy-policy/",
4950
"jdk.debugger.configuration.mainClass.description": "Absolute path to the program main class.",
5051
"jdk.debugger.configuration.classPaths.description": "The classpaths for launching the JVM.",
5152
"jdk.debugger.configuration.console.description": "The specified console to launch the program.",

vscode/package.nls.zh-cn.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"jdk.configuration.runConfig.cwd.description": "工作目录",
4747
"jdk.configuration.disableNbJavac.description": "高级选项:禁用 nb-javac 库,将使用来自所选 JDK 的 javac。所选 JDK 必须至少为 JDK 23。",
4848
"jdk.configuration.disableProjectSearchLimit.description": "高级选项:禁用在包含项目信息的文件夹中搜索的限制。",
49+
"jdk.configuration.telemetry.enabled.description": "Allow the Oracle Java Visual Studio Code extension to collect and send usage data to Oracle servers to help improve the Java platform support. No personal information nor source code is collected. You may refer to our general privacy policy at https://www.oracle.com/legal/privacy/services-privacy-policy/",
4950
"jdk.debugger.configuration.mainClass.description": "程序主类的绝对路径。",
5051
"jdk.debugger.configuration.classPaths.description": "用于启动 JVM 的类路径。",
5152
"jdk.debugger.configuration.console.description": "用于启动程序的指定控制台。",
@@ -64,4 +65,4 @@
6465
"jdk.configurationSnippets.name": "启动 Java 应用程序",
6566
"jdk.configurationSnippets.label": "Java+:启动 Java 应用程序",
6667
"jdk.configurationSnippets.description": "以调试模式启动 Java 应用程序"
67-
}
68+
}

0 commit comments

Comments
 (0)