Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Only in >=3.0.1

Hi,

I have some code (specifically the isOptionEnabled call-back from IOptionApplicability) that needs to return early in CDT < 3.0.1

Could someone advise on the best way to do this?  One idea is:

  PluginVersionIdentifier target = new PluginVersionIdentifier(0,0,5);
  if (! build.getVersion().isGreaterOrEqualTo(target)) return true;

Another option is:

  String ver = build.getManagedBuildRevision();
  PluginVersionIdentifier version = new PluginVersionIdentifier(ver);
  PluginVersionIdentifier target = new PluginVersionIdentifier(3,0,1);
  if (! version.isGreaterOrEqualTo(target)) return true;

Where "build" is the IBuildObject passed to isOptionEnabled.

Will either of these values certainly count be incremented (they haven't yet in CVS)?  Is there another way that's preferable?

Many thanks,
--
  Neil 




Back to the top