简体   繁体   English

如何在包含SWT组件的eclipse中创建视图?

[英]How to create a view in eclipse which contains SWT components?

I am trying to create a view in eclipse. 我正在尝试在Eclipse中创建视图。 I want my view to contain a Textfield and a button. 我希望我的视图包含一个Textfield和一个按钮。 the action is triggered by clicking on the button and some processing will be done on the inserted query in the textfield. 单击按钮将触发该操作,并且将对文本字段中插入的查询进行一些处理。 can anyone suggest me a link to a tutorial or example doing that? 谁能建议我这样做的教程或示例的链接? Thanks 谢谢

You can create two quick samples that together show you what you've asked for. 您可以创建两个快速示例,一起显示您的要求。 You do that by using the new project wizard to create a plugin project. 您可以通过使用新的项目向导来创建插件项目来实现。 One of the last wizard pages has a list of templates to choose from. 最后的向导页面之一包含可供选择的模板列表。 If you create a plugin using the "with a view" template, you'll see how to create a view. 如果使用“带有视图”模板创建插件,则将了解如何创建视图。 Go back and create a second plugin with the "multi-page editor" template and you'll see examples of buttons, their event handlers and text fields. 返回并使用“多页编辑器”模板创建第二个插件,您将看到按钮示例,其事件处理程序和文本字段。 It should be easy to see how to code up the buttons and texts in the view. 应该很容易看到如何在视图中编码按钮和文本。

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

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