Commit 7719c6e
fix: isolate per-folder exception in mode picker for multi-project workspaces
In McpPreferencePage.getWorkspaceNameForMode(), the entire workspace-folder
loop was wrapped in one try-catch. If any project had a non-file:// URI
(e.g. EFS-backed sftp://, ecf:// or other custom linked resources),
Paths.get(URI.create(...)) would throw and the catch would return '' for
ALL custom modes — hiding them from the mode picker dropdown.
Move the Paths.get() call into a per-folder inner try-catch so one
bad URI only skips that folder; the loop continues for the rest.
Also add INFO/WARN diagnostic logs so future issues can be diagnosed
from workspace.log without a debugger.
Fixes: #180
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 63b3c1b commit 7719c6e
1 file changed
Lines changed: 23 additions & 6 deletions
File tree
- com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/preferences
Lines changed: 23 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
967 | 967 | | |
968 | 968 | | |
969 | 969 | | |
| 970 | + | |
970 | 971 | | |
971 | 972 | | |
972 | 973 | | |
973 | | - | |
974 | | - | |
| 974 | + | |
| 975 | + | |
975 | 976 | | |
976 | 977 | | |
| 978 | + | |
| 979 | + | |
977 | 980 | | |
978 | 981 | | |
979 | 982 | | |
| |||
1081 | 1084 | | |
1082 | 1085 | | |
1083 | 1086 | | |
| 1087 | + | |
1084 | 1088 | | |
| 1089 | + | |
1085 | 1090 | | |
1086 | 1091 | | |
| 1092 | + | |
| 1093 | + | |
1087 | 1094 | | |
1088 | 1095 | | |
1089 | | - | |
1090 | | - | |
1091 | | - | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
1092 | 1108 | | |
1093 | 1109 | | |
1094 | 1110 | | |
1095 | 1111 | | |
1096 | | - | |
| 1112 | + | |
| 1113 | + | |
1097 | 1114 | | |
1098 | 1115 | | |
1099 | 1116 | | |
| |||
0 commit comments