Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to let Quick Outline differ from Outline?
How to let Quick Outline differ from Outline? [message #1805879] Fri, 26 April 2019 11:35 Go to next message
Konrad Jünemann is currently offline Konrad JünemannFriend
Messages: 31
Registered: December 2018
Member
Hi,

In my outline view, I insert nodes from related EObjects that are stored in different files, e.g., related entities. Those nodes themself might contain related nodes and so on, with the possibility of cycles. In the outline, this is not a problem with XText, as cleverly nodes are created lazily on demand only.

In the Quick Outline (Ctrl+O) however, the complete outline is constructed. This lets my application crash, as cycles in the node hierarchy lead to a stack overflow.

How can I let the Quick Outline differ from the Outline? My first idea was to inject a different QuickOutlinePopup Implementation, however unfortunately, this class is not Injected but created by an explicite new call. What would be the best way to do this?

To clarify: I would love to tell the MyDSLOutlineProvider to skip showing related entries when called from the QuickOutline.

Best wishes,
Konrad
Re: How to let Quick Outline differ from Outline? [message #1805907 is a reply to message #1805879] Sat, 27 April 2019 16:22 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13159
Registered: July 2009
Senior Member
you still should be able to customize
org.eclipse.xtext.ui.editor.outline.quickoutline.ShowQuickOutlineActionHandler.createPopup(Shell)
simply adding a binding for ShowQuickOutlineActionHandler should do the trick


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: How to let Quick Outline differ from Outline? [message #1805942 is a reply to message #1805907] Mon, 29 April 2019 08:29 Go to previous message
Konrad Jünemann is currently offline Konrad JünemannFriend
Messages: 31
Registered: December 2018
Member
Hi Christian,

Thanks a lot! In hindsight, this should've been obvious to me, really... works like a charm now.

Previous Topic:Xtext Web: generate and save
Next Topic:resolve references between two files in webUI
Goto Forum:
  


Current Time: Thu Oct 17 22:52:39 GMT 2019

Powered by FUDForum. Page generated in 0.01973 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top