Skip to content

Commit 83ce062

Browse files
committed
fix:comments
1 parent b342364 commit 83ce062

3 files changed

Lines changed: 18 additions & 4 deletions

File tree

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@
169169
},
170170
{
171171
"command": "java.project.build.project",
172-
"title": "%contributes.commands.java.project.build.project%"
172+
"title": "%contributes.commands.java.project.build.project%",
173+
"category": "Java"
173174
},
174175
{
175176
"command": "java.project.clean.workspace",
@@ -187,7 +188,8 @@
187188
},
188189
{
189190
"command": "java.project.rebuild",
190-
"title": "%contributes.commands.java.project.rebuild%"
191+
"title": "%contributes.commands.java.project.rebuild%",
192+
"category": "Java"
191193
},
192194
{
193195
"command": "java.view.package.revealInProjectExplorer",

src/views/dependencyDataProvider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,15 @@ export class DependencyDataProvider implements TreeDataProvider<ExplorerNode> {
8383
window.showErrorMessage("The URI of the project is not available, you can try to trigger the command 'Java: Build Project' from Command Palette.");
8484
return;
8585
}
86-
commands.executeCommand(Commands.BUILD_PROJECT, Uri.parse(node.uri), false /*isFullBuild*/);
86+
return commands.executeCommand(Commands.BUILD_PROJECT, Uri.parse(node.uri), false /*isFullBuild*/);
8787
}));
8888
context.subscriptions.push(instrumentOperationAsVsCodeCommand(Commands.JAVA_PROJECT_REBUILD, async (node: INodeData) => {
8989
if (!node.uri) {
9090
sendError(new Error("Uri not available when rebuilding project"));
9191
window.showErrorMessage("The URI of the project is not available, you can try to trigger the command 'Java: Rebuild Project' from Command Palette.");
9292
return;
9393
}
94-
commands.executeCommand(Commands.BUILD_PROJECT, Uri.parse(node.uri), true /*isFullBuild*/);
94+
return commands.executeCommand(Commands.BUILD_PROJECT, Uri.parse(node.uri), true /*isFullBuild*/);
9595
}));
9696

9797
this.setRefreshDebounceFunc();

test/suite/buildTask.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,18 @@ suite("Build Task Tests", () => {
2525
assert.strictEqual(exportJarTask.definition.isFullBuild, false);
2626
});
2727

28+
test("test resolving build task defaults to incremental build", async function() {
29+
const task: Task = new Task({
30+
type: BuildTaskProvider.type,
31+
paths: [ BuildTaskProvider.workspace ],
32+
}, TaskScope.Workspace, BuildTaskProvider.defaultTaskName, BuildTaskProvider.type);
33+
34+
const resolvedTask: Task | undefined = await new BuildTaskProvider().resolveTask(task);
35+
36+
assert.ok(resolvedTask !== undefined);
37+
assert.strictEqual(resolvedTask.definition.isFullBuild, false);
38+
});
39+
2840
test("test categorizePaths()", async function() {
2941
const [includes, excludes, invalid] = categorizePaths([
3042
BuildTaskProvider.workspace,

0 commit comments

Comments
 (0)