|
Re: Help identifying problem with PlugInContext.getLayerManager method...: msg#00480gis.jump.devel
Paul, I didn't realize that I need to set the plug-in context in the execute() method and not in the initialize() method. I will make that change. I wonder why I wasn't getting a null-pointer exception when my code executed. Is it because I am inside the event-dispatch thread? Thanks for the help. Landon On 9/25/07, Paul Austin <mail-lists@xxxxxxxxxxxx> wrote: > Hi Landon, > > you're using this.plugin.getPluginContext(), where did you set the > plug-in context for that plug-in, if you set it in the initialize method > then a whole bunch of things will be null. If you set it in execute then > you can be fine. > > The other option is to get a new plugin context from the > workbenchContext, there is a method there to create one. > > Have you tried running the code in the eclipse debugger? > > Paul > > > > Sunburned Surveyor wrote: > > I'm in the process of tracking down and eliminating bugs in my Super > > Select Tool. I've got a problem in the method that sets the initial > > state of the components that are part of the tool's configuration > > dialog. It seems that my code never returns from the > > PlugInContext.getLayerManager method. > > > > I know that the PlugInContext that I'm dealing with is not null, > > because I inserted some logger code and I can print the class name of > > the PlugInContext using the Object.getClass() and Class.getName() > > methods. > > > > I'm not getting any exceptions of any type when the method executes, > > it just never makes it to the subsequent statements. > > > > Here is my code snippet: > > > > /* Code Snippet */ > > PlugInContext context = this.plugIn.getPlugInContext(); > > > > logger.debug("Made it to marker 105B."); > > > > Class someClass = context.getClass(); > > String someClassName = someClass.getName(); > > > > logger.debug("The class names is: " + someClassName); > > logger.debug("Made it to Marker 105C"); > > > > LayerManager manager = context.getLayerManager(); > > > > logger.debug("Made it to marker 106."); > > > > DialogUtil.setLayerNamesAsListData(manager, jListDestinationLayer); > > > > logger.debug("Made it to marker 107."); > > /* Code Snippet */ > > > > My log file never makes it to marker 106. All of the statements before > > it execute. (The last marker in the log file is 105C.) > > > > Any ideas? I'm really running out of things to test on this one. > > > > Thanks so much for any help or suggestions. > > > > The Sunburned Surveyor > > > > ------------------------------------------------------------------------- > > 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/ > > _______________________________________________ > > Jump-pilot-devel mailing list > > Jump-pilot-devel@xxxxxxxxxxxxxxxxxxxxx > > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > > > > > ------------------------------------------------------------------------- > 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/ > _______________________________________________ > Jump-pilot-devel mailing list > Jump-pilot-devel@xxxxxxxxxxxxxxxxxxxxx > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > ------------------------------------------------------------------------- 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: DBF required in compressed shapefile: 00480, Larry Becker |
|---|---|
| Next by Date: | Re: New Open File plug-ins: 00480, Paul Austin |
| Previous by Thread: | Re: Help identifying problem with PlugInContext.getLayerManager method...i: 00480, Paul Austin |
| Next by Thread: | Clarification of Edit top-level-menu item names in English...: 00480, Sunburned Surveyor |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |