简体   繁体   English

在Eclipse中,如何制作工具栏按钮或菜单命令来修改当前选择?

[英]In Eclipse, how can I make a toolbar button, or menu command, that modifies my current selection?

I want to make a toolbar button in eclipse that when pressed, removes all newlines from my selection. 我想在Eclipse中制作一个工具栏按钮,当按下该按钮时,将从我的选择中删除所有换行符。

How can I do this? 我怎样才能做到这一点?

You'll need to create a plugin for Eclipse. 您需要为Eclipse创建一个插件。 Take a look at PDE: http://www.eclipse.org/pde/ 看一下PDE: http//www.eclipse.org/pde/

But maybe this plugin does what you need: http://andrei.gmxhome.de/anyedit/ 但是也许这个插件可以满足您的需求: http : //andrei.gmxhome.de/anyedit/

As @Paulo suggested, you'll need an Eclipse plugin. 正如@Paulo所建议的,您将需要一个Eclipse插件。 More specifically, it sounds like you'll need a java editor extension. 更具体地说,听起来您需要Java编辑器扩展。 The Eclipse plugin development version that you can download and setup has some fairly easy wizards such as editor extensions and toolbar contributions - from there it is a matter of figuring out how to tie it together. 您可以下载和设置的Eclipse插件开发版本具有一些相当简单的向导,例如编辑器扩展和工具栏贡献-从那里可以确定如何将它们绑在一起。

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

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