From: SourceForge.net <no...@so...> - 2006-01-12 03:49:29
|
Bugs item #1283149, was opened at 2005-09-06 10:20 Message generated for change (Comment added) made by soulcatcher You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=384719&aid=1283149&group_id=25576 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Other Group: None Status: Open Resolution: None Priority: 7 Submitted By: Devon Jones (soulcatcher) >Assigned to: Nobody/Anonymous (nobody) Summary: create FollowerToken Initial Comment: in pcgen.io.ExportHandler, look for the comment: //DJ: Create pcgen.io.exportTokens.FollowerToken you are goign to want to move the code inside that if block, and the method replaceTokenFollowers to a new class: plugins.exporttokens.FollowerToken look at the other Tokens to see how this class should stylistically be coded. finally, add an entry to create the jar for this class in build.xml ---------------------------------------------------------------------- >Comment By: Devon Jones (soulcatcher) Date: 2006-01-11 20:49 Message: Logged In: YES user_id=107647 all of em have to go eventually. th egoal is to have all tokens done by the end of 5.9 that can be done without to much hardship. next cycle we'll get the real evil ones (weeee) ---------------------------------------------------------------------- Comment By: Martijn Verburg (karianna) Date: 2005-10-12 10:07 Message: Logged In: YES user_id=252169 Hmm, some extra thoughts, logically the FOLLOWERTYPE and FOLLOWER tokens don't seem to return tokens directly themselves, they just call on replaceToken to get out whatever is attached to them. These two might not be a candidate for refactoring out to their own class in that case (although FOLLOWERLIST can happily be extracted). - K ---------------------------------------------------------------------- Comment By: Martijn Verburg (karianna) Date: 2005-10-12 09:58 Message: Logged In: YES user_id=252169 Hi Devon, I've had a first go at this, and I have a potential issues. In the original ExportHandler code for FOLLOWERTYPE and FOLLOWER tokens the code goes as follows: ExportHandler.replaceToken() calls ExportHandler.replaceFollowerToken() calls ExportHandler.replaceToken() // Call back to parent! So if I pull out the code, then I'm dealing with: ExportHandler.replaceToken() calls FollowerToken.getToken() callsExportHandler.replaceToken() -- Circulur reference! Something I assume we want to avoid.... Karianna <I should've known the first few bug fixes were too easy> ---------------------------------------------------------------------- Comment By: Martijn Verburg (karianna) Date: 2005-10-07 05:39 Message: Logged In: YES user_id=252169 Sorry should've explained better, I meant the below but of course moving the replaceTokenFollowers code to the new FollowerToken clas, I'll have a go at this next week. - K ---------------------------------------------------------------------- Comment By: Devon Jones (soulcatcher) Date: 2005-10-06 10:00 Message: Logged In: YES user_id=107647 No, all of these dont exist as tokens. They need to be ripped out of the ExportHandler file, put into a token in plugins.exporttokens, and then added to build.xml for jarring ---------------------------------------------------------------------- Comment By: Martijn Verburg (karianna) Date: 2005-10-06 09:41 Message: Logged In: YES user_id=252169 Are you expecting this to go from: //TODO:DJ: Create pcgen.io.exportTokens.FollowerToken else if (aString.startsWith("FOLLOWER")) { replaceTokenFollowers(aString, output, aPC); } To this?: //Call pcgen.io.exportTokens.FollowerToken else if (aString.startsWith("FOLLOWER")) { FollowerToken.replaceTokenFollowers(aString, output, aPC); } If it's a simple refactor I can rip through these :-) K ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=384719&aid=1283149&group_id=25576 |