File tree Expand file tree Collapse file tree 4 files changed +16
-0
lines changed
Expand file tree Collapse file tree 4 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 293293 "command" : " java.view.triggerJavaUpgradeTool" ,
294294 "title" : " %contributes.commands.java.view.triggerJavaUpgradeTool%" ,
295295 "category" : " Java"
296+ },
297+ {
298+ "command" : " java.view.modernizeJavaProject" ,
299+ "title" : " %contributes.commands.java.view.modernizeJavaProject%" ,
300+ "category" : " Java"
296301 }
297302 ],
298303 "configuration" : {
573578 "when" : " explorerResourceIsFolder" ,
574579 "group" : " 1_javaactions@30"
575580 },
581+ {
582+ "command" : " java.view.modernizeJavaProject" ,
583+ "when" : " explorerResourceIsFolder" ,
584+ "group" : " 1_javaactions@40"
585+ },
576586 {
577587 "command" : " java.view.package.revealInProjectExplorer" ,
578588 "when" : " resourceFilename =~ /(.*\\ .gradle)|(.*\\ .gradle\\ .kts)|(pom\\ .xml)$/ && java:serverMode == Standard" ,
Original file line number Diff line number Diff line change 2525 "contributes.commands.java.view.package.new" : " New..." ,
2626 "contributes.commands.java.view.package.newJavaClass" : " Class..." ,
2727 "contributes.commands.java.view.triggerJavaUpgradeTool" : " Upgrade dependencies" ,
28+ "contributes.commands.java.view.modernizeJavaProject" : " Modernize Java project" ,
2829 "contributes.commands.java.view.package.newJavaInterface" : " Interface..." ,
2930 "contributes.commands.java.view.package.newJavaEnum" : " Enum..." ,
3031 "contributes.commands.java.view.package.newJavaRecord" : " Record..." ,
Original file line number Diff line number Diff line change @@ -44,6 +44,8 @@ export namespace Commands {
4444
4545 export const VIEW_TRIGGER_JAVA_UPGRADE_TOOL = "java.view.triggerJavaUpgradeTool" ;
4646
47+ export const VIEW_MODERNIZE_JAVA_PROJECT = "java.view.modernizeJavaProject" ;
48+
4749 export const VIEW_PACKAGE_NEW_JAVA_INTERFACE = "java.view.package.newJavaInterface" ;
4850
4951 export const VIEW_PACKAGE_NEW_JAVA_ENUM = "java.view.package.newJavaEnum" ;
Original file line number Diff line number Diff line change @@ -91,6 +91,9 @@ class UpgradeManager {
9191 context . subscriptions . push ( instrumentOperationAsVsCodeCommand ( Commands . VIEW_TRIGGER_JAVA_UPGRADE_TOOL , ( promptText ?: string ) => {
9292 this . runUpgrade ( promptText ?? DEFAULT_UPGRADE_PROMPT ) ;
9393 } ) ) ;
94+ context . subscriptions . push ( instrumentOperationAsVsCodeCommand ( Commands . VIEW_MODERNIZE_JAVA_PROJECT , ( ) => {
95+ commands . executeCommand ( "workbench.view.extension.azureJavaMigrationExplorer" ) ;
96+ } ) ) ;
9497
9598 upgradeManager . scan ( ) ;
9699 }
You can’t perform that action at this time.
0 commit comments