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

时间:2022-01-07 10:57:11

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工具编辑器”,它是我自己的RCP-Application中Web Tools Plattform的一部分。我想我现在对RCP平台有了一些了解,但是在将它作为依赖项添加到我的项目后,我仍然不知道如何访问pagedesigner(org.eclipse.jst.pagedesigner)的功能。有没有人在将Web工具平台的组件添加到RCP-Application中的经验,可以给我一些暗示或什么?

1 个解决方案

#1


4  

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).

这些类型的请求存在困难(我,我自己,试图在Eclipse IDE中包含这个或那个特性,经常这么做)。

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.

第一步过去非常困难,但是从3.4开始就是使用Plug-In Spy的问题 - 按住Alt-Shift-F1,同时你想要的组件处于对焦状态时应该给你一个工具提示,向你展示课程,捆绑等

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).
  • 如果你很幸运,那么你可以在你的应用程序的启动配置/ .product中包含该软件包。一旦你点击Add Required Bundles,就不会留下3000个捆绑包(即你的RCP现在是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.
  • 通常情况并非如此,因为Eclipse团队没有将您感兴趣的代码重构为RCP安全捆绑包。如果是这样,那么你将不得不自己做。

  • 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.
  • 再说一次,如果你运气好,那就意味着将一些类从eclipse包中移出到你自己的类中,包括内部类,这将是它的结束 - 即你所需功能的依赖性都在包内。

  • 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.

这很费力,很难升级。我意识到这一切都不是你想要听到的。

#1


4  

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).

这些类型的请求存在困难(我,我自己,试图在Eclipse IDE中包含这个或那个特性,经常这么做)。

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.

第一步过去非常困难,但是从3.4开始就是使用Plug-In Spy的问题 - 按住Alt-Shift-F1,同时你想要的组件处于对焦状态时应该给你一个工具提示,向你展示课程,捆绑等

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).
  • 如果你很幸运,那么你可以在你的应用程序的启动配置/ .product中包含该软件包。一旦你点击Add Required Bundles,就不会留下3000个捆绑包(即你的RCP现在是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.
  • 通常情况并非如此,因为Eclipse团队没有将您感兴趣的代码重构为RCP安全捆绑包。如果是这样,那么你将不得不自己做。

  • 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.
  • 再说一次,如果你运气好,那就意味着将一些类从eclipse包中移出到你自己的类中,包括内部类,这将是它的结束 - 即你所需功能的依赖性都在包内。

  • 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.

这很费力,很难升级。我意识到这一切都不是你想要听到的。