Skip to content

Commit 3e738c8

Browse files
authored
IEP-975: Bug fix for recommended button in Tools Installation Wizard (#782)
* IEP-975: Bug fix for recommended button in Tools Installation Wizard * esp home directory not present causing failure on download.
1 parent 2858321 commit 3e738c8

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,12 @@ public InstallToolsThread(Map<ToolsVO, List<VersionsVO>> selectedItems,
550550
@Override
551551
public Boolean call() throws Exception
552552
{
553+
File espMainFolder = new File(ToolsUtility.ESPRESSIF_HOME_DIR);
554+
if (!espMainFolder.exists())
555+
{
556+
espMainFolder.mkdirs();
557+
}
558+
553559
for (ToolsVO toolsVo : selectedItems.keySet())
554560
{
555561
if (Thread.interrupted())

bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/tools/wizard/pages/InstallPreRquisitePage.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ public void createControl(Composite parent)
123123
String[] versions = pythonVersions.keySet().toArray(new String[pythonVersions.size()]);
124124
pythonVersionCombo.setItems(versions);
125125
pythonVersionCombo.select(0); // select the first one
126+
pythonExecutablePath = pythonVersions.get(versions[0]);
126127
pythonVersionCombo.addModifyListener(new ModifyListener()
127128
{
128129
@Override

bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/tools/wizard/pages/ManageToolsInstallationWizardPage.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -954,12 +954,10 @@ public void widgetSelected(SelectionEvent e)
954954
boolean alwaysInstall = toolsVO.getInstallType().equalsIgnoreCase(ALWAYS)
955955
|| toolsVO.getInstallType().equalsIgnoreCase(RECOMMENDED);
956956
mainItem.setChecked(alwaysInstall);
957-
958-
for (TreeItem subItem : mainItem.getItems())
959-
{
960-
subItem.setChecked(alwaysInstall);
961-
}
962-
957+
Event swtCheckedTreeEvent = new Event();
958+
swtCheckedTreeEvent.detail = SWT.CHECK;
959+
swtCheckedTreeEvent.item = mainItem;
960+
toolsTree.notifyListeners(SWT.Selection, swtCheckedTreeEvent);
963961
mainItem.setExpanded(alwaysInstall);
964962
}
965963

0 commit comments

Comments
 (0)