Yes, I put a new ResourceLoaderWrapper in my module. It tries to load the images, and if it cannot, it calls the original ResouceLoader.
I'll try to send the code, but I can't until thursday. Anyway, I'll add too an issue of the registerLocation enhancement. Hope this clarifies more, but anyway I'll try to send you the code. Cheers On Dec 5, 2007 3:26 PM, sim9739 <[EMAIL PROTECTED]> wrote: > > Hi Christian, > > Thanks for your suggestion. > Can you explain it in more detail? I am not quite get it. So is it you have > your Resource Loader inside your module? > Thanks a lot. > > Sim > > > > Christian López Espínola wrote: > > > > Hi Sim, > > > > I have done this before some years ago. I used a new ResourceLoader > > that wrapped the argouml one, and managed the images from the module > > itself. I have not the code in from of me, I could try to search it > > soon. > > > > Anyway, the registerLocation method is a nice suggestion that we can > > try to implement. > > > > Hope this helps. > > > > On Dec 5, 2007 12:56 PM, sim9739 <[EMAIL PROTECTED]> wrote: > >> > >> Hi Bob, > >> > >> I figured out why it throws null pointer exception. > >> Since i put the jar file of my module in ArgoUML_0.24/ext which contains > >> all > >> extend module and ArgoUML_0.24 is downloaded from argouml.tigris.org. > >> So when my module image need to load, the program cannot read the image > >> in > >> my module jar file. > >> since the ResourceLoaderWrapper didn't add resource location of all my > >> images. I figure out ResourceLoader in org.argouml.application.helpers > >> provide a method addResourceLocation which i can use to fix my > >> problem.However, ResourceLoader is private. So, i cannot user this method > >> in > >> my module. > >> But i don't want to change any source code of Argouml. > >> So, Are there any way to use the method in ResourceLoader withour > >> changing > >> the source code which downloaded from argouml.tigris.org/recompile > >> everything before running ? > >> All i want is to produce a jar file of my module and put in ext file. so > >> when i type java -jar argouml.jar , the program can read my extend module > >> in > >> ext. > >> > >> Thanks a lot. > >> > >> Sim > >> > >> > >> > >> Bob Tarling wrote: > >> > > >> > Are you able to supply a copy of your project so I can debug this? > >> > > >> > Or at lease a small prject that demonstrates the same problem. Maybe > >> > just the action with the icon. > >> > > >> > Bob. > >> > > >> > > >> > On 02/12/2007, sim9739 <[EMAIL PROTECTED]> wrote: > >> >> > >> >> Hi Bob, > >> >> > >> >> All my icon images is 16x16. and i put under > >> org/argouml/mymodule/Images. > >> >> Thanks. > >> >> > >> >> Sim > >> >> > >> >> > >> >> Bob Tarling wrote: > >> >> > > >> >> > I spotted something in the toolbar project the other day that I > >> think > >> >> > may explain some oddities we've had in the past. > >> >> > > >> >> > Make sure that you have an icon for your button and that icon is > >> 16x16 > >> >> > pixels. > >> >> > > >> >> > Let me know if that resolves it. > >> >> > > >> >> > Bob. > >> >> > > >> >> > On 02/12/2007, sim9739 <[EMAIL PROTECTED]> wrote: > >> >> >> > >> >> >> Hi Bob, > >> >> >> > >> >> >> It did add some buttons to toolbar. When i click the button, it > >> throws > >> >> >> null > >> >> >> pointer exception. Why it throws exception? I saw some posts in > >> other > >> >> >> forum. > >> >> >> Some people are having the same problem as me. But no one can fix > >> it. > >> >> My > >> >> >> extend module works fine if it run in eclipse. but i still want to > >> >> know > >> >> >> why > >> >> >> it throws null pointer exception when running in terminal but it > >> works > >> >> >> fine > >> >> >> in eclipse. > >> >> >> Thanks. > >> >> >> > >> >> >> Sim > >> >> >> > >> >> >> Bob Tarling wrote: > >> >> >> > > >> >> >> > Does the module in question add an buttons to the toolbar? > >> >> >> > > >> >> >> > Bob. > >> >> >> > > >> >> >> > On 02/12/2007, Christian López Espínola <[EMAIL PROTECTED]> > >> >> wrote: > >> >> >> >> Hi, > >> >> >> >> > >> >> >> >> Without any source code its difficult too debug this, but in > >> >> >> >> DecoratedIcon constructo the only param is the icon. Are you > >> >> passing a > >> >> >> >> null icon? Have you assured that is correctly created? > >> >> >> >> > >> >> >> >> Hope this helps. > >> >> >> >> > >> >> >> >> > >> >> >> >> On 12/2/07, sim9739 <[EMAIL PROTECTED]> wrote: > >> >> >> >> > > >> >> >> >> > Hi all, > >> >> >> >> > > >> >> >> >> > I am currently developing an extend module of argouml. now, i > >> >> have a > >> >> >> >> jar > >> >> >> >> > file which is the module that i created. This jar file is > >> placed > >> >> in > >> >> >> ext > >> >> >> >> > folder which i followed the steps in argouml cookbook. Then i > >> run > >> >> >> >> arouml by > >> >> >> >> > typing "java -jar argoum.jar" in terminal. When i click the > >> >> button > >> >> >> that > >> >> >> >> from > >> >> >> >> > the module that i created, the null pointer exception is > >> thrown. > >> >> Can > >> >> >> >> anyone > >> >> >> >> > tell me how to fix that problem and why it occurs? > >> >> >> >> > java.lang.NullPointerException > >> >> >> >> > at > >> >> org.tigris.toolbar.toolbutton.DecoratedIcon.init(Unknown > >> >> >> >> Source) > >> >> >> >> > at > >> >> org.tigris.toolbar.toolbutton.DropDownIcon.<init>(Unknown > >> >> >> >> Source) > >> >> >> >> > at > >> >> >> >> > > >> >> org.tigris.toolbar.toolbutton.PopupToolBoxButton.setAction(Unknown > >> >> >> >> Source) > >> >> >> >> > at javax.swing.JButton.<init>(JButton.java:89) > >> >> >> >> > at > >> >> org.tigris.toolbar.toolbutton.ToolButton.<init>(Unknown > >> >> >> >> Source) > >> >> >> >> > at > >> >> >> >> org.tigris.toolbar.toolbutton.PopupToolBoxButton.<init>(Unknown > >> >> >> >> > Source) > >> >> >> >> > at > >> >> >> >> > >> org.tigris.toolbar.ToolBarFactory.buildPopupToolBoxButton(Unknown > >> >> >> >> > Source) > >> >> >> >> > at > >> >> >> org.tigris.toolbar.ToolBarFactory.addItemToToolBar(Unknown > >> >> >> >> > Source) > >> >> >> >> > at > >> >> >> org.tigris.toolbar.ToolBarFactory.addItemsToToolBar(Unknown > >> >> >> >> > Source) > >> >> >> >> > at > >> >> org.tigris.toolbar.ToolBarFactory.createToolBar(Unknown > >> >> >> >> Source) > >> >> >> >> > at > >> >> org.tigris.toolbar.ToolBarFactory.createToolBar(Unknown > >> >> >> >> Source) > >> >> >> >> > at > >> >> >> >> > > >> >> >> > >> org.argouml.uml.diagram.ui.UMLDiagram.initToolBar(UMLDiagram.java:309) > >> >> >> >> > at > >> >> >> >> > > >> >> >> > >> org.argouml.uml.diagram.ui.UMLDiagram.getJToolBar(UMLDiagram.java:298) > >> >> >> >> > at > >> >> >> >> > > >> >> org.argouml.uml.diagram.ui.TabDiagram.setTarget(TabDiagram.java:186) > >> >> >> >> > at > >> >> >> >> > > >> >> org.argouml.uml.diagram.ui.TabDiagram.targetSet(TabDiagram.java:365) > >> >> >> >> > at > >> >> >> >> > > >> >> >> >> > >> >> >> > >> >> > >> org.argouml.ui.targetmanager.TargetManager.fireTargetSet(TargetManager.java:767) > >> >> >> >> > at > >> >> >> >> > > >> >> >> >> > >> >> >> > >> >> > >> org.argouml.ui.targetmanager.TargetManager.internalOnSetTarget(TargetManager.java:474) > >> >> >> >> > at > >> >> >> >> > > >> >> >> >> > >> >> >> > >> >> > >> org.argouml.ui.targetmanager.TargetManager.setTarget(TargetManager.java:456) > >> >> >> >> > at > >> >> >> >> > > >> >> >> >> > >> >> >> > >> >> > >> org.argouml.uml.ui.ActionAddDiagram.actionPerformed(ActionAddDiagram.java:85) > >> >> >> >> > at > >> >> >> >> > > >> >> >> >> > >> >> >> > >> >> > >> javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1882) > >> >> >> >> > at > >> >> >> >> > > >> >> >> >> > >> >> >> > >> >> > >> javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2202) > >> >> >> >> > at > >> >> >> >> > > >> >> >> >> > >> >> >> > >> >> > >> javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) > >> >> >> >> > at > >> >> >> >> > > >> >> >> > >> javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) > >> >> >> >> > at > >> >> >> javax.swing.AbstractButton.doClick(AbstractButton.java:334) > >> >> >> >> > at > >> >> >> >> > >> apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:104) > >> >> >> >> > at > >> >> java.awt.MenuItem.processActionEvent(MenuItem.java:597) > >> >> >> >> > at java.awt.MenuItem.processEvent(MenuItem.java:556) > >> >> >> >> > at > >> >> >> >> java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:298) > >> >> >> >> > at > >> >> >> java.awt.MenuComponent.dispatchEvent(MenuComponent.java:286) > >> >> >> >> > at > >> java.awt.EventQueue.dispatchEvent(EventQueue.java:466) > >> >> >> >> > at > >> >> >> >> > > >> >> >> >> > >> >> >> > >> >> > >> java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269) > >> >> >> >> > at > >> >> >> >> > > >> >> >> >> > >> >> >> > >> >> > >> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190) > >> >> >> >> > at > >> >> >> >> > > >> >> >> > >> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184) > >> >> >> >> > at > >> >> >> >> > > >> >> >> > >> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176) > >> >> >> >> > at > >> >> >> >> java.awt.EventDispatchThread.run(EventDispatchThread.java:110) > >> >> >> >> > > >> >> >> >> > > >> >> >> >> > Thanks a lot!!! > >> >> >> >> > > >> >> >> >> > Sim > >> >> >> >> > -- > >> >> >> >> > View this message in context: > >> >> >> >> > >> >> >> > >> >> > >> http://www.nabble.com/Please-help%7E%7EImplement-an-extend-module-of-argouml-tf4932090.html#a14116654 > >> >> >> >> > Sent from the argouml - dev mailing list archive at > >> Nabble.com. > >> >> >> >> > > >> >> >> >> > > >> >> >> > >> --------------------------------------------------------------------- > >> >> >> >> > To unsubscribe, e-mail: [EMAIL PROTECTED] > >> >> >> >> > For additional commands, e-mail: [EMAIL PROTECTED] > >> >> >> >> > > >> >> >> >> > > >> >> >> >> > >> >> >> >> > >> >> >> >> -- > >> >> >> >> Regards, > >> >> >> >> > >> >> >> >> Christian López Espínola > >> >> >> >> > >> >> >> > > >> >> >> > > >> >> --------------------------------------------------------------------- > >> >> >> > To unsubscribe, e-mail: [EMAIL PROTECTED] > >> >> >> > For additional commands, e-mail: [EMAIL PROTECTED] > >> >> >> > > >> >> >> > > >> >> >> > > >> >> >> > >> >> >> -- > >> >> >> View this message in context: > >> >> >> > >> >> > >> http://www.nabble.com/Please-help%7E%7EImplement-an-extend-module-of-argouml-tf4932090.html#a14120278 > >> >> >> Sent from the argouml - dev mailing list archive at Nabble.com. > >> >> >> > >> >> >> > >> --------------------------------------------------------------------- > >> >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> >> >> For additional commands, e-mail: [EMAIL PROTECTED] > >> >> >> > >> >> >> > >> >> > > >> >> > > >> --------------------------------------------------------------------- > >> >> > To unsubscribe, e-mail: [EMAIL PROTECTED] > >> >> > For additional commands, e-mail: [EMAIL PROTECTED] > >> >> > > >> >> > > >> >> > > >> >> > >> >> -- > >> >> View this message in context: > >> >> > >> http://www.nabble.com/Please-help%7E%7EImplement-an-extend-module-of-argouml-tf4932090.html#a14120520 > >> >> Sent from the argouml - dev mailing list archive at Nabble.com. > >> >> > >> >> --------------------------------------------------------------------- > >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> >> For additional commands, e-mail: [EMAIL PROTECTED] > >> >> > >> >> > >> > > >> > --------------------------------------------------------------------- > >> > To unsubscribe, e-mail: [EMAIL PROTECTED] > >> > For additional commands, e-mail: [EMAIL PROTECTED] > >> > > >> > > >> > > >> > >> -- > >> View this message in context: > >> http://www.nabble.com/Please-help%7E%7EImplement-an-extend-module-of-argouml-tf4932090.html#a14170103 > >> > >> Sent from the argouml - dev mailing list archive at Nabble.com. > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > > > > > -- > > Regards, > > > > Christian López Espínola > > > > > > -- > View this message in context: > http://www.nabble.com/Please-help%7E%7EImplement-an-extend-module-of-argouml-tf4932090.html#a14172454 > > Sent from the argouml - dev mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Regards, Christian López Espínola
