Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] uDig GSoC / weekly report

Hi Davide,
I pasted some code here: http://pastebin.com/xvbarTRD

Consider that JGrassMapsetGeoResource is what you have inside the
service, so I guess that is also what you want to add/remove to
refresh the service properly wihtou resetting and therefore closing
the item.

As you correctly assumed it uses IResolveDelta. Let me know if the
snippet helps you out, else I will have to clean it up. I am a bit on
a rush now.

Ciao
Andrea




On Wed, Jun 16, 2010 at 1:33 AM, Davide <davide.savazzi@xxxxxxxxx> wrote:
> On Wed, Jun 16, 2010 at 01:19, Davide <davide.savazzi@xxxxxxxxx> wrote:
>> 1) What did I do last week
>>
>> - created a wizard to import shapefiles in neo4j-spatial
>
> After shapefiles have been imported I need to refresh the GeoResources
> of my Neo4j Service in the Catalog view.
> I've created an operation 'Refresh' that cleans the Service cache but
> nothing happens until I use also the 'Reset' operation.
>
> I need to either listen to a Reset event and clean the Service cache
> or call the Reset operation inside my Refresh.
> Do you have any suggestion?
>
> I've tried also the following method inside my Service, but it doesn't
> work (no UI refresh):
>
>    private void fireChangeEvent(IProgressMonitor monitor) {
>        IResolveDelta delta = new ResolveDelta(this,
> IResolveDelta.Kind.CHANGED);
>        ResolveChangeEvent event = new ResolveChangeEvent(this,
> IResolveChangeEvent.Type.POST_CHANGE, delta);
>
>        ICatalog catalog = parent(monitor);
>        if (catalog instanceof CatalogImpl) {
>            ((CatalogImpl) catalog).fire(event);
>        }
>    }
>
> Regards,
> --
> Davide Savazzi
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
>


Back to the top