是否有一个热键可以加速Eclipse中的重复提交(或一般的Windows GUI宏工具)?

时间:2023-01-17 19:21:00

I am making numerous, minute changes to .php files in Eclipse PDT then committing them and testing on the server.

我正在对Eclipse PDT中的.php文件进行大量的,微小的更改,然后提交它们并在服务器上进行测试。

The repetitive six-step commit process is getting tedious:

重复的六步提交过程变得乏味:

right-click
team
Commit...
click "choose previously selected comment"
select in list
click OK

Does anyone know of a hotkey or other process to expedite this?

有没有人知道热键或其他过程来加速这个?

UPDATE: does anyone know of a general hotkey macro tool for windows applications which would allow me to program a macro that would make these 6 clicks for me?

更新:有没有人知道Windows应用程序的一般热键宏工具,这将允许我编程一个宏,这将为我做这6次点击?

4 个解决方案

#1


3  

The best I've been able to do is create a key binding for 'Commit' (under Preferences... General->Keys). Then you just need to click on the project and hit a key combination, which saves the whole right-click->Team->Commit... process.

我能做的最好的事情是为'Commit'创建一个键绑定(在Preferences ... General-> Keys下)。然后你只需要点击项目并点击一个组合键,这样可以保存整个右键单击 - > Team-> Commit ...进程。

If you just want to check in the file you are editing, you don't have to click anywhere, just hit the key combination, and the commit dialog pops up to commit the current file.

如果您只想检入正在编辑的文件,则无需单击任何位置,只需按下组合键,弹出提交对话框即可提交当前文件。

#2


1  

In eclipse you can choose to either commit one file or the entire project.

在eclipse中,您可以选择提交一个文件或整个项目。

To commit the entire project, right click on the project in your resource view, and choose Team->Commit.

要提交整个项目,请在资源视图中右键单击项目,然后选择Team-> Commit。

If you want to preview the changes choose Team->Synchronize, which will show you what files are changed, and gives you a quick preview of the diffs in both incoming and outgoing mode.

如果要预览更改,请选择Team-> Synchronize,它将显示更改的文件,并为您提供传入和传出模式中差异的快速预览。

#3


0  

In some versions of Eclipse (or maybe some versions of Subclipse -- are you using SVN?) there was a toolbar button that you could click. It would eliminate the first 2 or 3 steps of your commit process. Maybe you can find that button on the toolbar editor (or perspective editor, or whatever they call it... it's been a while since I've used it).

在某些版本的Eclipse(或者某些版本的Subclipse中 - 您使用的是SVN吗?)中有一个工具栏按钮,您可以单击它。它将消除您的提交过程的前两个或三个步骤。也许你可以在工具栏编辑器(或透视编辑器,或者他们称之为的任何东西)上找到那个按钮......自从我使用它以来已经有一段时间了。

Also, IMHO, you shouldn't be committing and THEN testing. You'll find things run a lot smoother if you test locally, then commit (and test again in a QA type system...). You probably already know that, so I'm going to assume there's a strange reason you can't test locally.

另外,恕我直言,你不应该提交,然后测试。如果你在本地测试,然后提交(并在QA类型系统中再次测试......),你会发现事情运行得更顺畅。你可能已经知道了,所以我假设有一个奇怪的原因,你不能在本地测试。

#4


0  

I find that right-clicking the project or file in the Package Explorer is the most time consuming part of this repetitive process.

我发现右键单击Package Explorer中的项目或文件是这个重复过程中最耗时的部分。

Mostly I make related changes in multiple files, then synchronize the whole project. The first step to making the whole process accelerated via hotkeys is to bind a key combination to "Synchronize with repository...". For Eclipse 3.5 on OSX, the hotkey can be bound by going to Eclipse->Preferences->General->Keys. Then search for "Synchronize" in the text filter. I bind control-s as synchronize.

大多数情况下,我在多个文件中进行相关更改,然后同步整个项目。通过热键加速整个过程的第一步是将组合键绑定到“与存储库同步...”。对于OSX上的Eclipse 3.5,可以通过转到Eclipse-> Preferences-> General-> Keys来绑定热键。然后在文本过滤器中搜索“同步”。我将control-s绑定为同步。

Once a hotkey is bound for Synchro... , hitting the hotkey will synchronize the file in your active editor, or the selected files in the project explorer, if the project explorer is active.

一旦热键绑定到Synchro ...,如果项目资源管理器处于活动状态,点击热键将同步活动编辑器中的文件或项目资源管理器中的选定文件。

To rapidly put focus in to the project explorer, hit, on OSX, command-F6 to cycle to the project explorer. Another way, if focus is in an editor view, is to hit cmd-alt-W (Show In...) and then select "Project Explorer" from the popup. Sorry for the OSX shortcuts. If you look in the Keys area mentioned earlier, you should be able to find the relevant hotkey for cycling views.

要快速关注项目资源管理器,请在OSX上命令-F6循环到项目资源管理器。另一种方法是,如果焦点位于编辑器视图中,则按下cmd-alt-W(显示在...中),然后从弹出窗口中选择“Project Explorer”。对不起OSX快捷方式。如果您查看前面提到的Keys区域,您应该能够找到循环视图的相关热键。

So we've sped up part of the process, but it would still be nice to have a rapid way of selecting the whole project. The easiest way is a hack- just start typing the name of your project while in the project explorer. If the name isn't unique enough, prepend a 'Z' to it or something so that just they keystroke 'z' will select the whole project. Then hit your Synchro... hotkey to synch the whole project.

所以我们加快了部分流程,但是选择整个项目的方法仍然很快。最简单的方法是破解 - 只需在项目资源管理器中输入项目名称即可。如果名称不够独特,请在其前面添加一个“Z”,以便只需按键“z”即可选择整个项目。然后点击你的Synchro ...热键来同步整个项目。

Okay, so it takes quite a few hotkeys to synch the whole project, almost like playing a progression of guitar chords or doing a sweet combo in Tekken, but honestly the sequence of hotkeys can all be pushed in less than the time it takes to move your hand to the mouse. Perhaps binding a macro to the entire sequence would make it uber convenient.

好吧,所以需要相当多的热键才能同步整个项目,就像在Tekken中演奏吉他和弦或者做一个甜蜜的组合,但老实说,热键的顺序可以在不到移动时间内推动你的手到鼠标。也许将宏绑定到整个序列会使它变得非常方便。

#1


3  

The best I've been able to do is create a key binding for 'Commit' (under Preferences... General->Keys). Then you just need to click on the project and hit a key combination, which saves the whole right-click->Team->Commit... process.

我能做的最好的事情是为'Commit'创建一个键绑定(在Preferences ... General-> Keys下)。然后你只需要点击项目并点击一个组合键,这样可以保存整个右键单击 - > Team-> Commit ...进程。

If you just want to check in the file you are editing, you don't have to click anywhere, just hit the key combination, and the commit dialog pops up to commit the current file.

如果您只想检入正在编辑的文件,则无需单击任何位置,只需按下组合键,弹出提交对话框即可提交当前文件。

#2


1  

In eclipse you can choose to either commit one file or the entire project.

在eclipse中,您可以选择提交一个文件或整个项目。

To commit the entire project, right click on the project in your resource view, and choose Team->Commit.

要提交整个项目,请在资源视图中右键单击项目,然后选择Team-> Commit。

If you want to preview the changes choose Team->Synchronize, which will show you what files are changed, and gives you a quick preview of the diffs in both incoming and outgoing mode.

如果要预览更改,请选择Team-> Synchronize,它将显示更改的文件,并为您提供传入和传出模式中差异的快速预览。

#3


0  

In some versions of Eclipse (or maybe some versions of Subclipse -- are you using SVN?) there was a toolbar button that you could click. It would eliminate the first 2 or 3 steps of your commit process. Maybe you can find that button on the toolbar editor (or perspective editor, or whatever they call it... it's been a while since I've used it).

在某些版本的Eclipse(或者某些版本的Subclipse中 - 您使用的是SVN吗?)中有一个工具栏按钮,您可以单击它。它将消除您的提交过程的前两个或三个步骤。也许你可以在工具栏编辑器(或透视编辑器,或者他们称之为的任何东西)上找到那个按钮......自从我使用它以来已经有一段时间了。

Also, IMHO, you shouldn't be committing and THEN testing. You'll find things run a lot smoother if you test locally, then commit (and test again in a QA type system...). You probably already know that, so I'm going to assume there's a strange reason you can't test locally.

另外,恕我直言,你不应该提交,然后测试。如果你在本地测试,然后提交(并在QA类型系统中再次测试......),你会发现事情运行得更顺畅。你可能已经知道了,所以我假设有一个奇怪的原因,你不能在本地测试。

#4


0  

I find that right-clicking the project or file in the Package Explorer is the most time consuming part of this repetitive process.

我发现右键单击Package Explorer中的项目或文件是这个重复过程中最耗时的部分。

Mostly I make related changes in multiple files, then synchronize the whole project. The first step to making the whole process accelerated via hotkeys is to bind a key combination to "Synchronize with repository...". For Eclipse 3.5 on OSX, the hotkey can be bound by going to Eclipse->Preferences->General->Keys. Then search for "Synchronize" in the text filter. I bind control-s as synchronize.

大多数情况下,我在多个文件中进行相关更改,然后同步整个项目。通过热键加速整个过程的第一步是将组合键绑定到“与存储库同步...”。对于OSX上的Eclipse 3.5,可以通过转到Eclipse-> Preferences-> General-> Keys来绑定热键。然后在文本过滤器中搜索“同步”。我将control-s绑定为同步。

Once a hotkey is bound for Synchro... , hitting the hotkey will synchronize the file in your active editor, or the selected files in the project explorer, if the project explorer is active.

一旦热键绑定到Synchro ...,如果项目资源管理器处于活动状态,点击热键将同步活动编辑器中的文件或项目资源管理器中的选定文件。

To rapidly put focus in to the project explorer, hit, on OSX, command-F6 to cycle to the project explorer. Another way, if focus is in an editor view, is to hit cmd-alt-W (Show In...) and then select "Project Explorer" from the popup. Sorry for the OSX shortcuts. If you look in the Keys area mentioned earlier, you should be able to find the relevant hotkey for cycling views.

要快速关注项目资源管理器,请在OSX上命令-F6循环到项目资源管理器。另一种方法是,如果焦点位于编辑器视图中,则按下cmd-alt-W(显示在...中),然后从弹出窗口中选择“Project Explorer”。对不起OSX快捷方式。如果您查看前面提到的Keys区域,您应该能够找到循环视图的相关热键。

So we've sped up part of the process, but it would still be nice to have a rapid way of selecting the whole project. The easiest way is a hack- just start typing the name of your project while in the project explorer. If the name isn't unique enough, prepend a 'Z' to it or something so that just they keystroke 'z' will select the whole project. Then hit your Synchro... hotkey to synch the whole project.

所以我们加快了部分流程,但是选择整个项目的方法仍然很快。最简单的方法是破解 - 只需在项目资源管理器中输入项目名称即可。如果名称不够独特,请在其前面添加一个“Z”,以便只需按键“z”即可选择整个项目。然后点击你的Synchro ...热键来同步整个项目。

Okay, so it takes quite a few hotkeys to synch the whole project, almost like playing a progression of guitar chords or doing a sweet combo in Tekken, but honestly the sequence of hotkeys can all be pushed in less than the time it takes to move your hand to the mouse. Perhaps binding a macro to the entire sequence would make it uber convenient.

好吧,所以需要相当多的热键才能同步整个项目,就像在Tekken中演奏吉他和弦或者做一个甜蜜的组合,但老实说,热键的顺序可以在不到移动时间内推动你的手到鼠标。也许将宏绑定到整个序列会使它变得非常方便。