buildship - Buildship in Eclipse - 可以以编程方式运行项目导入向导吗?
问题描述
更新:我得到了开发者的回答:https ://discuss.gradle.org/t/possible-to-run-the-import-wizard-programmatically/39133 - 这是不可能的,目前没有计划做到这一点可能,但他们愿意接受使之成为可能的贡献。
我有一个可以自动打开 buildship 导入项目向导的 eclipse 插件。代码的相关部分如下所示:
IWizardDescriptor buildshipImportWizardDescriptor = PlatformUI.getWorkbench().getImportWizardRegistry().findWizard("org.eclipse.buildship.ui.wizards.project.import");
PlatformUI.getWorkbench().getDisplay().asyncExec(() ->
{
Shell activeShell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
try
{
IWizard wizard = buildshipImportWizardDescriptor.createWizard();
WizardDialog wd = new WizardDialog(activeShell, wizard);
wd.open();
}
catch (Exception ex)
{
// ..
}
});
所以,我可以启动导入向导。但我也想自动化下一步。在某些条件下(工作区根目录有某些子目录,工作区中当前的项目列表为空)我想使用此导入向导自动导入 gradle 项目,而无需用户单击或键入。这可能吗?如果没有,是否可以至少为项目根目录预先填写正确的值?
(最初在这里问https://discuss.gradle.org/t/possible-to-run-the-import-wizard-programmatically/39133)
解决方案
推荐阅读
- javascript - 即使在滚动内容结束后,水平图像滑块 1px 内容也会偶尔保留在 Ipad 中
- arrays - 行中的参考值取决于另一个单元格中的值
- reactjs - 如何使用 Firebase (V9) 和 React (V 17)?
- angular - Angular Jasmine 单元测试:模拟在从组件调用的服务中调用的 HTTP 请求的结果
- android - 电容器 - 从科尔多瓦迁移后,默认情况下在 Android 上禁用浮动通知
- powerquery - 根据特定单元格值创建新列
- sql - 如何查找是否定义了 SORTKEY 以及它是如何从目录表中定义的?
- oracle - 如何在 oracle 中查找特定值
- wpf - wpf TreeView 绑定具有多个 TreeViewItemStyle
- javascript - 未捕获的 SyntaxError:意外的保留字(等待)