Hi Kasper, VE creates a model of a Bean (ULC widgets) class in memory. Various adapters are set on the model so that the bean model can interact with various views such as graphical, tree, proxy VM, property sheet etc. These adapter classes are specified in the override class for that bean. Moreover additional attributes like parent-child relationships which do not have set/get methods are also specified in the bean's override file.
The override processing takes into account the inheritance hierarchy such that adapters for the parent class are inherited by the child class unless the child overrides them in its own override file. In VE sources see BeaninfoClassAdapter.applyExtensionDocument method. The Bean model with override applied to it is cached. So if you make changes to override and run VE, you may not see any effect. Therefore, after making changes to override and before running VE you should clean up the cache dirs of: runtime-workspace\.metadata\.plugins\org.eclipse.jem.beaninfo runtime-workspace\.metadata\.plugins\org.eclipse.core.resources\.projects\<y our ulc project>\org.eclipse.jem.beaninfo runtime-workspace\.metadata\.plugins\org.eclipse.core.resources\.projects\<y our ulc project>\org.eclipse.ve.java.core >Is it possible to override the ULCComponent.override file in our own >plugin (i.e. by specifying a copy of it and simply redefine the >PropertySourceAdapter attribute)? I tried to do so, but did not succeed. >Do I have to tell the Eclipse VE somehow that my plug-in also provides >override files? Well the VE picks up the override file for a bean from the plugin's override directory and within that follows the package dir structure. You could try the following: In your plugin create an override dir and within that com/ulcjava/base/application/ULCComponent.override Then you can specify your own PropertySourceAdapter class there. I tried such a thing for ULCButton (specifying a different initial ULCButton text) and it seemed to work. (BTW, I will ask on VE dev list about how does the VE select an override file in case two are present one in the parent plugin and one in the plugin that extends the parent plugin). Aside: ----- Be warned that the override format will change with VE 1.2. About the property source adapter: --------------------------------- ULCComponentPropertySourceAdapter does filtering for the property "containment". It shows this property in the propertysheet only if the component is contained in a container that has some containement parameters (like boxpane, gridbaglayoutpane, borderlayoutpane). Moreover, please refer to the following documents for more information: Please see: http://www.eclipse.org/vep/WebContent/docs/doc.html Extending Eclipe VE: http://www.eclipse.org/articles/Article-VE-Custom-Widget/customwidget.html How ULC VE extended Eclipse VE: http://www.eclipse.org/vep/WebContent/docs/VEpapers/ulc.pdf I am interested in knowing in what way are you extending ULC VE? I will be grateful if you can share the details. I saw your posting on the ve-dev list about JET templates. Did you make any progress there? I hope this helps. Thanks and regards, Janak >-----Original Message----- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] Behalf Of Kaspar von >Gunten >Sent: Wednesday, October 04, 2006 6:17 PM >To: [email protected] >Subject: [ULC-developer] Redefining .override files > > >Hi Janak > >We extend/adapt the ULC-VE for our own needs in our product. For this >reason we've created an own plugin which extends the Eclipse VE much as >the ULC VE does (the ULC VE is still around obviously and our plug-in >depends on it). > >We would now like to play around with .override files. Is it possible >that we override the settings of the ULC VE in some way? I would, e.g., >like to define an own PropertySourceAdapter (which extends the >ULCComponentPropertySourceAdapter) and set it for all Objects of type >ULCComponent. > >Is it possible to override the ULCComponent.override file in our own >plugin (i.e. by specifying a copy of it and simply redefine the >PropertySourceAdapter attribute)? I tried to do so, but did not succeed. >Do I have to tell the Eclipse VE somehow that my plug-in also provides >override files? > >What is in general the policy one has to follow, when we define our own >.override files? >I'd be glad for some insight. > >Thanks, >Kaspar >_______________________________________________ >ULC-developer mailing list >[email protected] >http://lists.canoo.com/mailman/listinfo/ulc-developer _______________________________________________ ULC-developer mailing list [email protected] http://lists.canoo.com/mailman/listinfo/ulc-developer
