Werner- Well... I've actually been avoiding the SourceGenerator stuff because to be honest, I don't have a freakin' clue what's going on in there (i.e. I don't even have user-level experience). It's something I want to pick up eventually, but I had other things higher on the priority list.
Stephen On 3/10/06, Werner Guttmann <[EMAIL PROTECTED]> wrote: > Barbara, > > well, thank you in advance then .. ;-). > > With regards to your question about instructions for building a unified > patch, please have a look at > > http://castor.org/how-to-prepare-a-patch.html > > which has detailed instructions on HOW TO build a patch from a command > line window. > > Basically, I am asking you to build a diff against the latest code in > the CVS repository, using one or two special options on the cvs diff > command as shown in above HOW-TO. > > In case you are using an IDE like e.g. Eclipse, it's even easier as > Eclipse (as well as other IDEs) has sophisticated support for > building/applying patches. > > Regards > Werner > > PS I hope that somebody else will be picking up your comments on the > InfoFactory properties ... maybe Stephen (hint, hint .. ;-)). > > Barbara Prechtl wrote: > > Werner, > > > > No problem at all... I owe it to you, castor has been very useful to our > > project. > > > > Are the instructions for a unified patch on the web site? I am rather > > new to castor... So I am not familiar with your patching system.... > > > > Also there are other properties in the infoFactory that are not set > > anywhere... Not sure if someone should take a look at them as well. > > > > > > Barbara > > > > -----Original Message----- > > From: Werner Guttmann (JIRA) [mailto:[EMAIL PROTECTED] > > Sent: Friday, March 10, 2006 3:27 AM > > To: Prechtl, Barbara [VMMH:RP21:EXCH] > > Subject: [jira] Commented: (CASTOR-1346) notifyPropertyChangeListeners > > not called when bound properties is set true. > > > > > > [ > > http://jira.codehaus.org/browse/CASTOR-1346?page=comments#action_60625 ] > > > > > > Werner Guttmann commented on CASTOR-1346: > > ----------------------------------------- > > > > Barbara, as you have done the investigation already, and seemed to have > > come up wirth a working solution, could you (pretty) please attach a > > unified patch ? > > > >> notifyPropertyChangeListeners not called when bound properties is set > >> true. > >> > > ------------------------------------------------------------------------ > > --- > >> Key: CASTOR-1346 > >> URL: http://jira.codehaus.org/browse/CASTOR-1346 > >> Project: castor > >> Type: Bug > > > >> Components: XML source generator > >> Versions: 1.0 M2, 1.0 M3 > >> Environment: Using with Eclipse on Win XP and Win 2000 > >> Reporter: Barbara Prechtl > >> Fix For: 1.0 M4 > > > >> > >> SourceGenerator sgen = new SourceGenerator(); > >> sgen.setDefaultProperties(props.getPropTable().getTable()); > >> sgen.generateSource(schema, pkgName); > >> When using the source generator in the above manner and having the > >> property table with the setting for > >> org.exolab.castor.builder.boundproperties=true. The > > notifyPropertyChangeListener code is not added to the setter methods of > > the generated code. I steped throught the code to find two problems: > >> 1) In the source generator on line 305 : _sourceFactory = new > > SourceFactory(this, _infoFactory); > >> This is in the constructor and the property values have not been > > changed. I commented out this line and added the following at the start > > of generateSource: > >> if (_sourceFactory == null) > >> _sourceFactory = new SourceFactory(this, _infoFactory); > >> at this point the properties have been set by the call to > > setDefaultProperties so _sourceFactory has access to them. > >> 2) The above was not enough to fix the problem I had to also change > > the SourceFactory at line 194 by adding the following to set the bound > > property of the infoFactory (after it was created). > >> infoFactory.setBoundProperties(config.boundPropertiesEnabled()); > >> Not sure what other properties are missing from the infoFactory.... so > > this might want to be investigated more. > >> After doing the above, my classes were generated correctly. The > > setters call the notify listeners. > >> Please let me know if you need any additional information. > > > > > ------------------------------------------------- > If you wish to unsubscribe from this list, please > send an empty message to the following address: > > [EMAIL PROTECTED] > ------------------------------------------------- > >

