|
PlugInContext.getLayerManager returns null?: msg#00530gis.jump.devel
I'm still squishing bugs in my super select tool, and I've come upon a problem. I hope you guys can offer a suggestion that might help me fix it. In my code I need to obtain a reference to the LayerManager of the current task. I do this using the PlugInContext object passed to my PlugIn's execute() method. I know from logging statements that my PlugInContext is not null. However, it appears that the LayerManager returned by the PlugInContext.getLayerManager method is null. When the this code is executed a task in open in OpenJUMP and contains Layers, so I know the instance of LayerManager returned by the context should be valid, and not null. Am I missing another part of the picture? The Javadoc for the PlugInContext and LayerManagerProxy classes did not mention any exceptions or conditions under which a null value would be returned. Thank you for any suggestions. The Sunburned Surveyor P.S. - Here is the code snippet in question: if(this.context == null) { logger.debug("The context was null."); } LayerManager manager = this.context.getLayerManager(); .debug("Just got the layer manager."); if(manager == null) { logger.debug("The manager was null."); } The last line in the log file is "The manager was null." ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Language files - bug on Italian file: 00530, Giuseppe Aruta |
|---|---|
| Next by Date: | Re: File drag-and-drop revisited: 00530, Sunburned Surveyor |
| Previous by Thread: | Questions on undo/redo support?i: 00530, Sunburned Surveyor |
| Next by Thread: | Fwd: [Freegis-list] New version of gvSIG project now available: gvSIG 1.1 (stable): 00530, Sunburned Surveyor |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |