Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Avoid outline refresh while editing file
icon5.gif  Avoid outline refresh while editing file [message #1061830] Tue, 04 June 2013 09:46 Go to next message
Fabian G. is currently offline Fabian G.
Messages: 48
Registered: May 2010
Location: Namur (Belgium)
Member
Hi All,

I was wondering if there is a possibility to avoid refreshing the outline while editing a dsl file (only when saving a file would even be acceptable in my case).

I customised a bit the outline and at some point, while editing the file, some references can be null (so NullPointer are raised). Instead of putting try/catch or null-verifications almost everywhere, I wonder if there is a way to limit the refresh-rate.

thanks in advance,
Fabian
Re: Avoid outline refresh while editing file [message #1061849 is a reply to message #1061830] Tue, 04 June 2013 11:19 Go to previous messageGo to next message
Jan Koehnlein is currently offline Jan Koehnlein
Messages: 656
Registered: July 2009
Senior Member
I'd rather go for the null-verification approach. It's the UI engineer's
life to deal with broken models. And it is also what your users expect.

The update is based on the IXtextModelListener and you'd have to build
your own update mechanism instead. But if you want to anyway, finding
the callers of OutlinePage.refreshViewer(...) could be a good start.

Am 04.06.13 11:46, schrieb Fabian G.:
> Hi All,
>
> I was wondering if there is a possibility to avoid refreshing the
> outline while editing a dsl file (only when saving a file would even be
> acceptable in my case).
>
> I customised a bit the outline and at some point, while editing the
> file, some references can be null (so NullPointer are raised). Instead
> of putting try/catch or null-verifications almost everywhere, I wonder
> if there is a way to limit the refresh-rate.
>
> thanks in advance, Fabian


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: Avoid outline refresh while editing file [message #1061856 is a reply to message #1061849] Tue, 04 June 2013 11:45 Go to previous messageGo to next message
Fabian G. is currently offline Fabian G.
Messages: 48
Registered: May 2010
Location: Namur (Belgium)
Member
Ok, thanks for you reply. I go for the null-verification then.
cheers,
Fabian
Re: Avoid outline refresh while editing file [message #1410649 is a reply to message #1061849] Thu, 21 August 2014 09:43 Go to previous messageGo to next message
Lidia Gutu is currently offline Lidia Gutu
Messages: 9
Registered: July 2013
Junior Member
Hello,
Could you please provide some hint how I should implement 'null-verification' approach. I am also trying to avoid refreshing the outline view, while I am typing. Thank you in advance
Re: Avoid outline refresh while editing file [message #1410669 is a reply to message #1410649] Thu, 21 August 2014 10:51 Go to previous message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6388
Registered: July 2009
Senior Member
null verification is a simple null check at the place that will cause the npe
Previous Topic:Correct way to build with xtext?
Next Topic:Verifying the correctness of Xtext compiler
Goto Forum:
  


Current Time: Sat Oct 25 22:13:55 GMT 2014

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

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