[英]Can I use Eclipse as a framework for a new cross-platform GUI?
I want to develop a new powerful GUI for an existing C++ application. 我想为现有的C ++应用程序开发一个新的功能强大的GUI。 I planned to do it as a standalone project in C++/QT, and it would communicate client-server with the existing application. 我计划将其作为C ++ / QT中的独立项目来进行,它将与现有应用程序进行客户端-服务器通信。
Recently I've been told that there is another possibility, to create such GUI using Eclipse. 最近有人告诉我,还有另一种可能性,就是使用Eclipse创建这样的GUI。 I mean that Eclipse can serve not only as an IDE, but also as some kind of framework for new applications. 我的意思是,Eclipse不仅可以充当IDE,而且可以充当新应用程序的某种框架。
Is it so? 是这样吗?
Is it a good idea to use Eclipse in this way? 以这种方式使用Eclipse是一个好主意吗? What to consider? 要考虑什么?
Can such development be C++ based, or only Java based? 这样的开发可以基于C ++还是仅基于Java?
Yes, absolutely, the Eclipse "Rich Client Platform" is an application framework comparable to Qt, in some ways, and superior in other ways. 是的,绝对可以,Eclipse“ Rich Client Platform”是在某些方面可与Qt媲美的应用程序框架,而在其他方面则优于。 RCP's frameworks are generally more sophisticated and more powerful than anything in Qt. RCP的框架通常比Qt中的任何框架都更复杂,更强大。 Yes, I realize I'm inviting flames, because people do have religious wars over this. 是的,我知道我在引火,因为人们对此确实有宗教战争。 I don't care, I'm entitled to my opinion. 我不在乎,我有权发表自己的意见。
You could include C++ code in your application using the JNI API, but in general, the bulk of the development would be in Java. 您可以使用JNI API在您的应用程序中包含C ++代码,但通常,大部分开发工作都将使用Java。 Ultimately, the deciding factor may just be the resources and skills you have available -- does your team know Java, or not. 最终,决定因素可能只是您拥有的资源和技能-您的团队是否了解Java。
As others have said, Eclipse is a platform, not just an IDE, but development using it is definitely in Java. 正如其他人所说的那样,Eclipse 是一个平台,不仅是一个IDE,而且使用Java进行开发绝对是一种平台。 Here's some reference material in case you decide to pursue this approach: 如果您决定采用这种方法,请参考以下材料:
Eclipse is built with its own GUI framework - SWT . Eclipse是使用其自己的GUI框架-SWT构建的。 It is Java-based but apparently there is a way to use it from native C++ . 它是基于Java的, 但是显然有一种从本机C ++使用它的方法 。
Eclipse is indeed a platform, with the cross-platform UI toolkit SWT and the OSGi plug-in system at its heart. Eclipse确实是一个平台,其核心是跨平台的UI工具包SWT和OSGi插件系统。 Look at Android: a lot of the operating system is coded in C++, with hooks for normal UI development with Java. 看一下Android:许多操作系统都是用C ++编码的,并带有使用Java进行常规UI开发的挂钩。 This is kind of what you need to do. 这是您需要做的。 Be aware that JNI is a pain and is certainly not easy to use, but I'd advise Java for everything except for code that needs to be accelerated, which you would do in C++. 请注意,JNI令人痛苦,并且肯定不容易使用,但是我建议Java提供除需要加速的代码之外的所有其他方法,您可以使用C ++来完成。 Java is fast enough for most tasks. Java对于大多数任务来说足够快。
You can certainly do that. 您当然可以做到。 You might also consider Netbeans or Qt's own IDE as well. 您可能还考虑使用Netbeans或Qt自己的IDE 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.