Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to replace DefaultFoldingRegionProvider(How to replace DefaultFoldingRegionProvider)
How to replace DefaultFoldingRegionProvider [message #1857953] Wed, 08 March 2023 08:09 Go to next message
David Sun is currently offline David SunFriend
Messages: 45
Registered: July 2020
Member
Hi Guys!

I created a class , it extended from DefaultFoldingRegionProvider.
But I don't kown how to make my class work.
Can you give me some advice?
Thanks a lot !
Re: How to replace DefaultFoldingRegionProvider [message #1857954 is a reply to message #1857953] Wed, 08 March 2023 08:17 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14738
Registered: July 2009
Senior Member
hi, simply binding it does not work ?!?

public Class<? extends IFoldingRegionProvider> bindIFoldingRegionProvider() {
return StatemachineFoldingRegionProvider.class;
}


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: How to replace DefaultFoldingRegionProvider [message #1857956 is a reply to message #1857954] Wed, 08 March 2023 08:35 Go to previous messageGo to next message
David Sun is currently offline David SunFriend
Messages: 45
Registered: July 2020
Member
Sorry , I do not find bindIFoldingRegionProvider method and org.eclipse.xtext.ui.XtextUiModule
My xtext veresion is 2.26.0.
Re: How to replace DefaultFoldingRegionProvider [message #1857957 is a reply to message #1857956] Wed, 08 March 2023 09:04 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14738
Registered: July 2009
Senior Member
there seems to be a missunderstanding.

you don need to "find" a bind method. these are there only for some extension points
you can also add other

bind / configure and provide methods if there is none (see also https://www.eclipse.org/Xtext/documentation/302_configuration.html#dependency-injection)


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: How to replace DefaultFoldingRegionProvider [message #1857962 is a reply to message #1857957] Wed, 08 March 2023 12:34 Go to previous messageGo to next message
David Sun is currently offline David SunFriend
Messages: 45
Registered: July 2020
Member
It works!
Thanks for your help!
Re: How to replace DefaultFoldingRegionProvider [message #1857963 is a reply to message #1857957] Wed, 08 March 2023 12:45 Go to previous messageGo to next message
David Sun is currently offline David SunFriend
Messages: 45
Registered: July 2020
Member
But I have other question: How to save the folding state ?
After I reopen my code in xtext editor, the folding state disappear and I have to refold my code.
Thanks!
Re: How to replace DefaultFoldingRegionProvider [message #1857991 is a reply to message #1857963] Thu, 09 March 2023 18:13 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14738
Registered: July 2009
Senior Member
no idea. dont know if this is a feature eclipse supports. do you know other editors in eclipse that support it?

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: How to replace DefaultFoldingRegionProvider [message #1857997 is a reply to message #1857991] Fri, 10 March 2023 07:46 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
No, this is something you would have to implement yourself. Nothing in Eclipse directly supports such a thing. I have implemented such a thing for a customer... This claims to support such a thing:

https://marketplace.eclipse.org/content/eclipse-folding-plugin


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Parser wants spaces
Next Topic:Some questions.
Goto Forum:
  


Current Time: Mon Dec 30 16:15:26 GMT 2024

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

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

Back to the top