ModelBusReference丢失了 [英] ModelBusReference gets lost

查看:86
本文介绍了ModelBusReference丢失了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

全部,


我已经制作了一个DSL,通过Modelbus与其他实例进行通信。更确切地说,"实体"是指"实体"。在一个模型文件中,应引用另一个"实体"。在另一个模型文件中。我已经创建了一种"代理元素"。
第一个实体有一个引用。此Proxy类包含"ModelbusReference"。物业到第二个实体。虽然我是设计师,但一切都很好。该参考有效,可用于在菜单命令上打开第二个模型文件或双击
点击并聚焦第二个实体。


但是当我点击"保存"时并尝试在此后的代码中引用第二个实体,ModelbusReference为null。


我已经看到有必要为每个引用的Type设置SerializeId为true。所有涉及的课程都是如此。


我现在正在调试和搜索几天,需要对我在这里做错的新想法...; - )


我希望你们能帮忙!


非常感谢提前!


Soenke





如果我能为您提供更多信息,请告诉我们!我很高兴有关这个主题的任何想法可以帮助我找到问题...谢谢!

解决方案

Hello Soenke。


您是否检查在保存或打开文档时是否有任何异常? (使用Debug | Exceptions,并在"Common Language Runtime Exceptions"中检查"Thrown")


问候



Hi, All,

I've made a DSL which talks to other instances of itself via Modelbus. To be more precise, an "Entity" in one Model file shall reference another "Entity" in another model file. I've created sort of a "proxy element" which the first entity has a reference to. This Proxy class holds a "ModelbusReference" property to the second entity. While I'm in the designer, all is good. The reference works and can be used to i.e. open the second model file on a menu command or double click and focus the second entity.

But when I hit "save" and try to reference the second entity in the code thereafter, the ModelbusReference is null.

I've seen that it's necessary to have SerializeId set to true for every referenced Type. That is true on all classes that are involved.

I'm debugging and searching for a couple of days now and need a new idea of what I'm doing wrong here... ;-)

I hope you guys can help!

Thanks very much in advance!

Soenke


[Edit]

If I can provide you with any more information, just let me know! I'd be happy for any idea on this topic that could help me finding the problem... Thanks!

解决方案

Hello Soenke.

Did you check if there were any exceptions thrown while you are saving or opening the document? (using Debug | Exceptions, and checking "Thrown" in the "Common Language Runtime Exceptions")

Regards


这篇关于ModelBusReference丢失了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆