Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] Questions about service contributor wizard pages

Greg
I have what I think are a working set of wizard pages for the PE and LL 
resource managers. I did the following

Added a 'public String getString(String key, String defaultValue)' method 
to IServiceProvider and Service Provider since I wanted to apply default 
values (from the preferences store or "") rather than dealing with 
getString() returning null.

I extended ServiceProvider with a new class 
'ResourceManagerServiceProvider' that holds the attributes for the baqsic 
(local) resource manager. I extended that class with 
'RemoteResourceManagerServiceProvider' which contains the additional 
attributes needed for a remote resource manager. Then I extended that 
class with PEServiceProvider and LLServiceProvider which contain the 
attributes for the PE & LL resource managers. 

All of these have get/set methods for each of the attributes. They all 
directly access the backing store with getString/putString rather than 
trying to cache locally. I don't think these are on a performance critical 
path where we really care.

I also modified the AbstractRemoteProxyResourceManagerConfigurationWizard, 
AbstractRemoteResourceManagerConfigurationWizardPage and the PE and LL 
wizard pages to use the new service provider classes.

I can run the wizards and have the values saved in the service provider 
classes.

I'm not clear how this hooks up with the resource manager view or the 
concept of service configurations associated with projects. Where will the 
user be making the selction of a service configuration, and how do 
resource managers get started/stopped?

With the association of service configurations to projects, will I be able 
to get to a service configuration without having an associated project? 
(The default service configuration/default resource manager concept we've 
discussed before) I have a plugin which does not entirely depend on the 
Eclipse project concept, and which can invoke commands remotely outside 
the project structure.

I also looked at the OpenMPI resource manager wizard pages and it looks 
like they have their own completely indepedent class structure from what 
the PE and LL wizards use. Any suggestions how to proceed with that?
Dave



Greg Watson <g.watson@xxxxxxxxxxxx> 
Sent by: ptp-dev-bounces@xxxxxxxxxxx
06/29/2009 08:35 AM
Please respond to
Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>


To
Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>
cc

Subject
Re: [ptp-dev] Questions about service contributor wizard pages






Dave,

For some reason only part of my reply was sent on Friday.

To answer the rest of your question, you're on the right track, but 
taking a look at the code I realize that I need to provide some way to 
hook into the wizard constructor (which creates the configuration) and 
performFinish() (which sets the configurationd). You should then just 
be able to replicate the code from RMConfigurationWizard. There are a 
couple of ways to do this, but the easiest might be to extend 
IServiceProviderContributer to supply the wizard as well as the wizard 
pages. Then you can subclass ServiceProviderConfigurationWizard and 
override performFinish(). I'll work on this today.

Greg


On Jun 26, 2009, at 2:18 PM, Greg Watson wrote:

> Hi Dave,
>
> I added some docs to wiki.eclipse.org on the services framework that 
> might be useful.
>
> See answers below.
>
> On Jun 26, 2009, at 1:00 PM, Dave Wootton <dwootton@xxxxxxxxxx> wrote:
>
>> Greg
>> I'm trying to understand the structure of the services model and 
>> how I
>> want to approach adding the wizard pages for the resource managers. 
>> It
>> looks to me lika at the moment the configuration process is invoked 
>> from
>> the Services->Launch Wizard menu selection on the Eclipse main menu 
>> where
>> I end up on a HPC project configuration dialog page. That page has a
>> configure button which I think is supposed to lauch the wizard 
>> pages for
>> the service provider selected from the drop down and that configure 
>> button
>> is enabled only if the code finds the correct instance of a class
>> implementing IServiceProviderContributor.
>
> That menu is added by the services.test plugin to make it easier to 
> test your wizard, but yes.
>
>>
>> That IServiceProviderContributor is responsible for obtaining the 
>> set of
>> wizard pages for that service provider, and I need to implement an
>> instance of that class for each of the resource managers.
>
> Correct.
>
>>
>>
>> So I think I understand how the appropriate wizard gets invoked and 
>> gets
>> the set of wizard pages.
>>
>> I'm looking at the
>> AbstractRemoteProxyResourceManagerConfigurationWizardPage class, 
>> which you
>> suggested I modify to extend the 
>> ServiceProviderConfigurationWizardPage
>> class, and which gets me the default wizard page that I use in 
>> configuring
>> the PE and LoadLeveler proxies.
>>
>> The initContents() method of that class currently gets an
>> AbstractRemoteResourcemanagerConfiguration object  which I understand
>> currently holds the attributes (host, path, etc) for the resource 
>> manager.
>> I think that I now want to obtain an instance of the 
>> IServiceProvider,
>> where I further think I want to extend the ServiceProvider class as a
>> class (or set of classes) which hold the resource manager 
>> attributes that
>> I need to save.
>> The current initContents() method gets the config information from 
>> the
>> wizard by calling getConfigurationWizard().getConfiguration(), so I 
>> think
>> that I need to provide a method in 
>> ServiceProviderContributionWizardPage
>> that obtains the instance of the ServiceProviderConfigurationWizard 
>> for
>> the service provider, and that the ServiceProviderConfigurationWizard
>> needs to implement a getConfigurationWizard() method that returns the
>> IServiceProvider object for the service provider?
>>
>> Am I on the right track with this? Has my thinking gone completely 
>> off the
>> tracks and I've gotten lost somewhere?
>>
>> Thanks
>>
>> Dave
>> _______________________________________________
>> ptp-dev mailing list
>> ptp-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/ptp-dev
> _______________________________________________
> ptp-dev mailing list
> ptp-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/ptp-dev

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




Back to the top