add shortcut to reload all maven projects (#847)
Signed-off-by: Yan Zhang <yanzh@microsoft.com>
This commit is contained in:
Родитель
bf3467003c
Коммит
44ab06e5fa
17
package.json
17
package.json
|
@ -230,6 +230,12 @@
|
|||
"command": "maven.favorites",
|
||||
"title": "%contributes.commands.maven.favorites%",
|
||||
"category": "Maven"
|
||||
},
|
||||
{
|
||||
"command": "maven.java.projectConfiguration.update",
|
||||
"title": "%contributes.commands.maven.java.projectConfiguration.update%",
|
||||
"icon": "$(sync)",
|
||||
"category": "Maven"
|
||||
}
|
||||
],
|
||||
"views": {
|
||||
|
@ -359,6 +365,10 @@
|
|||
{
|
||||
"command": "maven.goal.execute",
|
||||
"when": "isWorkspaceTrusted"
|
||||
},
|
||||
{
|
||||
"command": "maven.java.projectConfiguration.update",
|
||||
"when": "false"
|
||||
}
|
||||
],
|
||||
"explorer/context": [
|
||||
|
@ -374,6 +384,11 @@
|
|||
}
|
||||
],
|
||||
"view/title": [
|
||||
{
|
||||
"command": "maven.java.projectConfiguration.update",
|
||||
"when": "view == mavenProjects && javaLSReady",
|
||||
"group": "navigation@05"
|
||||
},
|
||||
{
|
||||
"command": "maven.view.flat",
|
||||
"when": "view == mavenProjects && config.maven.view != flat",
|
||||
|
@ -392,7 +407,7 @@
|
|||
{
|
||||
"command": "maven.explorer.refresh",
|
||||
"when": "view == mavenProjects",
|
||||
"group": "navigation@2"
|
||||
"group": "overflow@2"
|
||||
}
|
||||
],
|
||||
"view/item/context": [
|
||||
|
|
|
@ -41,5 +41,6 @@
|
|||
"configuration.maven.settingsFile": "Specifies the absolute path of your maven configuration file, the default value is ~/.m2/settings.xml",
|
||||
"configuration.maven.dependency.enableConflictDiagnostics": "Specify whether to show diagnostics for conflict dependencies.",
|
||||
"configuration.maven.projectOpenBehavior": "Default method of opening newly created project.",
|
||||
"configuration.maven.explorer.projectName": "Format of project node name shown in Maven explorer."
|
||||
"configuration.maven.explorer.projectName": "Format of project node name shown in Maven explorer.",
|
||||
"contributes.commands.maven.java.projectConfiguration.update": "Reload All Maven Projects"
|
||||
}
|
||||
|
|
|
@ -41,5 +41,6 @@
|
|||
"configuration.maven.settingsFile": "指定 maven 配置文件的绝对路径, 默认是 ~/.m2/settings.xml",
|
||||
"configuration.maven.dependency.enableConflictDiagnostics": "指定是否在 POM 文件中显示依赖冲突。",
|
||||
"configuration.maven.projectOpenBehavior": "新建项目的默认打开方式。",
|
||||
"configuration.maven.explorer.projectName": "Maven 项目名称的显示格式。"
|
||||
"configuration.maven.explorer.projectName": "Maven 项目名称的显示格式。",
|
||||
"contributes.commands.maven.java.projectConfiguration.update": "重新加载所有 Maven 项目"
|
||||
}
|
||||
|
|
|
@ -41,5 +41,6 @@
|
|||
"configuration.maven.settingsFile": "指定 maven 設定文件的絕對路徑,預設是 ~/.m2/settings.xml",
|
||||
"configuration.maven.dependency.enableConflictDiagnostics": "指定是否在 POM 文件中顯示相依套件衝突。",
|
||||
"configuration.maven.projectOpenBehavior": "新建專案的預設打開方式。",
|
||||
"configuration.maven.explorer.projectName": "Maven 專案名稱節點的格式。"
|
||||
"configuration.maven.explorer.projectName": "Maven 專案名稱節點的格式。",
|
||||
"contributes.commands.maven.java.projectConfiguration.update": "重新載入所有 Maven 專案"
|
||||
}
|
||||
|
|
|
@ -145,6 +145,11 @@ async function doActivate(_operationId: string, context: vscode.ExtensionContext
|
|||
// register artifact searcher if Java language server is activated
|
||||
if (isJavaExtEnabled()) {
|
||||
registerArtifactSearcher(context);
|
||||
|
||||
// Reload All Maven Projects in JDTLS, impl in upstream
|
||||
registerCommand(context, "maven.java.projectConfiguration.update", () => {
|
||||
vscode.commands.executeCommand("java.projectConfiguration.update", mavenExplorerProvider.mavenProjectNodes.map(n => Uri.file(n.pomPath)));
|
||||
})
|
||||
}
|
||||
|
||||
// diagnostic
|
||||
|
|
Загрузка…
Ссылка в новой задаче