Skip to main content


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.Friend
Messages: 60
Registered: May 2010
Location: Christchurch (NZ)
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 KoehnleinFriend
Messages: 760
Registered: July 2009
Location: Hamburg
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


---
Get professional support from the Xtext committers at www.typefox.io
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.Friend
Messages: 60
Registered: May 2010
Location: Christchurch (NZ)
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 GutuFriend
Messages: 45
Registered: July 2013
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 DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
null verification is a simple null check at the place that will cause the npe

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Correct way to build with xtext?
Next Topic:Verifying the correctness of Xtext compiler
Goto Forum:
  


Current Time: Thu Apr 25 04:57:59 GMT 2024

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

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

Back to the top