File tree Expand file tree Collapse file tree 4 files changed +33
-5
lines changed Expand file tree Collapse file tree 4 files changed +33
-5
lines changed Original file line number Diff line number Diff line change 550
550
"group" : " inline"
551
551
},
552
552
{
553
- "command" : " java.project.update" ,
554
- "when" : " view == javaProjectExplorer && viewItem =~ /java:project(?=.*?\\ b\\ +uri\\ b)(?=.*?\\ b\\ +(maven|gradle)\\ b)/" ,
553
+ "submenu" : " javaProject.maven" ,
554
+ "when" : " view == javaProjectExplorer && viewItem =~ /java:project(?=.*?\\ b\\ +uri\\ b)(?=.*?\\ b\\ +(maven)\\ b)/" ,
555
+ "group" : " 9_configuration@10"
556
+ },
557
+ {
558
+ "submenu" : " javaProject.gradle" ,
559
+ "when" : " view == javaProjectExplorer && viewItem =~ /java:project(?=.*?\\ b\\ +uri\\ b)(?=.*?\\ b\\ +(gradle)\\ b)/" ,
555
560
"group" : " 9_configuration@10"
556
561
}
562
+ ],
563
+ "javaProject.maven" : [
564
+ {
565
+ "command" : " java.project.update" ,
566
+ "group" : " maven@10"
567
+ }
568
+ ],
569
+ "javaProject.gradle" : [
570
+ {
571
+ "command" : " java.project.update" ,
572
+ "group" : " gradle@10"
573
+ }
557
574
]
558
575
},
576
+ "submenus" : [
577
+ {
578
+ "id" : " javaProject.maven" ,
579
+ "label" : " Maven"
580
+ },
581
+ {
582
+ "id" : " javaProject.gradle" ,
583
+ "label" : " Gradle"
584
+ }
585
+ ],
559
586
"views" : {
560
587
"explorer" : [
561
588
{
Original file line number Diff line number Diff line change 7
7
"contributes.commands.java.view.package.refresh" : " Refresh" ,
8
8
"contributes.commands.java.project.build.workspace" : " Rebuild All" ,
9
9
"contributes.commands.java.project.clean.workspace" : " Clean Workspace" ,
10
- "contributes.commands.java.project.update" : " Update Project" ,
11
10
"contributes.commands.java.project.rebuild" : " Rebuild Project" ,
11
+ "contributes.commands.java.project.update" : " Reload Project" ,
12
12
"contributes.commands.java.view.package.revealInProjectExplorer" : " Reveal in Java Project Explorer" ,
13
13
"contributes.commands.java.view.package.changeToFlatPackageView" :" Flat View" ,
14
14
"contributes.commands.java.view.package.changeToHierarchicalPackageView" :" Hierarchical View" ,
Original file line number Diff line number Diff line change 7
7
"contributes.commands.java.view.package.refresh" : " 刷新" ,
8
8
"contributes.commands.java.project.build.workspace" : " 重新构建所有项目" ,
9
9
"contributes.commands.java.project.clean.workspace" : " 清理工作空间" ,
10
- "contributes.commands.java.project.update" : " 更新项目" ,
11
10
"contributes.commands.java.project.rebuild" : " 重新构建项目" ,
11
+ "contributes.commands.java.project.update" : " 重新加载项目" ,
12
12
"contributes.commands.java.view.package.revealInProjectExplorer" : " 在 Java 项目视图中显示" ,
13
13
"contributes.commands.java.view.package.changeToFlatPackageView" :" 平行显示" ,
14
14
"contributes.commands.java.view.package.changeToHierarchicalPackageView" :" 层级显示" ,
Original file line number Diff line number Diff line change @@ -60,7 +60,8 @@ export class DependencyDataProvider implements TreeDataProvider<ExplorerNode> {
60
60
commands . executeCommand ( Commands . JAVA_CLEAN_WORKSPACE ) ) ) ;
61
61
context . subscriptions . push ( instrumentOperationAsVsCodeCommand ( Commands . JAVA_PROJECT_UPDATE , async ( node : INodeData ) => {
62
62
if ( ! node . uri ) {
63
- window . showErrorMessage ( "The URI of the project is not available, you can try to update the project by right clicking the project configuration file (pom.xml or *.gradle) from the File Explorer." ) ;
63
+ sendError ( new Error ( "Uri not available when reloading project" ) ) ;
64
+ window . showErrorMessage ( "The URI of the project is not available, you can try to trigger the command 'Java: Reload Project' from Command Palette." ) ;
64
65
return ;
65
66
}
66
67
const pattern : RelativePattern = new RelativePattern ( Uri . parse ( node . uri ) . fsPath , "{pom.xml,*.gradle}" ) ;
You can’t perform that action at this time.
0 commit comments