DESCRIPTION

Bug 423882 - Warn user if workspace is newer than IDE

Refine the workspace version check and show up
* a warning if workspace > IDE
* an info if workspace < IDE.

Compare against only major and minor version of the IDE, so that
for a change of just the patch segment no info is shown. As a reference
bundle use org.eclipse.platform since its feature is most likely to
change when the "IDE" changes.  Don't want to check against the feature
itself as that might not be installed at all.

Compatibility notes:
- If coming from legacy workspaces, we don't complain since that might
  be too intrusive.
- We also write an incremented legacy version, so that when going
  back from an updated workspace to a legacy workspace the old IDE would
  complain as well.
- If org.eclipse.platform bundle is not installed, no check is
  performed.

Change-Id: I2ef3053d4a61782315c95543c5d7b535e0bef0a6
Signed-off-by: Braedon Velazquez xxx@xxx.xxx


COMMENTS

author: Braedon Velazquez
date: 2014-02-26 18:49:59.000000000

Uploaded patch set 13.

-------------------------------------
author: Brenden Conley
date: 2014-02-26 18:52:34.000000000

Patch Set 13:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/1021/

-------------------------------------
author: Braedon Velazquez
date: 2014-02-26 18:55:15.000000000

Patch Set 13:

Updated the patch:
- Don't do check if org.eclipse.platform is not installed.
- Updated copyright statements
- Simplified message text layout.  Only the final "Are you sure.." question is separated with a newline so that user is clear about what they are deciding on.

-------------------------------------
author: Brenden Conley
date: 2014-02-26 19:08:47.000000000

Patch Set 13: Verified+1

Build Successful 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/1021/ : SUCCESS

-------------------------------------
author: Sebastian Porter
date: 2014-02-28 10:25:16.000000000

Patch Set 13:

I don't see why we need the newly added code that loads the property. If it's just to be able to keep the old version in the case where the reference bundle is not there, then we can simply avoid to write the properties.

Using String.valueOf(...) is not needed - we know it is "2".

-------------------------------------
author: Braedon Velazquez
date: 2014-02-28 14:25:42.000000000

Patch Set 13:

* Ok, I'll add the literal "2".  I usually like to use strong types as long as possible and only convert to a string at the end.  But anyways, that doesn't really matter.
*The properties loading is there to preserve the file contents.  The original code created a new, empty Properties instance, which would wipe out any property that is not written anew.

Apart from this there might even be a more "reasonable" reference bundle: the current product's branding bundle, i.e.IProduct.getDefiningBundle().
* This way the check would kick in whenever the product is getting updated, no matter on which platform version it is based, which is more useful for custom IDE products.
* We would just need a the legacy fallback in case no product is being used (Platform.getProduct() == null).

What do you think?

-------------------------------------
author: Sebastian Porter
date: 2014-02-28 15:10:38.000000000

Patch Set 13:

Just don't overwrite the properties file if we don't have a new version to write. I still don't think we need that code.

We should use a single reference. Otherwise one might start a workspace with product A and then B and will get totally unrelated versions.

Can you just fix the review comments without adding yet something new again in the next change? I'd like to get this off my plate.

-------------------------------------
