【发布时间】:2010-12-21 17:32:20
【问题描述】:
这些天我的项目遇到了这个问题。我正在eclipse中开发一个插件, 当我点击一个按钮时,我需要在活动窗口(编码区域)上写一个文本。
我在 button.java 类中使用以下代码
public class Button implements IWorkbenchWindowActionDelegate {
private IWorkbenchWindow window;
/**
* The constructor.
*/
public Button() {
}
/**
* The action has been activated. The argument of the
* method represents the 'real' action sitting
* in the workbench UI.
* @see IWorkbenchWindowActionDelegate#run
*/
public void run(IAction action) {
MessageDialog.openInformation(
window.getShell(),
"Button",
"Code of the Button goes here");
}
如何在 run 方法中做到这一点?在这里我显示一条消息,而不是显示一条消息,我想在文本编辑器窗格中显示一些文本。请帮助我实现这一目标。
如果你们能给我一些链接来了解eclipse插件的开发吗?任何易于理解的博客文章会更好吗?
【问题讨论】:
标签: java eclipse eclipse-plugin