Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316369 - ServiceProviderConfigurationWidget unable to save changes
Summary: ServiceProviderConfigurationWidget unable to save changes
Status: RESOLVED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: Service Model (show other bugs)
Version: 4.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 4.0.1   Edit
Assignee: Vivian Kong CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-09 15:51 EDT by Vivian Kong CLA
Modified: 2010-06-30 11:26 EDT (History)
1 user (show)

See Also:
g.watson: review+


Attachments
patch for ptp_4_0 (11.16 KB, patch)
2010-06-21 12:51 EDT, Vivian Kong CLA
no flags Details | Diff
revised patch for ptp_4_0 (12.87 KB, patch)
2010-06-21 12:55 EDT, Vivian Kong CLA
no flags Details | Diff
patch for HEAD (15.01 KB, patch)
2010-06-22 14:19 EDT, Vivian Kong CLA
no flags Details | Diff
additional changes needed for HEAD (14.87 KB, patch)
2010-06-30 09:14 EDT, Vivian Kong CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vivian Kong CLA 2010-06-09 15:51:36 EDT
Changes to service provider were not save after they were made in the ServiceProviderConfigurationWidget (used in service configurations property/preference pages).

Upon selecting a service from the service tree, an IServiceProviderWorkingCopy was created from an IServiceProvider and an IServiceProviderContributor was setup to configure the working copy.  However the IServiceProviderContributor was actually editing the IServiceProvider and not its working copy.  Therefore, when user clicks OK, the unmodified working copy would attempt to save its properties to the provider, which set the provider back to its original state.
Comment 1 Vivian Kong CLA 2010-06-21 12:51:17 EDT
Created attachment 172343 [details]
patch for ptp_4_0
Comment 2 Vivian Kong CLA 2010-06-21 12:54:24 EDT
Hi Greg, can you please review this patch?  Without this patch, remote services cannot be edited for remote projects.

Should the IServiceProviderContributor interface be changed so that configureServiceProvider() works with IServiceProviderWorkingCopy instead of an IServiceProvider?
Comment 3 Vivian Kong CLA 2010-06-21 12:55:17 EDT
Created attachment 172344 [details]
revised patch for ptp_4_0
Comment 4 Greg Watson CLA 2010-06-22 10:37:16 EDT
This is working for me, so I'm ok with the patch.

It would seem to make sense if IServiceProviderWorkingCopy was passed to configureServiceProvider(). I guess this can only be changed in head.
Comment 5 Vivian Kong CLA 2010-06-22 13:49:54 EDT
(In reply to comment #4)
> This is working for me, so I'm ok with the patch.
> 
> It would seem to make sense if IServiceProviderWorkingCopy was passed to
> configureServiceProvider(). I guess this can only be changed in head.

Thanks for reviewing the patch Greg.

I'll post another patch for HEAD with the API change.
Comment 6 Vivian Kong CLA 2010-06-22 14:19:41 EDT
Created attachment 172446 [details]
patch for HEAD
Comment 7 Greg Watson CLA 2010-06-23 16:09:58 EDT
Looks good. Please apply.
Comment 8 Vivian Kong CLA 2010-06-24 10:28:47 EDT
Fixed in ptp_4_0 and HEAD.

I've also updated the plugin version.
Comment 9 Vivian Kong CLA 2010-06-30 09:14:51 EDT
Created attachment 173093 [details]
additional changes needed for HEAD
Comment 10 Vivian Kong CLA 2010-06-30 09:15:33 EDT
Additional changes applied to HEAD
Comment 11 Greg Watson CLA 2010-06-30 11:26:05 EDT
I've also fixed the RM's that are using this interface.