| Summary: | encoding change event is not handled. | ||
|---|---|---|---|
| Product: | [Tools] PTP | Reporter: | John Liu <john_ws_liu> |
| Component: | RDT | Assignee: | Chris Recoskie <recoskie> |
| Status: | RESOLVED FIXED | QA Contact: | Chris Recoskie <recoskie> |
| Severity: | normal | ||
| Priority: | P3 | CC: | mikekucera, recoskie |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| See Also: | https://bugs.eclipse.org/bugs/show_bug.cgi?id=305391 | ||
| Whiteboard: | |||
| Bug Depends on: | 305391 | ||
| Bug Blocks: | |||
| Attachments: | |||
|
Description
John Liu
Created attachment 161659 [details]
a fix patch, appy to org.eclipse.ptp.rdt.core, org.eclipse.ptp.rdt.core.tests, org.eclipse.ptp.rdt.ui
Created attachment 161756 [details]
a formatted fix patch, appy to org.eclipse.ptp.rdt.core, org.eclipse.ptp.rdt.core.tests, org.eclipse.ptp.rdt.ui
I'm not going to commit this patch until we have some further discussions, because I fell that there are some problems with the approach. My issue with the patch is the use of scopes and the scope manager to manage the encoding data: 1) We already have a mechanism for passing file information to the remote indexer, IRemoteIndexerInfoProvider. The encoding information should just be added to this object, as we have done every time we've had to pass more information to the remote indexer. 2) We've agreed in the past that we won't store information on the server that duplicates information stored on the client. Having the scope manager hang on to the encoding information goes against this. Storing info on the server means you are now in the business of keeping the client and server in sync (and it makes the server code more complex). Having only one copy of the info on the client guarantees you will never have problems keeping two copies of the same info in sync. This is the approach we have taken so far and I don't see a reason to deviate from it at this point. 3) From what I can tell its only the indexer that uses the encoding information, which is passed over every time there's an index delta (because it might have changed). So if its passing the information every time anyway then why even bother storing it on the server. (In reply to comment #3) > I'm not going to commit this patch until we have some further discussions, > because I fell that there are some problems with the approach. > My issue with the patch is the use of scopes and the scope manager to manage > the encoding data: > 1) We already have a mechanism for passing file information to the remote > indexer, IRemoteIndexerInfoProvider. The encoding information should just be > added to this object, as we have done every time we've had to pass more > information to the remote indexer. > 2) We've agreed in the past that we won't store information on the server that > duplicates information stored on the client. Having the scope manager hang on > to the encoding information goes against this. Storing info on the server means > you are now in the business of keeping the client and server in sync (and it > makes the server code more complex). Having only one copy of the info on the > client guarantees you will never have problems keeping two copies of the same > info in sync. This is the approach we have taken so far and I don't see a > reason to deviate from it at this point. > 3) From what I can tell its only the indexer that uses the encoding > information, which is passed over every time there's an index delta (because it > might have changed). So if its passing the information every time anyway then > why even bother storing it on the server. Good points, Mike. I was not aware of this mechanism. I will upload the updated patch with your suggested approach soon. Created attachment 161947 [details]
Updated patch, apply to org.eclipse.ptp.rdt.core, org.eclipse.ptp.rdt.core.tests
Thanks John. I've committed the new patch with a few minor changes. Committed to 2.1. Fixed in head |