Skip to content

Commit 91f2337

Browse files
authored
fix: removing copyOpenOcdRules since eim is handling it now (#1402)
1 parent 136fcf0 commit 91f2337

7 files changed

Lines changed: 0 additions & 109 deletions

File tree

bundles/com.espressif.idf.core/src/com/espressif/idf/core/tools/Messages.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@ public class Messages extends NLS
77
{
88
private static final String BUNDLE_NAME = "com.espressif.idf.core.tools.messages"; //$NON-NLS-1$
99

10-
public static String InstallToolsHandler_CopyingOpenOCDRules;
11-
public static String InstallToolsHandler_OpenOCDRulesCopyWarning;
12-
public static String InstallToolsHandler_OpenOCDRulesCopyWarningMessage;
13-
public static String InstallToolsHandler_OpenOCDRulesNotCopied;
14-
public static String InstallToolsHandler_OpenOCDRulesCopyPaths;
15-
public static String InstallToolsHandler_OpenOCDRulesCopyError;
16-
public static String InstallToolsHandler_OpenOCDRulesCopied;
1710

1811
public static String EimVersionMismatchExceptionMessage;
1912
public static String EimVersionMismatchExceptionMessageTitle;

bundles/com.espressif.idf.core/src/com/espressif/idf/core/tools/SetupToolsInIde.java

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,6 @@ private IStatus setupTools(IProgressMonitor monitor)
146146
setUpToolChainsAndTargets(false);
147147
monitor.worked(1);
148148

149-
monitor.setTaskName("Copying OpenOCD Rules"); //$NON-NLS-1$
150-
log("Copying OpenOCD Rules", IStatus.INFO); //$NON-NLS-1$
151-
copyOpenOcdRules();
152-
monitor.worked(1);
153-
154149
monitor.setTaskName("Applying Clangd Preferences"); //$NON-NLS-1$
155150
log("Applying Clangd Preferences", IStatus.INFO); //$NON-NLS-1$
156151
var lspService = new LspService();
@@ -167,66 +162,6 @@ private IStatus setupTools(IProgressMonitor monitor)
167162
}
168163
}
169164

170-
private void copyOpenOcdRules()
171-
{
172-
if (Platform.getOS().equals(Platform.OS_LINUX)
173-
&& !IDFUtil.getOpenOCDLocation().equalsIgnoreCase(StringUtil.EMPTY))
174-
{
175-
log(Messages.InstallToolsHandler_CopyingOpenOCDRules, IStatus.OK);
176-
// Copy the rules to the idf
177-
StringBuilder pathToRules = new StringBuilder();
178-
pathToRules.append(IDFUtil.getOpenOCDLocation());
179-
pathToRules.append("/../share/openocd/contrib/60-openocd.rules"); //$NON-NLS-1$
180-
File rulesFile = new File(pathToRules.toString());
181-
if (rulesFile.exists())
182-
{
183-
java.nio.file.Path source = Paths.get(pathToRules.toString());
184-
java.nio.file.Path target = Paths.get("/etc/udev/rules.d/60-openocd.rules"); //$NON-NLS-1$
185-
log(String.format(Messages.InstallToolsHandler_OpenOCDRulesCopyPaths, source.toString(),
186-
target.toString()), IStatus.OK);
187-
188-
Display.getDefault().syncExec(new Runnable()
189-
{
190-
@Override
191-
public void run()
192-
{
193-
try
194-
{
195-
if (target.toFile().exists())
196-
{
197-
MessageBox messageBox = new MessageBox(Display.getDefault().getActiveShell(),
198-
SWT.ICON_WARNING | SWT.YES | SWT.NO);
199-
messageBox.setText(Messages.InstallToolsHandler_OpenOCDRulesCopyWarning);
200-
messageBox.setMessage(Messages.InstallToolsHandler_OpenOCDRulesCopyWarningMessage);
201-
int response = messageBox.open();
202-
if (response == SWT.YES)
203-
{
204-
Files.copy(source, target, StandardCopyOption.REPLACE_EXISTING);
205-
}
206-
else
207-
{
208-
log(Messages.InstallToolsHandler_OpenOCDRulesNotCopied, IStatus.ERROR);
209-
return;
210-
}
211-
}
212-
else
213-
{
214-
Files.copy(source, target);
215-
}
216-
217-
log(Messages.InstallToolsHandler_OpenOCDRulesCopied, IStatus.OK);
218-
}
219-
catch (IOException e)
220-
{
221-
Logger.log(e);
222-
log(Messages.InstallToolsHandler_OpenOCDRulesCopyError, IStatus.ERROR);
223-
}
224-
}
225-
});
226-
}
227-
}
228-
}
229-
230165
private String getUpdatedPathWithSystemPath()
231166
{
232167
// EIM is giving us SYSTEM_PATH variable as well so we can simply add it to the PATH here and remove it from ENV vars
Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,2 @@
1-
InstallToolsHandler_CopyingOpenOCDRules=Copying OpenOCD Rules
2-
InstallToolsHandler_OpenOCDRulesCopyPaths=Copying File: %s to destination: %s
3-
InstallToolsHandler_OpenOCDRulesCopyWarning=Warning
4-
InstallToolsHandler_OpenOCDRulesCopyWarningMessage=The rules file is already present in the /etc/udev/rules.d/ directory, Do you want to replace the file with the file from OpenOCD directory
5-
InstallToolsHandler_OpenOCDRulesNotCopied=Rules Not Copied to system
6-
InstallToolsHandler_OpenOCDRulesCopyError=Unable to copy rules for OpenOCD to system directory, try running the eclipse with sudo command
7-
InstallToolsHandler_OpenOCDRulesCopied=Rules Copied to system
8-
91
EimVersionMismatchExceptionMessage=Invalid eim_idf.json version. Expected: %s, but found: %s.\nThe IDE may not function correctly.
102
EimVersionMismatchExceptionMessageTitle=EIM Version Mismatch

bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/tools/messages_zh.properties

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ SelectAllButton=\u9009\u62e9\u5168\u90e8
1010
DeselectAllButtonToolTip=\u53bb\u9009\u62e9\u5168\u90e8\u5de5\u5177
1111
CloningCompletedMsg=\u514b\u9686\u5b8c\u6210 ...
1212
InstallEspIdfPage_btnNew_text=\u65b0\u5efa
13-
InstallToolsHandler_OpenOCDRulesCopyError=\u65e0\u6cd5\u5c06 OpenOCD \u89c4\u5219\u590d\u5236\u5230\u7cfb\u7edf\u76ee\u5f55\uff0c\u8bf7\u5c1d\u8bd5\u4f7f\u7528 sudo \u547d\u4ee4\u8fd0\u884c eclipse
1413
InstallToolsPreReqPageDescription=\u5728\u6b64\u5904\u8bbe\u7f6e\u6240\u9700\u5de5\u5177\u7684\u8def\u5f84
1514
IDFDownloadWizard_DecompressingCompleted=\u5b58\u6863\u5df2\u63d0\u53d6\uff01
1615
SystemPathMessage=\u7cfb\u7edf\u8def\u5f84\uff1a
@@ -25,11 +24,8 @@ IDFDownloadWizard_DownloadingMessage=\u4e0b\u8f7d {0}...
2524
RemovedPathMessage=\u5220\u9664\u8def\u5f84\uff1a
2625
ManageToolsInstallationShell_tltmCheckItem_text=\u68c0\u67e5\u9879
2726
ShowAvailableVersionsOnly=\u4ec5\u663e\u793a\u53ef\u7528\u7248\u672c
28-
InstallToolsHandler_OpenOCDRulesCopied=\u89c4\u5219\u5df2\u590d\u5236\u5230\u7cfb\u7edf
2927
DirectorySelectionDialog_SelectIDFDirMessage=\u9009\u62e9 ESP-IDF \u76ee\u5f55\uff1a
30-
InstallToolsHandler_OpenOCDRulesCopyWarning=\u8b66\u544a
3128
InstallToolsText=\u5b89\u88c5\u5de5\u5177
32-
InstallToolsHandler_OpenOCDRulesNotCopied=\u89c4\u5219\u672a\u590d\u5236\u5230\u7cfb\u7edf
3329
Installed=\u5df2\u5b89\u88c5
3430
ToolsManagerShellHeading=\u7ba1\u7406\u5de5\u5177\u5b89\u88c5
3531
RemoveToolMessageBox=\u662f\u5426\u9700\u8981\u5220\u9664\u6240\u9009\u5de5\u5177\uff1f
@@ -52,7 +48,6 @@ ManageToolsInstallationDescription=\u6b64\u5904\u53ef\u5b89\u88c5\u6240\u9009 ID
5248
DeleteToolsTextToolTip=\u5220\u9664\u6240\u9009\u5de5\u5177\u786e\u4fdd\u4e0d\u8981\u5220\u9664\u63a8\u8350\u5de5\u5177\uff0c\u5426\u5219\u53ef\u80fd\u5f71\u54cd\u6b63\u5e38\u8fd0\u884c
5349
SelectRecommended=\u9009\u62e9\u63a8\u8350
5450
SelectRecommendedToolTip=\u4ec5\u9009\u62e9\u63a8\u8350\u5de5\u5177
55-
InstallToolsHandler_CopyingOpenOCDRules=\u6b63\u5728\u590d\u5236 OpenOCD \u89c4\u5219
5651
InstallPreRquisitePage=\u5b89\u88c5\u51c6\u5907
5752
InstallEspIdfPage_Existing=\u73b0\u6709
5853
SelectPythonVersion=\u9009\u62e9 Python \u7248\u672c
@@ -63,7 +58,6 @@ DownloadProgressText=\u4e0b\u8f7d\u8fdb\u5c55\uff1a
6358
InstallToolsProgressShell_lblNewLabel_text=\u6b63\u5728\u5b89\u88c5\u7684\u5de5\u5177
6459
UpdatingPathMessage=\u66f4\u65b0\u8def\u5f84
6560
SupportedTargetsDescriptionText=\u652f\u6301\u7684\u76ee\u6807\uff1a
66-
InstallToolsHandler_OpenOCDRulesCopyWarningMessage=\u89c4\u5219\u6587\u4ef6\u5df2\u5b58\u5728\u4e8e /etc/udev/rules.d/ \u76ee\u5f55\u4e2d\uff0c\u662f\u5426\u8981\u5c06\u8be5\u6587\u4ef6\u66ff\u6362\u4e3a OpenOCD \u76ee\u5f55\u4e2d\u7684\u6587\u4ef6
6761
ToolsTreeNameCol=\u540d\u79f0
6862
ToolAreadyPresent=\u5de5\u5177\u5df2\u5b58\u5728\u4e8e\u4e50\u946b\u4e3b\u76ee\u5f55\u4e2d\u3002
6963
ForceDownload=\u5f3a\u5236\u4e0b\u8f7d
@@ -72,7 +66,6 @@ DeleteToolsText=\u5220\u9664\u5de5\u5177
7266
InstallEspIdfPageDescription=\u4e0b\u8f7d ESP-IDF \u6216\u9009\u62e9\u73b0\u6709\u7248\u672c
7367
IDFDownloadWizard_UpdatingIDFPathMessage=\u66f4\u65b0 IDF_PATH \u8def\u5f84 {0}
7468
Available=\u53ef\u7528
75-
InstallToolsHandler_OpenOCDRulesCopyPaths=\u6b63\u5728\u590d\u5236\u6587\u4ef6 %s \u81f3\u76ee\u6807 %s
7669
SelectDownloadDir=\u9009\u62e9\u4fdd\u5b58 ESP-IDF \u76ee\u5f55
7770
DescriptionText=\u63cf\u8ff0
7871
ExtractionTextMessage=\u63d0\u53d6\u6587\u4ef6\uff1a

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,6 @@ public class Messages extends NLS
3535
public static String InstallToolsHandler_InstallingToolsMsg;
3636
public static String InstallToolsHandler_ItWilltakeTimeMsg;
3737
public static String InstallToolsHandler_ToolsCompleted;
38-
public static String InstallToolsHandler_CopyingOpenOCDRules;
39-
public static String InstallToolsHandler_OpenOCDRulesCopied;
40-
public static String InstallToolsHandler_OpenOCDRulesCopyError;
41-
public static String InstallToolsHandler_OpenOCDRulesCopyPaths;
42-
public static String InstallToolsHandler_OpenOCDRulesCopyWarning;
43-
public static String InstallToolsHandler_OpenOCDRulesCopyWarningMessage;
44-
public static String InstallToolsHandler_OpenOCDRulesNotCopied;
4538
public static String ListInstalledTools_MessageTitle;
4639
public static String ListInstalledTools_MissingIdfPathMsg;
4740
public static String ListInstalledToolsHandler_InstalledToolsListJobName;

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,6 @@ InstallToolsHandler_InstallingWebscoketMsg=Installing websocket_client
2828
InstallToolsHandler_InstallingToolsMsg=Installing tools...
2929
InstallToolsHandler_ItWilltakeTimeMsg=This can take a while. Please be patient.
3030
InstallToolsHandler_ToolsCompleted=Install tools completed.
31-
InstallToolsHandler_CopyingOpenOCDRules=Copying OpenOCD Rules
32-
InstallToolsHandler_OpenOCDRulesCopied=Rules Copied to system
33-
InstallToolsHandler_OpenOCDRulesNotCopied=Rules Not Copied to system
34-
InstallToolsHandler_OpenOCDRulesCopyPaths=Copying File: %s to destination: %s
35-
InstallToolsHandler_OpenOCDRulesCopyError=Unable to copy rules for OpenOCD to system directory, try running the eclipse with sudo command
36-
InstallToolsHandler_OpenOCDRulesCopyWarning=Warning
37-
InstallToolsHandler_OpenOCDRulesCopyWarningMessage=The rules file is already present in the /etc/udev/rules.d/ directory, Do you want to replace the file with the file from OpenOCD directory
3831
ListInstalledTools_MessageTitle=Message
3932
ListInstalledTools_MissingIdfPathMsg=Some tools are not installed or IDF_PATH is not set. To install them go to Espressif -> ESP-IDF Tools Manager -> ESP-IDF Manager. Do you want to install the missing tools now?
4033
ListInstalledToolsHandler_InstalledToolsListJobName=Installed Tools List Initialization...

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,4 @@ NotFoundMsg=<\u627e\u4e0d\u5230>
3737
PythonPathMsg=PATH \u53d8\u91cf\u4e2d\u58f0\u660e\u7684 Python\uff1a
3838
PythonIdfEnvMsg=\u4e3a IDF_PYTHON_ENV \u6307\u5b9a\u7684 Python\uff1a
3939

40-
InstallToolsHandler_OpenOCDRulesCopyError=\u65e0\u6cd5\u5c06 OpenOCD \u7684\u89c4\u5219\u590d\u5236\u5230\u7cfb\u7edf\u76ee\u5f55\uff0c\u8bf7\u5c1d\u8bd5\u4f7f\u7528 sudo \u547d\u4ee4\u8fd0\u884c eclipse
41-
InstallToolsHandler_OpenOCDRulesCopyPaths=\u6b63\u5728\u590d\u5236\u6587\u4ef6 %s \u81f3\u76ee\u6807 %s
42-
InstallToolsHandler_OpenOCDRulesNotCopied=\u89c4\u5219\u672a\u590d\u5236\u5230\u7cfb\u7edf
43-
InstallToolsHandler_OpenOCDRulesCopyWarningMessage=\u89c4\u5219\u6587\u4ef6\u5df2\u5b58\u5728\u4e8e /etc/udev/rules.d/ \u76ee\u5f55\u4e2d\uff0c\u662f\u5426\u8981\u5c06\u8be5\u6587\u4ef6\u66ff\u6362\u4e3a OpenOCD \u76ee\u5f55\u4e2d\u7684\u6587\u4ef6
44-
InstallToolsHandler_OpenOCDRulesCopied=\u89c4\u5219\u5df2\u590d\u5236\u5230\u7cfb\u7edf
45-
InstallToolsHandler_InstallingWebscoketMsg=\u6b63\u5728\u5b89\u88c5 websocket_client
46-
InstallToolsHandler_OpenOCDRulesCopyWarning=\u8b66\u544a
47-
InstallToolsHandler_CopyingOpenOCDRules=\u6b63\u5728\u590d\u5236 OpenOCD \u89c4\u5219
4840

0 commit comments

Comments
 (0)