Eclipse GEF DND问题

发布于 2025-01-24 13:57:26 字数 582 浏览 5 评论 0原文

在我们的基于RCP的应用程序之一中,我面临与基于GEF的DND有关的奇怪问题。我试图将项目从基于Jface的树拖到另一个Windows应用程序(第三方),并且由于某种原因无法正常工作。但是,如果我拖放基于SWT的表项目,则可以将树项目丢弃到其他此类应用程序。我们只面对该第三方应用程序(无访问日志)面临问题,可能会出现什么问题?

在很高的级别代码中,如下所示,

在树视图页面上添加了侦听器

treeviewer.adddroptargetListener(new TransferDroptargetListener(...));

侦听器 公共类Transferdragsourcelistener扩展了AbstractTransferdragsouristeristener {

数据集

@Override
public void dragSetData(DragSourceEvent event) {
.... some code goes here and then I set the data...
event.data = someStringValue;
}

I am facing a strange issue related to GEF based DnD in one of our RCP based application. I am trying to drag an item from a JFace based tree to another windows application (3rd party) and due to some reason it is not working. However if I drag and drop a SWT based table item it works and also the tree item can be dropped to notepad ot other such apps. We are facing issue only with that 3rd party app (no access to logs), what could be going wrong?

In a very high level code looks like below,

Listener added on tree view page

treeviewer.addDropTargetListener(new TransferDropTargetListener(...));

The listener
public class TransferDragSourceListener extends AbstractTransferDragSourceListener {

Data set

@Override
public void dragSetData(DragSourceEvent event) {
.... some code goes here and then I set the data...
event.data = someStringValue;
}

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文