Bug 472556 - [api] update AbstractRepositorySettingsPage to take a branding ID
Summary: [api] update AbstractRepositorySettingsPage to take a branding ID
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: 3.15   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.17   Edit
Assignee: Jaxsun McCarthy Huggan CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed, noteworthy
Depends on:
Blocks:
 
Reported: 2015-07-13 19:38 EDT by Jaxsun McCarthy Huggan CLA
Modified: 2015-08-27 18:27 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaxsun McCarthy Huggan CLA 2015-07-13 19:38:26 EDT
currently the NewRepositoryWizard handles the holding and application of a specific branding to a repository.
This works fine however if any other wizard uses a repository settings page to create a repository the branding will not be properly applied. Additionally since the page doesn't know about the branding it must be retrieved from the wizard after construction to ensure that the correct branding images and labels are displayed in the page.

The AbstractRepositorySettings page should be enhanced to optionally take a branding on construction this way the branding can be immediately injected and will always be applied to the repository correctly in any context.
Comment 1 Sam Davis CLA 2015-07-21 16:58:23 EDT
This creates additional SPI for connector implementors to implement just to pass the brand to the page. I think in most cases the brand is only going to be used to set the page title and wizban image, which it seems ought to be done by the framework. Would it make more sense (and be possible) to add a method to RepositoryConnectorBranding for getting the wizban image and have the framework take care of passing the brand to the page and setting the title and wizban based on the brand? What do you think Jaxsun?
Comment 2 Jaxsun McCarthy Huggan CLA 2015-07-21 18:47:19 EDT
I can see this all being done nicely when a repository with a branding ID exists however how would the framework take care of situations where applications implement additional wizards which wish to use the repository settings page to create new
Comment 3 Jaxsun McCarthy Huggan CLA 2015-07-21 18:53:35 EDT
(...continuation of prematurely submitted comment...)
.. how would the framework take care of situations where applications implement additional wizards which wish to to use the repository settings page to create new task repositories.

Right now this is done using the connector UI, so either more information needs to be able to be passed into there, which expands the SPI as was done in the submitted review, or there would need to be a centralization of the handling of these settings pages so they can be created and configured automatically without expanding the SPI. If such a centralization were to take place then existing applications would need to switch to using this over the connector ui. Would this lead to the deprecation of ConnectorUi.getSettingsPage() ?
Comment 4 Sam Davis CLA 2015-07-21 19:36:22 EDT
I was imagining that there would be a setBrand method on the page, which clients would need to call after getting the page from the connector UI. Do you think that's workable? It has the disadvantage of clients needing to call this method at the right time, but I think it's better to complicate the API than the SPI, because there are a lot more SPI implementors and they shouldn't need as much knowledge of the framework as API clients.
Comment 5 Jaxsun McCarthy Huggan CLA 2015-07-22 14:00:47 EDT
That sounds reasonable. I will create a new review which does this and updates the existing wizards.
Comment 6 Eclipse Genie CLA 2015-08-06 20:42:02 EDT
New Gerrit change created: https://git.eclipse.org/r/53370
Comment 8 Sam Davis CLA 2015-08-27 18:27:26 EDT
Thanks Jaxsun.