1919import com .espressif .idf .core .IDFCorePlugin ;
2020import com .espressif .idf .core .IDFCorePreferenceConstants ;
2121import com .espressif .idf .core .logging .Logger ;
22- import com .espressif .idf .core .util .StringUtil ;
2322
2423public class EspresssifPreferencesPage extends PreferencePage implements IWorkbenchPreferencePage
2524{
@@ -76,8 +75,6 @@ protected Control createContents(Composite parent)
7675
7776 addBuildSettings (mainComposite );
7877
79- addToolsInstallationSettings (mainComposite );
80-
8178 addClangdSettings (mainComposite );
8279 return mainComposite ;
8380 }
@@ -96,42 +93,6 @@ private void addClangdSettings(Composite mainComposite)
9693 .setSelection (getPreferenceStore ().getBoolean (IDFCorePreferenceConstants .AUTOMATE_CLANGD_FORMAT_FILE ));
9794 }
9895
99- private void addToolsInstallationSettings (Composite mainComposite )
100- {
101- Group toolsInstallationGroup = new Group (mainComposite , SWT .SHADOW_ETCHED_IN );
102- toolsInstallationGroup .setText (Messages .EspressifPreferencesPage_ToolsInstallationGrpTxt );
103- toolsInstallationGroup .setLayout (new GridLayout (3 , false ));
104-
105- Label githubAssetsLabel = new Label (toolsInstallationGroup , SWT .NONE );
106- githubAssetsLabel .setText (Messages .EspressifPreferencesPage_ToolsInstallationGitAssetUrlLabel );
107- gitAssetsCombo = new Combo (toolsInstallationGroup , SWT .DROP_DOWN | SWT .BORDER );
108- gitAssetsCombo .setItems (IDFCorePreferenceConstants .IDF_GITHUB_ASSETS_DEFAULT_GLOBAL ,
109- IDFCorePreferenceConstants .IDF_GITHUB_ASSETS_DEFAULT_CHINA );
110- gitAssetsCombo .select (0 );
111-
112- Label pythonWheelsLabel = new Label (toolsInstallationGroup , SWT .NONE );
113- pythonWheelsLabel .setText (Messages .EspressifPreferencesPage_ToolsInstallationPythonPyWheelUrlLabel );
114- pythonWheelCombo = new Combo (toolsInstallationGroup , SWT .DROP_DOWN | SWT .BORDER );
115- pythonWheelCombo .setItems (IDFCorePreferenceConstants .PIP_EXTRA_INDEX_URL_DEFAULT_GLOBAL ,
116- IDFCorePreferenceConstants .PIP_EXTRA_INDEX_URL_DEFAULT_CHINA );
117- pythonWheelCombo .select (0 );
118-
119- GridData gitTextGridData = new GridData (SWT .FILL , SWT .CENTER , true , false , 2 , 1 );
120- gitTextGridData .widthHint = 200 ;
121- GridData pythonTextGridData = new GridData (SWT .FILL , SWT .CENTER , true , false , 2 , 1 );
122- pythonTextGridData .widthHint = 200 ;
123- gitAssetsCombo .setLayoutData (gitTextGridData );
124- pythonWheelCombo .setLayoutData (pythonTextGridData );
125-
126- String gitUrl = getPreferenceStore ().getString (IDFCorePreferenceConstants .IDF_GITHUB_ASSETS );
127- String pyWheelUrl = getPreferenceStore ().getString (IDFCorePreferenceConstants .PIP_EXTRA_INDEX_URL );
128- gitUrl = StringUtil .isEmpty (gitUrl ) ? gitAssetsCombo .getItem (0 ) : gitUrl ;
129- pyWheelUrl = StringUtil .isEmpty (pyWheelUrl ) ? pythonWheelCombo .getItem (0 ) : pyWheelUrl ;
130-
131- gitAssetsCombo .setText (gitUrl );
132- pythonWheelCombo .setText (pyWheelUrl );
133- }
134-
13596 private void addBuildSettings (Composite mainComposite )
13697 {
13798 Group buildGroup = new Group (mainComposite , SWT .SHADOW_ETCHED_IN );
@@ -232,10 +193,6 @@ public boolean performOk()
232193 IDFCorePlugin .ERROR_MARKER_LISTENER .initialMarkerCleanup ();
233194 }
234195
235- getPreferenceStore ().setValue (IDFCorePreferenceConstants .IDF_GITHUB_ASSETS , gitAssetsCombo .getText ());
236-
237- getPreferenceStore ().setValue (IDFCorePreferenceConstants .PIP_EXTRA_INDEX_URL , pythonWheelCombo .getText ());
238-
239196 getPreferenceStore ().setValue (IDFCorePreferenceConstants .AUTOMATE_CLANGD_FORMAT_FILE ,
240197 automateClangdFormatCreationBtn .getSelection ());
241198 }
0 commit comments