jruby 中的 Eclipse RCP 应用程序

发布于 2024-12-28 14:02:51 字数 810 浏览 0 评论 0原文

我正在尝试仅使用 jruby 或至少仅使用严格必要数量的 java 来编写 Eclipse rcp 应用程序。由于只需几行纯 ruby​​ 代码即可为您提供一个基本的 SWT 应用程序,因此我希望在 jruby 中编写 rcp 应用程序应该归结为实现一些类,例如 IApplication 等等...免责声明:我有使用 (j)ruby 已经有好几年了,但几乎没有这方面的 java 或 rcp 经验。

看起来可行的方法是坚持使用 Eclipse 生成的模板并从那里调用 ruby​​ 类。但是:可以使用纯红宝石吗?

似乎有某种魔力将 rcp 应用程序的所有类粘合在一起。这种魔力的大部分可能位于 rcp 项目根目录中的plugin.xml 中。然而,当我查看正在运行的 rcp 应用程序的命令行时,会发现有相当多的框架参数...

搜索“eclipse、rcp、jruby”等关键字并没有给出我希望的结果。有一个一个项目,它本质上似乎是朝着从Java 骨架。没有纯红宝石。

目的:我要编写的应用程序将处理时间序列。恕我直言,此任务非常适合 rcp 应用程序中的视角概念:

  1. 选择时间序列、
  2. 构建模型、
  3. 分析结果。

另外,在工作台环境中处理时间序列很好:您可以打开很多窗口,对它们进行分组,等等...

所以,我想,我的主要问题是:您有任何指示吗,如何编写 Eclipse ruby 中的 rcp 应用程序?但我也愿意接受针对手头任务的完全不同的建议。

乔治

I'm trying to write an Eclipse rcp application using only jruby, or at least with only the strictly necessary amount of java. As only a few lines of pure ruby code will give you a basic SWT application, I was hoping, that writing an rcp application in jruby should boil down to implementing a few classes, like IApplication, and so on... Disclaimer: I have been working with (j)ruby for several years but have almost no java or rcp experience for that matter.

What seems viable is to stick with the template generated by Eclipse and call ruby classes from there. However: is it possible to use pure ruby?

There seems to be some magic that glues all the classes of an rcp application together. A good deal of that magic probably resides in plugin.xml in the root directory of an rcp project. However, when I look at the command line of a running rcp application there are quite a lot of framework parameters...

Searching for keywords like "eclipse, rcp, jruby" did not give me the result I hoped for. There is one project which essentially seems to be going in the direction of calling ruby classes from a java skeleton. No pure ruby.

Purpose: the application I'm looking to write will process time series. This tasks nicely fits IMHO into the concept of perspectives in an rcp application:

  1. Select time series,
  2. Build a model,
  3. Analyze the result.

Also, processing time series is nice in a workbench environment: you can have lots of windows open, group them, and so on...

So, I guess, my primary question is: do you have any pointers, how to write an Eclipse rcp application in ruby? But I'm also open to completely different suggestions for the task at hand.

George

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

故人爱我别走 2025-01-04 14:02:51

关于 Eclipse RCP,我建议使用 Glimmer,假设开发人员已经非常熟悉 Java 和 Eclipse RCP,因此可以通过 JRuby 使用 Glimmer 进一步提高生产力。然而,我没有这样做的直接个人经验,尽管我知道可以通过让 Eclipse RCP 应用程序中的用户界面面板通过 JRuby 加载 Glimmer Ruby UI 代码来实现这一点。

另一方面,对于 Ruby 开发人员,我不一定建议使用 Eclipse RCP,因为它遵循重量级 Java 范例(包括严重依赖 XML)并且具有相对陡峭的学习曲线。

Eclipse RCP 对 Java 开发人员的主要好处是能够快速开始使用典型的桌面应用程序,“典型”是指由一个标题窗口、一个工具栏、一个菜单栏和一个或多个元素组成的应用程序。面板,通常其中一个位于中心,通常专注于编辑文件(图像、文档、表单结构化数据、电子表格等)。

Eclipse RCP 为许多这些“典型”桌面应用程序问题提供了开箱即用的解决方案,但尽管如此,我还是希望 Ruby 开发人员用 Ruby 重写这些解决方案,并且也许会提出一个新的框架来替代 Eclipse RCP。这是因为 Ruby 可以提供更简单的解决方案,依赖更少的代码并避免使用 XML。

另一种选择是避免使用 Ruby,而仅使用纯 Java,通过利用 Eclipse RCP 的工作台、透视图等来解决问题。然后,只有当您掌握了 Eclipse RCP 后,才可以通过 JRuby 使用 Glimmer。但是,这可能会更耗时,特别是如果您已经投入了大量 Ruby 代码。

如果您确实选择第一种选择(使用不带 Eclipse RCP 的纯 Ruby),我很想看看您是否可以向 Glimmer 或 GitHub 上的支持 Glimmer 库/框架贡献任何小部件或 Glimmer 扩展。

谦虚的是,

Andy Maleh - Glimmer 的创造者

Regarding Eclipse RCP, I suggested using Glimmer with the assumption that the developer is already quite comfortable with Java and Eclipse RCP, and thus can improve productivity further by employing Glimmer via JRuby. However, I do not have direct personal experience doing so though I know it is possible by having user interface panels within the Eclipse RCP app load Glimmer Ruby UI code via JRuby.

For a Ruby developer on the other hand, I do not necessarily advice using Eclipse RCP as it follows heavy-weight Java paradigms (including heavy reliance on XML) and has a relatively steep learning curve.

The key benefit in Eclipse RCP for Java developers was being able to get started with a typical desktop application quickly, and by "typical", I mean an application that consists of a titled window, a toolbar, a menu bar, and one or more panels, usually one of which is in the center, and often focused on editing a file (image, document, form structured data, spreadsheet, etc...).

Eclipse RCP provides out of the box solutions to many of these "typical" desktop application problems, but although it does, I would rather a Ruby developer rewrite these solutions in Ruby and maybe come up with a new framework as a replacement to Eclipse RCP. That is because Ruby can provide much simpler solutions that rely on a lot less code and avoid use of XML.

Another alternative is to avoid Ruby and just work with pure Java to solve your problems by taking advantage of Eclipse RCP's workbenches, perspectives, and such. And then only once you master Eclipse RCP, maybe use Glimmer via JRuby. But, this might be even more time consuming especially if you're already invested in a lot of Ruby code.

If you do go with the first alternative (using pure Ruby without Eclipse RCP), I'd be interested to see if you can contribute any widgets or Glimmer extensions you come up back to Glimmer or a supporting Glimmer library/framework on GitHub.

Humbly,

Andy Maleh - Creator of Glimmer

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文