如何在自定义 RCP 应用程序中使用网页编辑器?

发布于 2024-07-09 01:33:12 字数 253 浏览 9 评论 0原文

我想在我自己的 RCP 应用程序中使用“Web 工具编辑器”,它是 Web 工具平台的一部分。 我想我现在已经对 RCP 平台有了一些了解,但是在将 pagedesigner (org.eclipse.jst.pagedesigner) 添加为我的项目的依赖项之后,我仍然不知道如何访问 pagedesigner (org.eclipse.jst.pagedesigner) 的功能。 有没有人有将 Web 工具平台的组件添加到 RCP 应用程序中的经验,并且可以给我一些提示或其他东西?

I want to use the "Web Tools Editor" that is part of the Web Tools Plattform in my own RCP-Application. I think i have got some understanding on the RCP plattform by now, but I still have no clue how to access the functionality of the pagedesigner (org.eclipse.jst.pagedesigner) after adding it as a dependency to my project. Has anyone some experience in adding components of the web tools plattform into an RCP-Application and can give me a hint or something?

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

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

发布评论

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

评论(1

如果没有你 2024-07-16 01:33:12

处理这些类型的请求是有困难的(我自己经常尝试包含我在 Eclipse IDE 中看到的这个或那个功能)。

诀窍是尝试识别您想要引入的组件,然后尝试将其拉入您的项目,而不引入太多依赖项。

第一步曾经非常困难,但从 3.4 开始,需要使用 Plug-In Spy - 在您想要的组件处于焦点状态时按住 Alt-Shift-F1 应该会给您一个工具提示向您显示类、捆绑包等。

第二步总体上更加棘手,也是我通常无法获得任何结果的地方:

  • 如果您幸运的话,那么您可以将捆绑包包含在您的启动配置/.product中应用程序。 一旦您点击“添加所需的捆绑包”,您就不会剩下 3000 个捆绑包(即您的 RCP 现在是 Eclipse)。
  • 通常情况并非如此,因为 Eclipse 团队尚未将您感兴趣的代码重构为 RCP 安全包。 如果是这样,那么你就必须自己做这件事。
  • 同样,如果您幸运的话,这将意味着将某些类从 Eclipse 包中移出到您自己的包中,包括内部类,这将是它的结束 - 即您所需功能的依赖项都在包中。
  • 如果您不幸,那么您需要隔离/重新实现所需的功能,并更改复制代码的版本。

这是一件很辛苦的事,而且升级起来也相当困难。 我意识到这些都不是你想听到的。

There's a difficulty with these sorts of requests (I am, myself, trying to include this or that feature that I saw in the Eclipse IDE, every so often).

The trick is to try and identify the component you want to bring in, and then try and pull it into your project, without bringing in too many dependencies.

The first step used to be quite hard, but since 3.4 it is a matter of using the Plug-In Spy - hold down Alt-Shift-F1 on whilst your desired component is in focus should give you a tooltip showing you the class, the bundle, etc etc.

The second step is altogether more tricky and is where I usuaully fail to get any results:

  • if you are lucky then you can just include the bundle in the launch configuration/.product of your app. Once you hit Add Required Bundles, you are not left with 3000 bundles (i.e. your RCP is now Eclipse).
  • usually, this is not the case, because the Eclipse team haven't refactored the bit of code you're interested in out into an RCP safe bundle. If so, then you're going to have to do that yourself.
  • Again, if you are lucky then that will mean moving some classes out of the eclipse bundle into your own, including internal classes, and that will be the end of it - i.e. the dependencies of your desired functionality are all within the bundle.
  • If you're unlucky, then you need to isolate/reimplement the bit of functionality that is required, and change your version of the copied code.

It is hard laborious, and pretty difficult to upgrade. I realise that none of this is what you want to hear.

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