Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 375264 - E4 Contacts Demo's theme toolbars and menus grow after each execution
Summary: E4 Contacts Demo's theme toolbars and menus grow after each execution
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 4.2 M7   Edit
Assignee: Oleg Besedin CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-24 21:15 EDT by Brian de Alwis CLA
Modified: 2012-06-11 09:38 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian de Alwis CLA 2012-03-24 21:15:21 EDT
The E4 Contacts demo (org.eclipse.e4.demo.contacts) seems to have manifested new behaviour where the theme-related toolbar sections and theme menus multiply after each execution.  Either this wasn't happening before or I really need to have my eyes checked!
Comment 1 Brian de Alwis CLA 2012-03-25 14:13:00 EDT

*** This bug has been marked as a duplicate of bug 375269 ***
Comment 2 Brian de Alwis CLA 2012-03-25 14:14:30 EDT
I take that back — the E4 Contacts issue is from programmatically-generated duplicates.  The contacts demo should be checking and removing old items.
Comment 3 Oleg Besedin CLA 2012-03-26 10:23:09 EDT
When we were using deltas the changes made by the model processors were done before delta recording started and therefore were not stored and had to be repeated on every startup.

There are multiple ways of checking if processing is needed, I modified contacts demo to "tag" the application to specify if it has done the processing. 

In general, the question of when should the model processors be run did not get enough attention, hopefully we can get that improved in 4.3.

Git reference:

http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=1db853b1f3d85838a00b9f813e7a380bab388959
Comment 4 Oleg Besedin CLA 2012-05-01 11:47:17 EDT
Verified using I20120430-1800.
Comment 5 Kai Toedter CLA 2012-06-11 02:33:50 EDT
@Oleg, Thanks for doing that.
I suggest that we add a marker to the extension point to indicate if the processor should be run after every startup, or only once (first startup).

What do you think?
Comment 6 Paul Webster CLA 2012-06-11 08:30:58 EDT
We are going to revisit this in 4.3.  The current thinking is that we might use a pattern for processors and addons where they can tag the model when they run.  They could store and check a version in application.getPersistedState(), maybe ("com.example.ProcessorClass.version", "01")  That would allow the processor to see if it should be run, and would also allow processors to know if they need to upgrade their processing to accommodate model changes or functional changes (like moving to "02").

PW
Comment 7 Oleg Besedin CLA 2012-06-11 09:38:10 EDT
(In reply to comment #5)
> I suggest that we add a marker to the extension point to indicate if the
> processor should be run after every startup, or only once (first startup).

Yes, I am thinking about doing something along those lines.

As Paul noted, it will likely have some version number or hash code for the processor.