AddFeatureCommand puzzle.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

AddFeatureCommand puzzle.

Jody Garnett-3
Hi Jesse:

A bit of a design puzzle; the AddFeatureCommand is where I would like to "hook in" to the feature creation process (and prompt the user to fill in initial fields if a FeaturePanel is available to do so). Indeed I may make a flag so feature panels can mark if they want to be used during creation or not.

The trick is:
- AddFeatureCommand is defined in net.refractions.udig.project
- FeaturePanelProcess is defined in net.refractions.udig.project.ui

So what is a kind way to proceed?
- formally blow a hole in AddFeatureCommand and access it to process an extension point? To follow Jesse naming it could be a "CreateFeatureInterceptor"
- move the FeaturePanelProcessor into ne.refractions.udig.project? No that does not make sense it is a UI thing
- Ask AddFeatureCommand it to be configurable? This would be useful in filling in feature fields based on current context (something else I want to do; but was going to do as part of the initial dialog opening)

Accepting ideas on this one.

Jody

_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel
Reply | Threaded
Open this post in threaded view
|

Re: AddFeatureCommand puzzle.

Jesse Eichar
I think we probably need AddFeatureCommand to be configurable because I can easily see cases where you create a feature add it to the feature store but you don't want user interaction.  

You can maybe modify the AcceptFeatureBehaviour (part of the tools API).  To create a AddFeatureCommand that is parameterized with a strategy that opens the Dialogs.  This make sense to me because if you are using the tools the user obviously is in the position to handle interaction.

Jesse

On Tue, May 4, 2010 at 9:34 AM, Jody Garnett <[hidden email]> wrote:
Hi Jesse:

A bit of a design puzzle; the AddFeatureCommand is where I would like to "hook in" to the feature creation process (and prompt the user to fill in initial fields if a FeaturePanel is available to do so). Indeed I may make a flag so feature panels can mark if they want to be used during creation or not.

The trick is:
- AddFeatureCommand is defined in net.refractions.udig.project
- FeaturePanelProcess is defined in net.refractions.udig.project.ui

So what is a kind way to proceed?
- formally blow a hole in AddFeatureCommand and access it to process an extension point? To follow Jesse naming it could be a "CreateFeatureInterceptor"
- move the FeaturePanelProcessor into ne.refractions.udig.project? No that does not make sense it is a UI thing
- Ask AddFeatureCommand it to be configurable? This would be useful in filling in feature fields based on current context (something else I want to do; but was going to do as part of the initial dialog opening)

Accepting ideas on this one.

Jody

_______________________________________________
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 | Threaded
Open this post in threaded view
|

Re: AddFeatureCommand puzzle.

Jody Garnett-2
In reply to this post by Jody Garnett-3
Okay with a bit of help from Jesse I actually have a way out.

The CreateAndSelectNewFeature command is defined in net.refractions.udig.tool.edit; so I can process the extension point from there and
issue a different command if there is a feature panel available.

So I don't need to add an extension point right now; even though it is the best idea going forward.

Jody

On 04/05/2010, at 5:34 PM, Jody Garnett wrote:

> Hi Jesse:
>
> A bit of a design puzzle; the AddFeatureCommand is where I would like to "hook in" to the feature creation process (and prompt the user to fill in initial fields if a FeaturePanel is available to do so). Indeed I may make a flag so feature panels can mark if they want to be used during creation or not.
>
> The trick is:
> - AddFeatureCommand is defined in net.refractions.udig.project
> - FeaturePanelProcess is defined in net.refractions.udig.project.ui
>
> So what is a kind way to proceed?
> - formally blow a hole in AddFeatureCommand and access it to process an extension point? To follow Jesse naming it could be a "CreateFeatureInterceptor"
> - move the FeaturePanelProcessor into ne.refractions.udig.project? No that does not make sense it is a UI thing
> - Ask AddFeatureCommand it to be configurable? This would be useful in filling in feature fields based on current context (something else I want to do; but was going to do as part of the initial dialog opening)
>
> Accepting ideas on this one.
>
> Jody
>
> _______________________________________________
> 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