Re: [SrcML] new plugin handling and API structure
Status: Beta
Brought to you by:
crashchaos
From: Frank R. <fra...@in...> - 2005-04-21 17:40:06
|
On Thu, Apr 21, 2005 at 07:09:46PM +0200, Dennis Waldherr wrote: > I'm not worrying of runtime speed, I just want to make sure that it will > be clear that the topologic sort will not change order of API plugins. Now what is the 'order' of API plugins? Let's say we have a simple dependency on one other plugin. Then this dependency plugin will be the first to be loaded. Therefore its dependencies will recursively be loaded before the dependency plugin itself is loaded. The last one to load is the actual plugin we wanted to load. Now if we consider the possibility of influencing the order by the order in which the dependency plugins are listed in plugin.xml (by adding the corresponding edges to the dependency tree), the plugin developer basically has free choice over the first depth level of the tree. I don't know whether you really plan on giving a plugin developer the ability to define the order in which dependencies of dependencies are resolved? If not I think this approach should be pretty good for us already. > Of course it would be confusion to iterate a transformation upon a tree. > My intend was to allow for different APIs to be used for the first > transformation from xml to API. If the API was fixed after loading one > could not write a application which handles different languages - unless > he restarts his own program or uses multiple java instances. Ok. So we have been talking about two different things here. I never intended to enforce a program restart in order to load another document with another API. My idea was to prepare the match table just before the SrcML class is instantiated for a document. Then for another document there'd be a method to reset the match table and prepare a new one for the new document. So for me this match table is only important while instantiating the SrcML class and modifications to it do not affect existing DOM trees (which should remain unchanged to avoid confusion). So to sum it up from my point of view: - new document takes a new match table - only one match table per document -- Raiser, Frank Student @ University of Ulm (www.uni-ulm.de) Ever tried. Ever failed. No matter. Try again. Fail again. Fail better. (Samuel Beckett) |