Skip to content

Commit

Permalink
build - Prepare for 0.24.0 (#847)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdneo authored Jul 24, 2024
1 parent f2dfc46 commit 60dad37
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 17 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ jobs:
- name: Install VSCE
run: npm install -g @vscode/vsce

- name: Lint
run: npm run tslint

- name: Build OSGi bundle
run: npm run build-server

Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes to the "vscode-java-dependency" extension will be documented
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## 0.24.0
* feat - Support adding new package from file explorer by @jdneo in https://github.com/microsoft/vscode-java-dependency/pull/845

## 0.23.7
* fix - Creates file watcher with trailing slash causes problems for other extensions by @testforstephen in https://github.com/microsoft/vscode-java-dependency/pull/829
* fix - Micronaut® Launch extension renamed. by @dbalek in https://github.com/microsoft/vscode-java-dependency/pull/831
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: JDTLS EXT Core
Bundle-SymbolicName: com.microsoft.jdtls.ext.core;singleton:=true
Bundle-Version: 0.23.7
Bundle-Version: 0.24.0
Bundle-Activator: com.microsoft.jdtls.ext.core.JdtlsExtActivator
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Expand Down
2 changes: 1 addition & 1 deletion jdtls.ext/com.microsoft.jdtls.ext.core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.microsoft.jdtls.ext</groupId>
<artifactId>jdtls-ext-parent</artifactId>
<version>0.23.7</version>
<version>0.24.0</version>
</parent>
<artifactId>com.microsoft.jdtls.ext.core</artifactId>
<packaging>eclipse-plugin</packaging>
Expand Down
2 changes: 1 addition & 1 deletion jdtls.ext/com.microsoft.jdtls.ext.target/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.microsoft.jdtls.ext</groupId>
<artifactId>jdtls-ext-parent</artifactId>
<version>0.23.7</version>
<version>0.24.0</version>
</parent>
<artifactId>com.microsoft.jdtls.ext.tp</artifactId>
<name>${base.name} :: Target Platform</name>
Expand Down
2 changes: 1 addition & 1 deletion jdtls.ext/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>com.microsoft.jdtls.ext</groupId>
<artifactId>jdtls-ext-parent</artifactId>
<name>${base.name} :: Parent</name>
<version>0.23.7</version>
<version>0.24.0</version>
<packaging>pom</packaging>
<properties>
<base.name>Java Project Manager</base.name>
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-java-dependency",
"displayName": "Project Manager for Java",
"description": "%description%",
"version": "0.23.7",
"version": "0.24.0",
"publisher": "vscjava",
"preview": false,
"aiKey": "5c642b22-e845-4400-badb-3f8509a70777",
Expand Down Expand Up @@ -46,7 +46,7 @@
"main": "./main.js",
"contributes": {
"javaExtensions": [
"./server/com.microsoft.jdtls.ext.core-0.23.7.jar"
"./server/com.microsoft.jdtls.ext.core-0.24.0.jar"
],
"commands": [
{
Expand Down
19 changes: 10 additions & 9 deletions src/explorerCommands/new.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ async function inferPackageFsPath(): Promise<string> {
return getPackageFsPathFromActiveEditor();
}

let sourcePaths: string[] | undefined = (await getSourceRoots())?.data?.map((sourcePath) => sourcePath.path);
const sourcePaths: string[] | undefined = (await getSourceRoots())?.data?.map((sourcePath) => sourcePath.path);

if (!window.activeTextEditor) {
if (sourcePaths?.length === 1) {
Expand Down Expand Up @@ -412,7 +412,7 @@ async function resolvePackageName(filePath: string): Promise<string> {
return guessPackageName(filePath);
}

let sourcePaths: string[] = (await getSourceRoots())?.data?.map(
const sourcePaths: string[] = (await getSourceRoots())?.data?.map(
(sourcePath) => sourcePath.path).sort((a, b) => b.length - a.length) ?? [];

if (!sourcePaths?.length) {
Expand Down Expand Up @@ -515,8 +515,9 @@ export async function newPackage(node: DataNode | Uri | undefined): Promise<void
"triggernewpackagefrom": isUri ? "fileExplorer" : "javaProjectExplorer",
});

let {defaultValue, packageRootPath} = (isUri ? await getPackageInformationFromUri(node)
const {defaultValue: tempDefaultValue , packageRootPath} = (isUri ? await getPackageInformationFromUri(node)
: await getPackageInformationFromNode(node)) || {};
let defaultValue = tempDefaultValue;
if (defaultValue === undefined || packageRootPath === undefined) {
return;
}
Expand Down Expand Up @@ -560,7 +561,7 @@ async function getPackageInformationFromUri(uri: Uri): Promise<Record<string, st
return defaultValue;
}

let sourcePaths: string[] = (await getSourceRoots())?.data?.map(
const sourcePaths: string[] = (await getSourceRoots())?.data?.map(
(sourcePath) => sourcePath.path).sort((a, b) => b.length - a.length) ?? [];

if (!sourcePaths?.length) {
Expand All @@ -587,17 +588,17 @@ async function getPackageInformationFromNode(node: DataNode): Promise<Record<str
return {
packageRootPath: await getPackageFsPath(node) || "",
defaultValue: "",
}
};
} else if (nodeKind === NodeKind.PackageRoot) {
return {
packageRootPath: Uri.parse(node.uri!).fsPath,
defaultValue: "",
}
};
} else if (nodeKind === NodeKind.Package) {
return {
packageRootPath: getPackageRootPath(Uri.parse(node.uri!).fsPath, node.nodeData.name),
defaultValue: node.nodeData.name + ".",
}
};
} else if (nodeKind === NodeKind.PrimaryType) {
const primaryTypeNode = <PrimaryTypeNode> node;
const packageRootPath = primaryTypeNode.getPackageRootPath();
Expand All @@ -611,9 +612,9 @@ async function getPackageInformationFromNode(node: DataNode): Promise<Record<str
return undefined;
}
return {
packageRootPath: packageRootPath,
packageRootPath,
defaultValue: path.relative(packageRootPath, packagePath).replace(/[/\\]/g, "."),
}
};
}

return undefined;
Expand Down

0 comments on commit 60dad37

Please sign in to comment.