Skip to content

Commit b00dd9d

Browse files
authored
update statistics for new lombok support (#1149)
Signed-off-by: Yan Zhang <[email protected]>
1 parent e879423 commit b00dd9d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/daemon/clientLog/logWatcher.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import * as path from "path";
55
import { sendInfo } from "vscode-extension-telemetry-wrapper";
66
import { LSDaemon } from "../daemon";
77

8+
const lombokJarRegex = /lombok-\d+.*\.jar/;
9+
810
export class ClientLogWatcher {
911
private context: vscode.ExtensionContext;
1012
private javaExtensionRoot: vscode.Uri | undefined;
@@ -36,7 +38,11 @@ export class ClientLogWatcher {
3638
if (startupLog) {
3739
info.xmx = startupLog.message.match(/-Xmx[0-9kmgKMG]+/g)?.[0];
3840
info.xms = startupLog.message.match(/-Xms[0-9kmgKMG]+/g)?.[0];
39-
info.lombok = startupLog.message.includes("lombok.jar") ? "true" : undefined;
41+
if (startupLog.message.includes("lombok.jar")) {
42+
info.lombok = "true"; // using old version of 3rd party lombok extension
43+
} else if (startupLog.message.match(lombokJarRegex)) {
44+
info.lombok = "embedded"; // lombok projects, loading embedded lombok.jar
45+
}
4046
info.workspaceType = startupLog.message.match(/-XX:HeapDumpPath=.*(vscodesws)/) ? "vscodesws": "folder";
4147
}
4248

@@ -103,7 +109,7 @@ export class ClientLogWatcher {
103109
}
104110
}
105111
/**
106-
* filename: client.log.yyyy-mm-dd.r
112+
* filename: client.log.yyyy-mm-dd.r
107113
*/
108114
function compare_file(a: string, b: string) {
109115
const dateA = a.slice(11, 21), dateB = b.slice(11, 21);

0 commit comments

Comments
 (0)