Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Undo of StandaloneSetup ..? (IF using StandaloneSetup from Eclipse, can it be undone?)
Undo of StandaloneSetup ..? [message #1730746] Thu, 28 April 2016 08:37 Go to next message
Nils Kronqvist is currently offline Nils KronqvistFriend
Messages: 10
Registered: July 2009
Junior Member
Hi,

I have a case where I need to load my DSL model from within Eclipse, but as the dsl files are not located in an open Eclipse project I use the StandaloneSetup which works. BUT - as expected - if I thereafter (without Eclipse restart) loads the Eclipse project in which the DSL files are located, the editor support is broken .. see description why StandaloneSetup should not be used within Eclipse in e.g. http://koehnlein.blogspot.de/2012/11/xtext-tip-how-do-i-get-guice-injector.html.

Any suggestions for a solution that allows me to effectively "undo" StandaloneSetup ..? Given the way non-standalone setup is initialized as described in blog, trying to undo seems like a bit hard to accomplish ..

Is the scenario very uncommon?

An obvious solution would be to require that the project containing the dsl files is loaded before accessing the DSL model, but would like to avoid this if possible.

Rgs,

/Nils K
Re: Undo of StandaloneSetup ..? [message #1730747 is a reply to message #1730746] Thu, 28 April 2016 08:42 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
You should no need to call standalone setup can you give more context of
that and where you are calling it


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Undo of StandaloneSetup ..? [message #1730757 is a reply to message #1730747] Thu, 28 April 2016 10:01 Go to previous messageGo to next message
Nils Kronqvist is currently offline Nils KronqvistFriend
Messages: 10
Registered: July 2009
Junior Member
Thanks for quick reply!

The dsl files are not part of an open Eclipse project, so they are not known to the Eclipse dsl support that works within a context of a IProject - right?

BUT they are part of a Eclipse project that can be loaded - and if this is done after accessing the DSL model which invoks the StandaloneSetup, the editor is "broken".
Re: Undo of StandaloneSetup ..? [message #1730758 is a reply to message #1730757] Thu, 28 April 2016 10:05 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hmm. What about spawning a separate vm

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Undo of StandaloneSetup ..? [message #1730759 is a reply to message #1730757] Thu, 28 April 2016 10:12 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Another option would be to simply load them into a project

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Undo of StandaloneSetup ..? [message #1730761 is a reply to message #1730759] Thu, 28 April 2016 10:32 Go to previous messageGo to next message
Nils Kronqvist is currently offline Nils KronqvistFriend
Messages: 10
Registered: July 2009
Junior Member
>> Another option would be to simply load them into a project

Right, that would be one solution. For end-user scenario I would like to avoid this, but an end-user should not invoke the editor so *could* have a "Development Mode" where the project with the dsl files needs to be loaded.

[Updated on: Thu, 28 April 2016 10:37]

Report message to a moderator

Re: Undo of StandaloneSetup ..? [message #1730763 is a reply to message #1730758] Thu, 28 April 2016 10:35 Go to previous message
Nils Kronqvist is currently offline Nils KronqvistFriend
Messages: 10
Registered: July 2009
Junior Member
>> Hmm. What about spawning a separate vm

Will need to refactor some code, but seems like a clean solution. Thanks for tip!

[Updated on: Thu, 28 April 2016 10:36]

Report message to a moderator

Previous Topic:Xtext eclipse plugin
Next Topic:Xtext eclipse plugin
Goto Forum:
  


Current Time: Thu Apr 18 11:51:48 GMT 2024

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

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

Back to the top