Eclipse RCP |如何从Widget端获取当前View?
我正在为 Eclipse RCP 开发一个小部件。我制作了一个 Shell,我想将其与视图中的事件(调整大小、移动等)结合起来,其中我有一个 Composite。如何从复合视图的角度获取该复合视图所在的视图?
I am developing an Widget for Eclipse RCP. I made a Shell, which I want to combine with Events (Resize, Move etc.) in a View, in which I have a Composite. How from the Composite point of View I can get it's View, in which this Composite is placed?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您始终可以调用 getParent() 来获取父控件。如果您感兴趣的组合不是直接父级,请考虑将所需的控件传递到构造函数中,并以这种方式跟踪它。
You can always call getParent() to get the parent control. If the composite you are interested in is not the direct parent, consider passing the control you want into the constructor, and keeping track of it that way.