Bug 338345 - Unfortunate dependency on Resources and UI ide
Summary: Unfortunate dependency on Resources and UI ide
Status: RESOLVED DUPLICATE of bug 67803
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Compare (show other bugs)
Version: 3.7   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Platform-Compare-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-27 13:14 EST by Jeff McAffer CLA
Modified: 2011-02-28 06:51 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff McAffer CLA 2011-02-27 13:14:19 EST
The compare bundle has one class, CompareWithOtherResourceDialog, that references both the core.resources bundle and the ui.ide bundle.  This is the only place that these bundles are referenced in the compare component.  Unfortunately this makes using Compare in RCP scenarios quite difficult as those two dependencies pull in quite a number of additional things.

In particular, the p2 UI uses compare to allow users to compare old versions of their profile when they are looking to revert.  The compare dependency in turn means that adding a revert button to your RCP app drags in Resources, IDE UI, ...   See Bug 333810.

The problem can be addressed two ways:
- make the core.resources and ui.ide dependencies "optional" in o.e.compare.  This would need to be documented but since the class in question is explicitly for comparing Resources, it it unlikely that any users would be directly affected as they would already have dependencies on those bundles.

- create a new bundle to hold IDE-specific compare function.  This is a heavier-weight approach that makes sense if we have (or foresee) more IDE-specific function.  It may impact existing systems as they would have to ensure that their systems include the new bundle.  

Given that we only have the one class in question, I suggest door #1 (marking the dependencies optional)

Marking this as Major as it is a Major inconvenience for people looking to use Compare and p2 in RCP scenarios.
Comment 1 Jeff McAffer CLA 2011-02-27 14:23:01 EST
Investigating a little more, it seems that compare also depends on o.e.ui.editors which brings in Resources and IDE UI as well.  So that dependency needs to be optional as well.  Furthermore, it seems that the Resources dependency is considerably deeper than I thought originally. I must not have deleted core.resources from the dependencies when I was looking for potential problems.

So, door #1 does not look possible.  Anyone interested in refactoring compare to be not based on IResource etc?
Comment 2 Remy Suen CLA 2011-02-27 14:32:36 EST
Dupe of bug 67803.
Comment 3 Tomasz Zarna CLA 2011-02-28 06:51:27 EST
Thanks Remy.

*** This bug has been marked as a duplicate of bug 67803 ***