Adrian Custer wrote:
Hey Jessie,
Thanks for your answer. Some clarification.


On Mon, 2006-03-13 at 10:19 -0800, Jesse Eichar wrote:

The catalog API has a method for creating "temporary georesources" such
as a memoryDatastore.
The method is something like:
CatalogPlugin.getDefault().getLocalCatalog().createTemporaryResource( 
featureType );


Is this really recent method in ICatalog? I can't find it in 1.1M4SDK
nor on the web javadocs.
I may of been on the OWS3 branch (ie where we needed it), it may be something that we did not have time to check back in yet. Can you check the latest release? The project Richard is on may of taken the time to bring this needed functionality in (actually he asked my about icons for it so it seems likely).
2) What's the elegant/correct way to bail out of an operation if I
get to a point where something doesn't resolve or some other assertion
fails?


Make sure you close all you resources (file handlers, readers/writers
etc... ) and return.  The framework doesn't really care as long as you
clean up after yourself.
So we can bail out, even firing off exceptions, and the RCP will
continue happily? If so, is there a uDig policy on how to transmit error
messages to the user?
At a minimumL normal eclipse policy, please use the Trace/Log facilities correctly. These facilities include dialogs for nasty things...

For udig specific opperation questions:
- I would prefer if your operation had a "view" that it was going to report back errors with that any error message appear in that view instead. - If your opperation was going to create a new layer, then it would be nice to create that layer right away (ie visual feedback), and then you can report an error message using Layer. That is a red x would appear, and selecting the layer would show the message in the status bar. The fact that the layer was empty (because the operation failed) would also indicate something did not work. You can also use the layer status to indicate success, ie 1430000 features buffered from swamp_points.

Jody

You can use the enablement element of the  the operation extension
declaration to ensure that the operation will only be enabled for
certain resources.

Cool.

_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel


_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

Reply via email to