Skip to content

Commit 8618c29

Browse files
authored
feat: updating query driver's path after installing tools (#1319)
1 parent 14d4fd1 commit 8618c29

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

bundles/com.espressif.idf.core/src/com/espressif/idf/core/util/LspService.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ public void updateClangdPath()
7070
InstanceScope.INSTANCE.getNode(qualifier).put(ClangdMetadata.Predefined.clangdPath.identifer(), clangdPath);
7171
}
7272

73+
public void updateQueryDriver()
74+
{
75+
String qualifier = configuration.qualifier();
76+
InstanceScope.INSTANCE.getNode(qualifier).put(ClangdMetadata.Predefined.queryDriver.identifer(), "**"); //$NON-NLS-1$
77+
}
78+
7379
public void updateCompileCommandsDir(String buildDir)
7480
{
7581
String qualifier = configuration.qualifier();

bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/tools/ToolsActivationJob.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,10 @@ protected IStatus run(IProgressMonitor monitor)
9696

9797
toolSetConfigurationManager.export(idfToolSet);
9898
console.println("Tools Activated");
99-
new LspService().updateClangdPath();
99+
LspService lspService = new LspService();
100+
lspService.updateClangdPath();
101+
lspService.updateQueryDriver();
102+
console.println(Messages.ClangdPreferences_UpdatedMsg);
100103
Preferences scopedPreferenceStore = InstanceScope.INSTANCE.getNode(UIPlugin.PLUGIN_ID);
101104
scopedPreferenceStore.putBoolean(INSTALL_TOOLS_FLAG, true);
102105
try
@@ -173,7 +176,7 @@ public void run()
173176

174177
private void setUpToolChainsAndTargets()
175178
{
176-
//Get current active idf
179+
// Get current active idf
177180
String idfPath = IDFUtil.getIDFPath();
178181
List<String> targets = IDFTargetsReader.readTargetsFromEspIdf(idfPath).getAllTargetNames();
179182

bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/update/Messages.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,10 @@ public class Messages extends NLS
7373
public static String SbomCommandDialog_StatusCantBeNullErrorMsg;
7474

7575
public static String ToolsInstallationJobCompletedMessage;
76-
76+
7777
public static String BugReportHandler_CompletedBugReportMsg;
78-
78+
public static String ClangdPreferences_UpdatedMsg;
79+
7980
static
8081
{
8182
// initialize resource bundle

bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/update/messages.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,5 @@ SbomCommandDialog_StatusCantBeNullErrorMsg=Operation status cannot be null. Plea
6767
ToolsInstallationJobCompletedMessage=Tool installation has been successfully completed. To utilize specific tools, please use \"Set Active\" button
6868

6969

70-
BugReportHandler_CompletedBugReportMsg=\n\n================================\nBug report completed. You can find the report at: %s \n=================================\n
70+
BugReportHandler_CompletedBugReportMsg=\n\n================================\nBug report completed. You can find the report at: %s \n=================================\n
71+
ClangdPreferences_UpdatedMsg=Clangd preferences updated: clangd path and query driver path have been set.

0 commit comments

Comments
 (0)