Skip to content

Commit

Permalink
updated ui as per discussion
Browse files Browse the repository at this point in the history
  • Loading branch information
alirana01 committed Sep 14, 2023
1 parent 49b12c7 commit b9c4271
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 93 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
import com.espressif.idf.core.util.IDFUtil;
import com.espressif.idf.core.util.StringUtil;
import com.espressif.idf.ui.UIPlugin;
import com.espressif.idf.ui.dialogs.URLDialog;
import com.espressif.idf.ui.tools.wizard.pages.ManageToolsInstallationWizardPage;
import com.espressif.idf.ui.update.InstallToolsHandler;

Expand Down Expand Up @@ -638,21 +637,22 @@ else if (environment.containsKey("Path"))

StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(Messages.MissingToolsValidationMessage_A);
stringBuilder.append(System.lineSeparator());
for (ToolsVO toolsVO : missingToolsVOs)
{
stringBuilder.append(toolsVO.getName());
stringBuilder.append(System.lineSeparator());
stringBuilder.append(" ");
}

stringBuilder.append(Messages.MissingToolsValidationMessage_B);
stringBuilder.append(System.lineSeparator());
stringBuilder.append("<a>");
stringBuilder.append(Messages.MissingToolsValidationLink);
stringBuilder.append("</a>");

logQueue.add(stringBuilder.toString());

manageToolsInstallationWizardPage.getShell().getDisplay().asyncExec(() -> {
URLDialog urlDialog = new URLDialog(manageToolsInstallationWizardPage.getShell(), "Missing Tools",
stringBuilder.toString());
urlDialog.open();
manageToolsInstallationWizardPage.getLinkForDoc().setText(stringBuilder.toString());
manageToolsInstallationWizardPage.getLinkForDoc().setVisible(true);
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,5 @@ IDFDownloadWizard_UpdatingIDFPathMessage=Updating IDF_PATH to: {0}
FilterTargetBoxToolTip=Filter the tools based on the target selection of ESP chips
ShowAvailableVersionsOnlyToolTip=Shows the versions that are available already and downloaded. The versions should be in the espressif home directory to be visible with this.
MissingToolsValidationMessage_A=Following required tools are missing:
MissingToolsValidationMessage_B=Please visit the Link below to see configuration for these tools
MissingToolsValidationMessage_B=Please visit the Link to see configuration for these tools
MissingToolsValidationLink=https://github.com/espressif/idf-eclipse-plugin/blob/master/docs/MissingToolsManualPathUpdateGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.program.Program;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Link;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.ProgressBar;
Expand Down Expand Up @@ -110,6 +112,7 @@ public class ManageToolsInstallationWizardPage extends WizardPage implements ITo
private Preferences scopedPreferenceStore;
private Button forceDownloadBtn;
private Listener[] listenersForFinish;
private Link linkForDoc;

public ManageToolsInstallationWizardPage(WizardDialog parentWizardDialog, ToolsJsonParser toolsJsonParser)
{
Expand Down Expand Up @@ -270,6 +273,10 @@ public void widgetSelected(SelectionEvent e)
progressBar.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
progressBar.setVisible(false);

linkForDoc = new Link(logAreaComposite, SWT.WRAP | SWT.MULTI);
linkForDoc.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 3));
linkForDoc.addListener(SWT.Selection, e -> Program.launch(e.text));
linkForDoc.setVisible(false);
createButtonsBar(logAreaComposite);

setButtonsEnabled(itemChecked);
Expand Down Expand Up @@ -942,6 +949,16 @@ public void afterDeleteToolMessage()
}
}

public Link getLinkForDoc()
{
return linkForDoc;
}

public void setLinkForDoc(Link linkForDoc)
{
this.linkForDoc = linkForDoc;
}

private class SelectRecommendedButtonSelectionAdapter extends SelectionAdapter
{
@Override
Expand Down

0 comments on commit b9c4271

Please sign in to comment.