简体   繁体   English

我如何在 Javascript 中编写脚本(最好)eclipse 命令:Import/Check out Maven Projects from SCM using eclipse easy

[英]How could I script in Javascript (preferably) the eclipse command: Import/Check out Maven Projects from SCM using eclipse ease

I looked and I cannot find out how to do this.我看了看,我不知道如何做到这一点。 Eclipse does this using wizards and job and quite honestly, it is way too complicated to understand easily. Eclipse 使用向导和工作来做到这一点,老实说,它太复杂了,不容易理解。 Any example would be much appreciated.任何例子将不胜感激。 I do not want to have to write a plugin to do this and please do not ask me to do this in groovy or some other language unless it is impossible in Javascript.我不想写一个插件来做到这一点,请不要让我用 groovy 或其他语言来做到这一点,除非它在 ​​Javascript 中是不可能的。

By the way, the EASE support page says to create the question using the ease tag but since it does not exist and since I do not have enough points I cannot create it.顺便说一下,EASE 支持页面说使用ease 标签创建问题,但由于它不存在,而且由于我没有足够的积分,我无法创建它。

EASE provides support for checkout/import up to some degree. EASE 在某种程度上提供了对结帐/导入的支持。

Option 1: Use the /System/Git scripting module for git checkouts:选项 1:使用 /System/Git 脚本模块进行 git checkouts:

loadModule("/System/Git");
clone("https://github.com/Pontesegger/codeandme.git", "C:\\test");
importProject("C:\\test\\ui\\TableViewer DnD Sorting");

The module /System/SVN provides similar functionality for SVN repositories.模块 /System/SVN 为 SVN 存储库提供了类似的功能。

Option 2: Use an existing EGit/Subversive/... command.选项 2:使用现有的 EGit/Subversive/... 命令。 The /System/Platform module allows to execute any registered eclipse command: /System/Platform 模块允许执行任何注册的 eclipse 命令:

loadModule("/System/Platform");
executeCommand("eclipse.project.command.id")

This could be used to mimic clicks in the UI as any toolbar button/menu entry in eclipse triggers a command.这可用于模拟 UI 中的点击,因为 eclipse 中的任何工具栏按钮/菜单条目都会触发命令。 The Eclipse Plugin-spy might help in detecting command ids. Eclipse Plugin-spy 可能有助于检测命令 ID。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM