Thanks Larry.

I think I've come up with a solution. I'm going to give it a try and I'll
report back to the list.

The Sunburned Surveyor


On 3/29/07, Larry Becker <[EMAIL PROTECTED]> wrote:

Hi Sunburned,

  I don't have a lot of time to study your problem, but I note that there
is code in OpenJump that Stefan put in for Ole to support PIROL's image
layer renderer (a plugin, right?).  I've seen the code (just search for
"Ole" in the source), but I haven't seen how PIROL uses it.  It may be
relevant to your problem, and then again maybe not.

regards,
Larry

 On 3/28/07, Sunburned Surveyor <[EMAIL PROTECTED]> wrote:

>  I thought I would have the pluggable rendering support for OpenJUMP
> finished today, but I've hit another wall in my design. I thought I had
> overcome the problem. After I started making the modifications for my
> solution I realized I 'm still going to be hosed.
>
> I really need some help to come up with the best alternate solution.
> Here is the problem:
>
> OpenJUMP creates Task objects. Task objects create LayerManager objects.
> LayerManager objects create RenderingManager objects. In my pluggable
> rendering system, RenderingManager objects create RendererFactory objects.
>
> OpenJUMP can create a task at any time, and always does so after plug-in
> intialization. I'm trying to find a way to allow developers to add tools for
> the RendererFactory that produce custom renderers. I tried storing a
> collection of these tools in the JUMPWorkbenchContext, but I realize now
> that the RenderingFactory has no way to get to this collection. It needs
> access to the tools contributed with plug-ins when it is created by the
> RenderingManager.
>
> To make matters worse, a Task takes a no-parameter constructor so that
> it can be created by Java2XML. This means that I can't pass a reference to
> the JUMPWorkbench object down the chain to the RendererFactory so that it
> can access the tools stored in the collection.
>
> I don't see a way around this. It seems there is no where I can put the
> collection of tools that will allow [1] plug-in developers to add their tool
> during plug-in initialization and [2] that will be accessible by the
> RendererFactory objects for each task.
>
> The only way to solve this may be to parse a text file indicating the
> name of each class that implements the RendererFactoryTool interface. When a
> RendererFacotry is created I can parse this list and create an implemenation
> of each class it contains. I'll then add these objects to the
> RendererFactory. I think the classes can still be loaded during the normal
> plug-in intialization process.
>
> Is there a better solution than this? I hate to add the requirement for
> an external file, but I don't know how to get around this.
>
> Thanks for the help.
>
> The Sunburned Surveyor
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
>
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
>


--
http://amusingprogrammer.blogspot.com/
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to