Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] Clarifying some problems in salvo UI

HI,
Found a solution. :)

On Fri, Aug 3, 2012 at 5:11 PM, tishan pubudu kanishka dahanayakage <dtishanpubudu@xxxxxxxxx> wrote:
Hi Wim,Harshana,
 In public INewsgroup getNewsgroup(INewsgroupProvider provider) method of [1] to get the servers it creates a ServerStoreFacade and then connects and get the subscribed newsgroups. I have already created a concrete generic ServerStoreFacade. But in this case we need to use respective protocol specific versions of SSF as it actually connects and fetch available newsgroups.
How to make this work? One solution is to apply the same logic that we use to detect the protocol type when creating containers to here and create protocol specific SSF within a if else and use that SSF.
Do you have any other better approach?

[1]https://github.com/ECF/Newsreader/blob/master/bundles/org.eclipse.ecf.salvo.ui/src/org/eclipse/ecf/salvo/ui/external/provider/HookedNewsgroupProvider.java


On Wed, Aug 1, 2012 at 1:11 PM, tishan pubudu kanishka dahanayakage <dtishanpubudu@xxxxxxxxx> wrote:
HI Wim,

On Tue, Jul 31, 2012 at 9:24 PM, Wim Jongman <wim.jongman@xxxxxxxxx> wrote:
Ah, okay ;) you got me scared for a while. Indeed, the extension point should be changed to allow an entry for the new model object. 

Yeah. will do. Still I think I will run into problems in that getNewsgroup method in HookedNewsGroupProvider. Will let you know if so.

Thanks for the update,

Regards,

Wim


On Tue, Jul 31, 2012 at 3:24 PM, tishan pubudu kanishka dahanayakage <dtishanpubudu@xxxxxxxxx> wrote:
Hi Wim,

On Tue, Jul 31, 2012 at 5:22 PM, Wim Jongman <wim.jongman@xxxxxxxxx> wrote:
Hi Tishan,

My understanding was that this was you are working on: replacing the NNTP implementation with a swap-able protocol.

Yeah. You are correct.
AFAIK salvo.ui talks only to the model classes (interfaces) and not with direct implementations. At least for the most part. It is possible that some implementation has leaked in but it is not a finished project.

Yes. In most cases I can just use our new model. But issue aroused in here.[1] This class is called by SelectNewsGroupWizardPage to get the list of newsGroups in the newsServer given in the NewNewsServerWizardPage. But In our case list can be newsGroup/Forum (MessageSources). In [1] when inside public INewsgroup getNewsgroup(INewsGroupProvider provider)
IServerConnection connection = server.getServerConnection();
connection.disconnect();
connection.connect();
connection.setModeReader(server);
connection.getOverviewHeaders(server);

// Subscribe Server
try {
storeFacade.subscribeServer(server, password);
} catch (NNTPException e1) {
Debug.log(getClass(), e1);
}


This part should not be here. I can change the extension point to get generic MessageSources instead NewsGroups.
So providers will be capable of providing MessageSources. But the above code segment cannot reside inside HookedNewsGroupProvider.

And sorry for the confusion. I did not understand the logic behind HookedNewsGroupProvider initially. Now it is resolved.

[1]https://github.com/ECF/Newsreader/blob/master/bundles/org.eclipse.ecf.salvo.ui/src/org/eclipse/ecf/salvo/ui/external/provider/HookedNewsgroupProvider.java


In
If I look at the class that you say uses ServerStoreFacade [1] I see that it uses 

import org.eclipse.ecf.protocol.nntp.model.IServerStoreFacade;

and not the implementation. 



On Tue, Jul 31, 2012 at 12:13 PM, tishan pubudu kanishka dahanayakage <dtishanpubudu@xxxxxxxxx> wrote:


On Tue, Jul 31, 2012 at 2:48 PM, Wim Jongman <wim.jongman@xxxxxxxxx> wrote:
About HookedNewsGroupProvider: The extension point is now geared towards NNTP obviously. I think we should move this stuff to the NNTP specific part? what doe you think?
What you are suggesting is to have a HookedNewsGroupProvider in the NNTP context and replace it's place with another generic class. right?
I have been thinking about this for a some days now. The Salvo ui is designed very tightly coupled with NNTP. But at UI level we should not be even touching on protocol specific stuff. Front end should be a clear separation from backend IMO. Front end should only have some pages, wizards etc and it will display what is intended and fetch the user responses to the back end.
Now to achieve this is current Salvo we have to go for a complete re-design. We have to re design the UI classes and then use some kind of a intermediate layer say 'UIManager' to handle data flow between UI and backend. This approach will introduce a clear separation between UI and backend.
But this approach will require some time which is obviously what we do not have now. I can make Salvo work with tweaks but it will introduce an architectural failure one day when we try to move on.

But obviously from what I'm experiencing now starting things from fresh will be more easier other than tweaking the existing ui. ;)

Regards,

Wim


On Tue, Jul 31, 2012 at 11:15 AM, Wim Jongman <wim.jongman@xxxxxxxxx> wrote:
Hi,

About the extension point:

This is a really cool extension point [1]. Projects can use this extension point to point at their newsgroups. When the user selects "ask a question" and the current perspective is for example the ECF perspective then the newsgroup will be suggested as a place to drop the question


Regards,

Wim


On Tue, Jul 31, 2012 at 10:52 AM, tishan pubudu kanishka dahanayakage <dtishanpubudu@xxxxxxxxx> wrote:
Hi wim,
In the current implementation SelectNewsGroupWizardPage uses a HookedNewsGroupProvider go get a list of NewsGroup(MessageSource) providers. Inside HookedNewsGroupProvide it uses a extension point  defined by org.eclipse.ecf.salvo.ui.newsgroupProvider.

IConfigurationElement[] config = Platform.getExtensionRegistry()
                .getConfigurationElementsFor(EXTENSIONPOINT_ID);

    for (final IConfigurationElement newsgroup : config) {

            IConfigurationElement enablement = newsgroup
                    .getChildren("enablement")[0];

I also checked the NewsGroupProvider.java. Still could not get clear idea of what is happening. Can you please clarify on this more.

Also inside HookedNewsGroupProvider ServerStoreFacade instance is used every where. As far as I understand we have to use protocol specific serverStoreFacade inside HookedNewsGroupProvider. But In my solution each protocol specific ServerStoreFacade resides inside protocol specific container. So should we pass that instance to HookedNewsGroupProvider or create new serverStoreFacade differentiating by protocol using the lame logic to create different containers and use them.
 
--
Regards,
Tishan




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




--
Regards,
Tishan


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



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




--
Regards,
Tishan


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



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




--
Regards,
Tishan




--
Regards,
Tishan




--
Regards,
Tishan


Back to the top