Skip to content

Commit 8899f3a

Browse files
authored
Add license header. (microsoft#11)
1 parent 6b9f7fb commit 8899f3a

24 files changed

Lines changed: 72 additions & 10 deletions

‎jdtls.ext/com.microsoft.jdtls.ext.core/plugin.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<plugin>
44
<extension point="org.eclipse.jdt.ls.core.delegateCommandHandler">
55
<delegateCommandHandler class="com.microsoft.jdtls.ext.core.CommandHandler">
6-
<command id="java.getProjects"/>
6+
<command id="java.project.list"/>
77
<command id="java.getPackageData"/>
88
</delegateCommandHandler>
99
</extension>

‎jdtls.ext/com.microsoft.jdtls.ext.core/src/com/microsoft/jdtls/ext/core/CommandHandler.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class CommandHandler implements IDelegateCommandHandler {
2323
public Object executeCommand(String commandId, List<Object> arguments, IProgressMonitor monitor) throws Exception {
2424
if (!StringUtils.isBlank(commandId)) {
2525
switch (commandId) {
26-
case "java.getProjects":
26+
case "java.project.list":
2727
return ProjectCommand.execute(arguments, monitor);
2828
case "java.getPackageData":
2929
return PackageCommand.getChildren(arguments, monitor);

‎vscode/package-lock.json‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎vscode/src/commands.ts‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT license.
3+
14
/**
25
* Commonly used commands
36
*/
@@ -13,9 +16,9 @@ export namespace Commands {
1316

1417
export const VIEW_PACKAGE_OUTLINE = "java.view.package.outline";
1518

16-
export const CREATE_JAVA_PROJECT = "java.project.create";
19+
export const JAVA_PROJECT_CREATE = "java.project.create";
1720

18-
export const JAVA_GETPROJECTS = "java.getProjects";
21+
export const JAVA_PROJECT_LIST = "java.project.list";
1922

2023
export const JAVA_GETPACKAGEDATA = "java.getPackageData";
2124
}

‎vscode/src/controllers/projectController.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT license.
3+
14
import * as fse from "fs-extra";
25
import * as path from "path";
36
import { commands, ExtensionContext, Uri, window, workspace } from "vscode";
@@ -39,7 +42,7 @@ export class ProjectController {
3942
return;
4043
}
4144
if (await this.scaffoldJavaProject(basePath, projectName, javaVersion)) {
42-
commands.executeCommand("vscode.openFolder", Uri.file(path.join(basePath, projectName)), true);
45+
return commands.executeCommand("vscode.openFolder", Uri.file(path.join(basePath, projectName)), true);
4346
}
4447
}
4548

‎vscode/src/extension.ts‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT license.
13

2-
import { commands, ExtensionContext, Uri, window, workspace } from "vscode";
4+
import { commands, ExtensionContext, window } from "vscode";
5+
import { Commands } from "./commands";
36
import { ProjectController } from "./controllers/projectController";
47
import { Services } from "./services";
58
import { ProjectExplorer } from "./views/projectExplorer";
69

710
export function activate(context: ExtensionContext) {
811
Services.initialize(context);
9-
const projectController: ProjectController = new ProjectController(context);
12+
1013
context.subscriptions.push(window.registerTreeDataProvider("javaProjectExplorer", new ProjectExplorer(context)));
11-
context.subscriptions.push(commands.registerCommand("java.project.create", () => { projectController.createJavaProject(); }));
14+
15+
const projectController: ProjectController = new ProjectController(context);
16+
context.subscriptions.push(commands.registerCommand(Commands.JAVA_PROJECT_CREATE, async () => { projectController.createJavaProject(); }));
1217
}

‎vscode/src/java/containerNodeData.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT license.
3+
14
import { INodeData } from "./nodeData";
25

36
export enum ContainerEntryKind {

‎vscode/src/java/jdtls.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT license.
3+
14
import { commands } from "vscode";
25
import { Commands } from "../commands";
36
import { INodeData } from "./nodeData";
47

58
export namespace Jdtls {
69
export function getProjects(params): Thenable<INodeData[]> {
7-
return commands.executeCommand(Commands.EXECUTE_WORKSPACE_COMMAND, Commands.JAVA_GETPROJECTS, params);
10+
return commands.executeCommand(Commands.EXECUTE_WORKSPACE_COMMAND, Commands.JAVA_PROJECT_LIST, params);
811
}
912

1013
export function getPackageData(params): Thenable<INodeData[]> {

‎vscode/src/java/nodeData.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT license.
13

24
export enum NodeKind {
35
Workspace = 1,

‎vscode/src/java/packageRootNodeData.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT license.
3+
14
import { INodeData } from "./nodeData";
25

36
export enum PackageRootKind {

0 commit comments

Comments
 (0)