Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 274285

Summary: [Contributions] [expressions] Expressions not re-evaluated when SourceProviders instatiated
Product: [Eclipse Project] Platform Reporter: Stefan Stern <stern.s>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: RESOLVED DUPLICATE QA Contact: Paul Webster <pwebster>
Severity: normal    
Priority: P3    
Version: 4.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Stefan Stern CLA 2009-04-29 07:47:06 EDT
Build ID: M20080911-1700 (3.4.1)

Steps To Reproduce:
Follow the problem discussed here: 
http://dev.eclipse.org/newslists/news.eclipse.platform/msg77898.html

Here, we use activities to hide some UI. Usually, this UI will not become visible later on. Only in rare cases, this UI is activated. Now, the scenario is pretty close to the discussion in the newsgroup. The expression is evaluated while the source providers are not instantiated. Later, the source providers are available, but the expression controlling the Activity is already evaluated (the variable wasn't found) and there is no re-evaluation as now all information required is available.

Usually, the evaluation of any expressions requiring variables should be defered until the source providers are available. Anything else is a waste of (startup-)time. Maybe someone can find a way to work around this. For now we have to do some workaround (trigger the re-evaluation manually or using properties instead which are added to the INI file). 

If you require more information, let me know.
Comment 1 Paul Webster CLA 2009-04-29 08:40:37 EDT
Yes, please provide a code path that shows your usecase.  A small example plugin with an activity and a source provider, so the behaviour is clear.

When is the source provider not available?  When is it added and events not fired?

PW
Comment 2 Stefan Stern CLA 2009-04-29 10:35:42 EDT
Hi

I just built an example, with 3.5M6, where I wasn't able to reproduce the problem. Browsing the source, I found the fix, delivered to class 'org.eclipse.ui.internal.services.ExpressionAuthority', linked with bug 248733, which was created in consequence of the discussion I linked above. 

When looking for a bug created on that discussion, unfortunately I didn't find bug 248733. So, this one is obsolete.

Sorry for the inconvenience. 

*** This bug has been marked as a duplicate of bug 248733 ***
Comment 3 Paul Webster CLA 2009-04-29 10:40:44 EDT
(In reply to comment #2)
> 
> Sorry for the inconvenience. 

No inconvenience, thanx for the update.

PW