Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] ConnectDialog woes

Hi Erkki and Remy,

Erkki Lindpere wrote:
It's more that this could get
very ugly (who knows how many ViewParts are going to get activated?),
but this is the only decent solution I've come up with at the moment.
If anyone's got a better idea, I'm all ears.

I'm all ears too. This is kind of a sticky issue, I think, and I've not come up with what feels like an elegant approach so far...but let's try to work one out.


You could use a listener that delegates to a chain (list) of handlers.
The handlers would be executed in a sequence until one of them decided
that it can handle the event and returned true.

True.


Maybe in some case it makes sense to open a perspective; in another
case just show a view?

Yes. I think the main problem is that in general it's impossible to know what the UI consequences *should* be of

a) creating a container instance (from certain provider)
b) calling 'connect' on that container

In both cases, there may/may not be UI that needs to be setup, or other things that need to be done as a consequence (or preceeding) creating the container or calling connect on it.

So I do think some extension point should probably be made here (particularly for the connect/disconnect).

One thing to be aware of...there is already a 'connecting/connected/disconnecting/disconnected' notification available off of IContainer (via IContainer.addListener). This could very easily be used to implement an extension point like we've been talking about.

Another thought I've had is that a new 'org.eclipse.ecf.ui.connectAction' extension point could be defined, which got called when the 'OK' button was pressed on this connect dialog (and define a new interface IContainerConnectAction interface or some such, that had it's methods called in a certain specified order).

One further thought...it might be good to create extension points that allow providers to customize/extend the functionality of the connect . That way if a provider needed to have specific UI associated with creating/connecting their container type, they could simply hook into the existing connect wizard/dialog and not have to implement the whole thing themselves. It could behave something like the Import/Export wizard (and the importWizard extension point).

Some thoughts/ideas. I'm very open to alternatives as I agree the whole 'create container instance', 'set it up', 'connect sequence' can and should be easier to both program and connect to a user interface.

Scott

The bundle that contributes whatever is needed
for the UI would also register the handler. One way to register the
handlers would be with an Extension Point.



Just my idea.
_______________________________________________
ecf-dev mailing list
ecf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ecf-dev




Back to the top