Java 类org.eclipse.core.runtime.PluginVersionIdentifier 实例源码

项目:gwt-eclipse-plugin    文件:GdtExtPlugin.java   
private void initializeFeatureUpdateManager() {
  FeatureUpdateChecker gwtSdkChecker = new FeatureUpdateChecker(new UpdateComputer() {
    @Override
    public UpdateInfo checkSiteXMLForUpdates(Element siteXMLRootElem) {
      GwtMaxSdkVersionComputer maxVersionComputer = new GwtMaxSdkVersionComputer();
      String maxGwtSdkVersion = maxVersionComputer.computeMaxSdkVersion(getJavaProjects());
      if (maxGwtSdkVersion == null) {
        /*
         * Doesn't look like the GWT SDK is being used in the workspace;
         * indicate that there is no update available
         */
        return new UpdateInfo(GWT_SDK_BUNDLE_FEATURE_ID);
      }

      return doCheckSiteXMLForUpdates(
          GWT_SDK_BUNDLE_FEATURE_ID,
          new PluginVersionIdentifier(maxGwtSdkVersion),
          GdtPreferences.getVersionForLastAcknowledgedUpdateNotification(GWT_SDK_BUNDLE_FEATURE_ID),
          siteXMLRootElem, false);
    }
  });

  FeatureUpdateCheckersMap updateCheckersMap = new FeatureUpdateCheckersMap(UpdateSiteToken.class);

  updateCheckersMap.put(UpdateSiteToken.GWT_SDK, gwtSdkChecker);

  UpdateSiteURLGenerator generator = new UpdateSiteURLGenerator();

  featureUpdateManager = new FeatureUpdateManager(generator, updateCheckersMap);
  analyticsPingManager = new AnalyticsPingManager(generator);
}
项目:gwt-eclipse-plugin    文件:FeatureUpdateChecker.java   
public void setUpdatedFeatureVersion(
    PluginVersionIdentifier updatedFeatureVersion) {
  if (updatedFeatureVersion == null) {
    this.updatedFeatureVersion = NO_VERSION;
  } else {
    this.updatedFeatureVersion = updatedFeatureVersion;
  }
}
项目:gwt-eclipse-plugin    文件:GdtPreferences.java   
@SuppressWarnings("deprecation")
public static PluginVersionIdentifier getVersionForLastAcknowledgedUpdateNotification(String featureId) {
  return new PluginVersionIdentifier(
      getConfigurationPreferences().get(getLastAckFeatureUpdateVersionKey(featureId), "0.0.0.0"));
}
项目:gwt-eclipse-plugin    文件:GdtPreferences.java   
@SuppressWarnings("deprecation")
public static void setVersionForLastAcknowlegedUpdateNotification(String featureId, PluginVersionIdentifier version) {
  IEclipsePreferences configurationPreferences = getConfigurationPreferences();
  configurationPreferences.put(getLastAckFeatureUpdateVersionKey(featureId), version.toString());
  flushPreferences(configurationPreferences);
}
项目:gwt-eclipse-plugin    文件:FeatureUpdateChecker.java   
/**
 * If an update is available, returns the updated version that is available
 * for the feature. Otherwise, returns a version of <code>0.0.0.0</code>.
 */
public PluginVersionIdentifier getUpdatedFeatureVersion() {
  return updatedFeatureVersion;
}