开发者

SWT or Swing for Plugin Project

开发者 https://www.devze.com 2023-01-06 05:01 出处:网络
I\'m creatin开发者_开发百科g a plugin project that will have a menu and toolbar item, that when clicked, will open a dialog for user interaction (input, searching, etc.).Should I create the dialog usi

I'm creatin开发者_开发百科g a plugin project that will have a menu and toolbar item, that when clicked, will open a dialog for user interaction (input, searching, etc.). Should I create the dialog using SWT or Swing?


One advantage of doing it in Swing is that you don't have to supply any other libraries, because Swing is part of JRE. With SWT you have to do it and you have to have separate dlls for specific platforms. UPDATE: Since you mentioned that you have to create Eclipse plugin, I think you have a clear choice here - SWT. It is what Eclipse is based on.


SWT.

Debate over the merits of Swing and SWT is irrelevant. Your plug-in will integrate with a platform built on SWT. Using the same user-interface toolkit will simplify your development and testing, and produce better results.

There are cases where it's useful to use Swing within Eclipse, such as when you have an existing codebase that would be impractical to port. There is an SWT/AWT bridge; I have not used it.


Like @eugener, I prefer Swing to SWT, but both are rich, well-maintained frameworks that will serve the purpose. NetBeans and Eclipse are widely used exemplars. SWT binaries for popular platforms aren't too hard to integrate. The SWT FAQ may offer some perspective.

You'll need some other criteria to decide.


Since you're integrating Code Barrel into Eclipse, and SWT is part of the Eclipse project...

Actually, you should be looking at the Eclipse Plug-in Architecture and see how it works.

0

精彩评论

暂无评论...
验证码 换一张
取 消