Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Core expressions framework behaviour
Core expressions framework behaviour [message #673919] Wed, 25 May 2011 07:31 Go to next message
David  Pérez is currently offline David PérezFriend
Messages: 228
Registered: July 2009
Senior Member
One thing I have detected when I have switched to the commands framework, and used enabledment expressions is this:

I have some expressions that depend on the current selection in many views.
If the selection changes in a single view, the ISources.ACTIVE_CURRENT_SELECTION_NAME property fires as changed for ALL the views, included the ones in other perspectives, even if their selection isn't changed.

This is due to the fact that variables in the evaluation framework are considered global.

Invoking TableViewer#getSelection(), provokes refreshing the text of the columns. In some of my views it can raise an error condition. That's why I have detected this behaviour. I think just getting the current unchanged selection wouldn't need to refresh the text of the cells.

I consider this not to be very efficient.
I'm considering not to use expressions in my commands.

What do the experts think about this?

Re: Core expressions framework behaviour [message #673973 is a reply to message #673919] Wed, 25 May 2011 11:10 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

It is as you stated, fundamental to the use of expressions in 3.x. The variable state (managed by the IEvaluationService and the ISourceProviders) is global to the application.

What you can do about it really depends on where you are adding your commands. To a view dropdown menu? To a view context menu? To any context menu? To the main coolbar or main menu?


Previous Topic:Getting Linux path on Windows
Next Topic:Helios won't launch following reboot
Goto Forum:

Current Time: Wed Sep 19 20:38:31 GMT 2018

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

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

Back to the top