【问题标题】:Is there no default drag and drop behavior in an e4 application created by e(fx)clipse?e(fx)clipse 创建的 e4 应用程序中是否没有默认的拖放行为?
【发布时间】:2017-05-08 20:23:17
【问题描述】:

我刚刚在this tutorial 之后通过 e(fx)clipse 创建了一个 e4 应用程序,然后我在我的应用程序中添加了两个部分,如下图所示。 然后当我乱用这个应用程序时,我发现这两个选项卡不能拖放。从理论上讲,每个窗口/视图都应该能够在基于 SWT UI 的 e4 应用程序中拖放。谁能告诉我如何在这样的应用程序中使窗口/视图拖放行为成为可能?真的很感激。

【问题讨论】:

    标签: java eclipse javafx eclipse-rcp efxclipse


    【解决方案1】:

    拖放不是 e4 核心的一部分。

    您必须将适当的 DnD 插件添加到 Application.e4xmi 的插件列表中才能进行拖放。

    对于 JavaFX,这是 org.eclipse.fx.ui.workbench.renderers.base.addons.DnDAddon(Application.e4xmi 中的完整条目应该是 bundleclass://org.eclipse.fx.ui.workbench.renderers.base/org‌​.eclipse.fx.ui.workb‌​ench.renderers.base.‌​addons.DnDAddon)。您可能还需要清理插件bundleclass://org.eclipse.fx.ui.workbench.renderers.base/org‌​.eclipse.fx.ui.workb‌​ench.renderers.base.‌​addons.CleanUpAddon

    对于 SWT,它是 org.eclipse.e4.ui.workbench.addons.dndaddon.DnDAddon

    【讨论】:

    • 我尝试将bundleclass://org.eclipse.e4.ui.workbench.addons.swt/org.eclipse.e4.ui.workbench.addons.dndaddon.DnDAddon 添加到Application.e4xmi 文件中的附加组件中,但是当我再次运行我的应用程序时,我得到了this error
    • 事实证明,DnD 插件是特定于您正在使用的 UI 工具包的。我已经用 JavaFX 插件更新了答案。
    • 好的,现在我有另一个error :( 它告诉我无法检索org.eclipse.fx.ui.workbench.renderers.base.addons.DnDAddon,但我确实将org.eclipse.fx.ui.workbench.renderers.base 添加到依赖项中。
    • 确保插件的完整条目是bundleclass://org.eclipse.fx.ui.workbench.renderers.base/org.eclipse.fx.ui.workbench.renderers.base.addons.DnDAddon你可能还需要清理插件bundleclass://org.eclipse.fx.ui.workbench.renderers.base/org.eclipse.fx.ui.workbench.renderers.base.addons.CleanUpAddon
    • 那个日志还在使用 org.eclipse.e4.ui.workbench.addons.dndaddon.DnDAddon
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-08-30
    • 2016-03-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-25
    • 1970-01-01
    相关资源
    最近更新 更多