24646
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/configuration/IInstallConfiguration.java b/update/org.eclipse.update.core/src/org/eclipse/update/configuration/IInstallConfiguration.java
index c2a111f..a9099cf 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/configuration/IInstallConfiguration.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/configuration/IInstallConfiguration.java
@@ -71,8 +71,7 @@
* (repeatedly) as the API evolves.
* </p>
*/
- public IConfiguredSite createConfiguredSite(File directory)
- throws CoreException;
+ public IConfiguredSite createConfiguredSite(File directory) throws CoreException;
/**
* Create a new linked site, based on a local file
@@ -93,8 +92,7 @@
* (repeatedly) as the API evolves.
* </p>
*/
- public IConfiguredSite createLinkedConfiguredSite(File directory)
- throws CoreException;
+ public IConfiguredSite createLinkedConfiguredSite(File directory) throws CoreException;
/**
* Adds the specified site to this configuration.
@@ -211,4 +209,21 @@
*/
public void setLabel(String label);
+ /**
+ * Returns an integer that represents a time stamp created at the beginning of a new configuration time line.
+ * Time line is started when configuration state is created by a full file system reconciliation. All configurations
+ * subsequently created will have the same time line until the next full reconciliation. Certain operations
+ * (e.g. revert) make sense only between objects that belong to the same time line.
+ *
+ * @since 2.0.2
+ * @return the time stamp of the full system reconciliation
+ *
+ * <b>Note:</b> This method is part of an interim API that is still under development and expected to
+ * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
+ * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
+ * (repeatedly) as the API evolves.
+ * </p>
+ */
+ public long getTimeline();
+
}
\ No newline at end of file
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/core/IFeatureReference.java b/update/org.eclipse.update.core/src/org/eclipse/update/core/IFeatureReference.java
index f3a1284..df43ba0 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/core/IFeatureReference.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/core/IFeatureReference.java
@@ -58,8 +58,8 @@
* Returns the referenced feature.
* This is a factory method that creates the full feature object.
*
- * @param perfectMatch <code>true</code> if the match perfect feature should be return
- * <code>false</code> if teh best match feature should be return.
+ * @param perfectMatch <code>true</code> if the perfect match feature feature should be returned
+ * <code>false</code> if the best match feature should be returned.
* @return the referenced feature
* @since 2.0.2
*/
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/InstallConfiguration.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/InstallConfiguration.java
index 34bf7c7..278a698 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/InstallConfiguration.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/InstallConfiguration.java
@@ -35,16 +35,6 @@
}
/*
- * default constructor.
- */
- public InstallConfiguration(URL newLocation, String label) throws MalformedURLException {
- setLocationURLString(newLocation.toExternalForm());
- setLabel(label);
- setCurrent(false);
- resolve(newLocation, null);
- }
-
- /*
* copy constructor
*/
public InstallConfiguration(IInstallConfiguration config, URL newLocation, String label) throws MalformedURLException {
@@ -60,6 +50,7 @@
addConfigurationSiteModel(configSite);
}
}
+ setTimeline(config.getTimeline());
}
// set dummy date as caller can call set date if the
// date on the URL string has to be the same
@@ -535,6 +526,7 @@
//$NON-NLS-1$ //$NON-NLS-2$
long time = (getCreationDate() != null) ? getCreationDate().getTime() : 0L;
w.print("date=\"" + time + "\" "); //$NON-NLS-1$ //$NON-NLS-2$
+ w.print("timeline=\"" + getTimeline() + "\" "); //$NON-NLS-1$ //$NON-NLS-2$
w.println(">"); //$NON-NLS-1$
// site configurations
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/InstallConfigurationModel.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/InstallConfigurationModel.java
index d4fe7d6..0bc5018 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/InstallConfigurationModel.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/InstallConfigurationModel.java
@@ -45,6 +45,8 @@
private String label;
private List /* of ConfiguretionActivityModel */activities;
private List /* of configurationSiteModel */ configurationSites;
+
+ private long timeline;
/**
* default constructor. Create
@@ -214,4 +216,21 @@
resolveListReference(getConfigurationSitesModel(),base,bundle);
}
+ /**
+ * Returns the timeline.
+ * @return long
+ */
+ public long getTimeline() {
+ if (timeline==0) timeline = getCreationDate().getTime();
+ return timeline;
+ }
+
+ /**
+ * Sets the timeline.
+ * @param timeline The timeline to set
+ */
+ public void setTimeline(long timeline) {
+ this.timeline = timeline;
+ }
+
}
\ No newline at end of file
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/SiteLocalParser.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/SiteLocalParser.java
index 5a7b558..56430c4 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/SiteLocalParser.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/SiteLocalParser.java
@@ -136,8 +136,7 @@
String stampString = attributes.getValue("stamp"); //$NON-NLS-1$
long stamp = Long.parseLong(stampString);
site.setStamp(stamp);
-
-
+
// DEBUG:
if (UpdateManagerPlugin.DEBUG && UpdateManagerPlugin.DEBUG_SHOW_PARSING) {
UpdateManagerPlugin.debug("End process Site label:" + info); //$NON-NLS-1$
@@ -153,9 +152,16 @@
URL url = UpdateManagerUtils.getURL(site.getLocationURL(), attributes.getValue("url"), null); //$NON-NLS-1$
String label = attributes.getValue("label"); //$NON-NLS-1$
label = UpdateManagerUtils.getResourceString(label, bundle);
+
+ //timeline
+ String timelineString = attributes.getValue("timeline"); //$NON-NLS-1$
+ long timeline = 0;
+ if (timelineString!=null) timeline = Long.parseLong(timelineString);
+
InstallConfigurationModel config = new BaseSiteLocalFactory().createInstallConfigurationModel();
config.setLocationURLString(url.toExternalForm());
config.setLabel(label);
+ config.setTimeline(timeline);
config.resolve(url,getResourceBundle());
try {
config.initialize();