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

Bug 320155

Summary: Manage the property loading/setting order
Product: [Technology] XWT Reporter: Yves YANG <yves.yang>
Component: CoreAssignee: Project Inbox <e4.xwt-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Konstantin.Scheglov
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Bug Depends on:    
Bug Blocks: 307509    

Description Yves YANG CLA 2010-07-16 21:58:43 EDT
When we create an UI element, the order of the property loading/setting is mandatory.  For example, when we load a TableViewer, the "input" must be done after contentProvider and labelProvider. And the simpleSelection property can be set after "input". 

We need a generic solution to manage the property dependency.
Comment 1 Konstantin Scheglov CLA 2010-07-17 02:27:15 EDT
See also https://bugs.eclipse.org/bugs/show_bug.cgi?id=307509
Some properties should be applied after creating children.
Comment 2 Yves YANG CLA 2010-07-17 23:50:53 EDT
We should add this information in IProperty to indicate when and in which order the property should be set. 

The design is proposed as following:

enum SettingType {
   /**
    * Set property just after Widget creation. It is the default value.
    */ 
   Normal, 

   /**
    * Set property just after the complete initialization 
    * before the creation of children 
    */ 
   PostInitialization, 

   /**
    * Set property just after the creation of children 
    */ 
   PostChildren; 
}

interface ILoadingType {
   SettingType getSettingType();

   IProperty[] getDependencies();
}

interface IProperty {
    ....
    ILoadingType getLoadingType();
}
Comment 3 Yves YANG CLA 2010-07-18 01:55:26 EDT
SettingType is named as IValueLoading.

The fixed is done and committed in CVS.