Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] Questions on AbstractRemotePreferencePage

The OMPIResourceManagerConfiguration still extends AbstractRemoteResourceManagerConfiguration for simplicity, but just does not use the proxy information. You also should still use AbstractRemoteResourceManagerConfigurationWizardPage as it no longer includes the proxy path. The old resource managers now use AbstractRemoteProxyResourceManagerConfigurationWizardPage which extends AbstractRemoteResourceManagerConfigurationWizardPage to add the proxy agent field.

Regards,

Greg

On May 19, 2008, at 6:22 PM, Greg Watson wrote:

Daniel,

See the org.eclipse.ptp.rm.ompi.core and org.eclipse.ptp.rm.ompi.ui for examples of what is required. Feel free to use these plugins as they are intended to form the basis of the new RM work.

Greg

On May 19, 2008, at 5:08 PM, Daniel Felix Ferber wrote:

Hi Greg,

Thanks, I see your point. If I understand you right, this also means that:
 - The RM configuration does not need to extend AbstractRemoteResourceManagerConfiguration.
 - I do not need to extend AbstractRemoteResourceManagerConfigurationWizardPage for the RM configuration wizard. I have to implement an abstract RM configuration wizard page only to choose the remote target. That would be an AbstractRemoteResourceManagerConfigurationWizardPage without the proxy options.

I am right?
Best regards,
Daniel Felix Ferber

Greg Watson escreveu:
Hi Daniel,

You shouldn't need to use AbstractRemotePreferencePage. This was used by the old resource managers that required information about the location of the proxy agent. Since the new approach doesn't require this, you don't need to use it. However, you might want to think about providing a generic extensible preference page for resource managers using the new model.

Greg

On May 19, 2008, at 1:56 PM, Daniel Felix Ferber wrote:

Hi all,

I have some questions about how AbstractRemotePreferencePage should be correctly subclassed in order to provide a prefence page with remote connection preferences.

I noticed that the class extending AbstractRemotePreferencePage requires a lot of knowledge of how AbstractRemotePreferencePage itself was implemented.

I understand that:
  1. I have to override createContents(). The implementation first calls super.createContents in order to create a Control with remote preferences. I then add more controls with my own preferences.
  2. I have to implement savePreferences()
  3. I have to implement getPreferences()
  4. I have to initialize the fields in createContents() with values from getPreferences().
  5. My fields should have an listener that call super.updatePreferencePage() in order to operate seamlessly with fields from remote preferences. But I cannot reuse the listener declared in AbstractRemotePreferencePage (although its protected, suggesting reuse), I have to provide my own listener instead.
  6. I have to override isValidSettings(). The implementation first calls super.isValidSettings() and then I do my own validation. I call setErrorMessage() and setValid(false) if some of my preferences fields contain invalid values.
  7. I have to override defaultSetting().
  8. I do not understand how to implement saving of preferences. I see that I could override performOk(), but doing so would not be consistent with overrideng defaultSettings() (I would have to override performDefaults instead).
Best regards,
Daniel Felix Ferber
_______________________________________________
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