Bug 377545 - Make extension point for org.eclipse.team.core.storageMergers for text file usable in a headless environment
Summary: Make extension point for org.eclipse.team.core.storageMergers for text file u...
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 4.2   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: 4.3 M4   Edit
Assignee: Platform Team Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks: 393861 393862 393871
  Show dependency tree
 
Reported: 2012-04-24 11:56 EDT by Olivier Thomann CLA
Modified: 2012-11-08 08:53 EST (History)
6 users (show)

See Also:


Attachments
Proposed fix (17.40 KB, patch)
2012-04-24 12:00 EDT, Olivier Thomann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2012-04-24 11:56:43 EDT
Right now the extension is defined in org.eclipse.team.ui bundle, but looking at the code there is no reason why this is not defined in the org.eclipse.team.core bundle in order to be used in a headless environment.

Would it be possible to move the extension of this extension point down to the team.core bundle?

If not, why is this defined in a UI bundle when it actually requires no UI beside references to UI messages and UI bundles ID to report potential errors? This can easily be moved to messages defined in the core bundle and core bundles IDs.
Comment 1 Olivier Thomann CLA 2012-04-24 12:00:37 EDT
Created attachment 214477 [details]
Proposed fix

The two classes org.eclipse.team.internal.ui.mapping.TextStorageMerger and org.eclipse.team.internal.ui.mapping.LineComparator can be removed. I don't know why the git patch doesn't contain the deletion of these two classes.
Comment 2 Tomasz Zarna CLA 2012-04-25 05:00:15 EDT
(In reply to comment #1)
> Created attachment 214477 [details]
> Proposed fix

Pushed to Gerrit as https://git.eclipse.org/r/#/c/5658/. I removed the mentioned files. The former is even recognized as move. I missed the Change-Id, hopefully will be able to fix that in the next patch set.
Comment 3 Tomasz Zarna CLA 2012-04-30 06:45:57 EDT
It's already too late for this kind of change in this release, I'm deferring it to 4.3. Justification:
* a client that requires the o.e.team.ui bundle but not the o.e.team.core bundle might not see the extension point
* a client that looks for the extension point programmatically in the o.e.team.ui bundle would be broken
* last but not least, it's last week of M7 and we accept such changes by rule of thumb
Comment 4 Olivier Thomann CLA 2012-09-21 12:06:24 EDT
Thomasz, could this be released now for 4.3M3 ?
This would give plenty of time to consumers to adjust if needed.
Comment 5 Malgorzata Janczarska CLA 2012-09-24 06:42:58 EDT
(In reply to comment #4)
> Thomasz, could this be released now for 4.3M3 ?
> This would give plenty of time to consumers to adjust if needed.

I will probably take this bug over from Tomasz. I will get back to you and let you know when I will manage to fit it in schedule. In meantime Tomasz gave some comments about this patch, could you refer to those comments and, if needed, provide the new version of your patch?
Comment 6 Szymon Brandys CLA 2012-10-01 06:35:29 EDT
(In reply to comment #4)
> Thomasz, could this be released now for 4.3M3 ?
> This would give plenty of time to consumers to adjust if needed.

What are blocked bugs/features?
Comment 7 Olivier Thomann CLA 2012-10-01 09:16:50 EDT
(In reply to comment #6)
> What are blocked bugs/features?
The blocked features are team providers that want to do a merge into a headless environment. Right now even if the code is supposed to be headless, the corresponding bundle needs a dependency on swt in order to resolve team.ui. This doesn't make sense.
I don't see why this is required on team.ui. There is nothing in the extension that requires the UI. I believe this is related to the old way the compare bundles were laid out. Now that there is a split between compare core and compare ui, this extension could be moved down to the team.core bundle.

Any reason for not doing it?
Comment 8 Malgorzata Janczarska CLA 2012-11-08 07:05:09 EST
Proposed fix corrected and pushed to master.
Comment 9 Dani Megert CLA 2012-11-08 08:46:59 EST
(In reply to comment #8)
> Proposed fix corrected and pushed to master.

This was pushed:
http://git.eclipse.org/c/platform/eclipse.platform.team.git/commit/?id=1d3169527e436e45c5bfe2584f5f13ca6bd3e975

but it changed the IDs from ui to core, which got corrected with:
http://git.eclipse.org/c/platform/eclipse.platform.team.git/commit/?id=d7391f6f8f4f448578dcccbe8de8bf6ded2caf15

and that "fix" introduced a wrong ID, which got fixed with:
http://git.eclipse.org/c/platform/eclipse.platform.team.git/commit/?id=3b40b8a51daa75d7d1c54a30c3119339e1850e09