如何根据某些操作在 Eclipse 上自动调用外部程序

How to automatically call an external program on eclipse upon certain actions

我每次在几个 eclipse pdt 项目 (运行 eclipse Neon.2) 中创建新文件时都需要调用本地脚本,是否可以自动执行此操作?

您必须创建 Eclipse 菜单挂钩(这会很棘手,而且不能 100% 确定如何?)。参见 here and here

更简单的方法可能是编写一个简单的应用程序,它将检测文件夹中的新文件并执行操作,而不是使用 Eclipse。