Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 320155 - Manage the property loading/setting order
Summary: Manage the property loading/setting order
Status: CLOSED FIXED
Alias: None
Product: XWT
Classification: Technology
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 307509
  Show dependency tree
 
Reported: 2010-07-16 21:58 EDT by Yves YANG CLA
Modified: 2013-01-24 15:32 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.