### Eclipse Workspace Patch 1.0 #P org.eclipse.pde.core Index: src/org/eclipse/pde/internal/core/site/Site.java =================================================================== RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/site/Site.java,v retrieving revision 1.19 diff -u -r1.19 Site.java --- src/org/eclipse/pde/internal/core/site/Site.java 2 Jan 2008 15:56:17 -0000 1.19 +++ src/org/eclipse/pde/internal/core/site/Site.java 15 Dec 2008 02:11:13 -0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2006 IBM Corporation and others. + * Copyright (c) 2000, 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -13,15 +13,10 @@ import java.io.PrintWriter; import java.util.Locale; import java.util.Vector; - import org.eclipse.core.runtime.CoreException; import org.eclipse.pde.core.IModelChangedEvent; import org.eclipse.pde.core.IWritable; -import org.eclipse.pde.internal.core.isite.ISite; -import org.eclipse.pde.internal.core.isite.ISiteArchive; -import org.eclipse.pde.internal.core.isite.ISiteCategoryDefinition; -import org.eclipse.pde.internal.core.isite.ISiteDescription; -import org.eclipse.pde.internal.core.isite.ISiteFeature; +import org.eclipse.pde.internal.core.isite.*; import org.w3c.dom.Node; import org.w3c.dom.NodeList; @@ -34,6 +29,8 @@ private String type; private String url; private String mirrorsUrl; + private String digestUrl; + private String associateSitesUrl; private ISiteDescription description; /** @@ -71,6 +68,40 @@ } /** + * @see org.eclipse.pde.internal.core.isite.ISite#setDigestURL(String) + */ + public void setDigestURL(String url) throws CoreException { + ensureModelEditable(); + Object oldValue = this.digestUrl; + this.digestUrl = url; + firePropertyChanged(P_DIGEST_URL, oldValue, url); + } + + /** + * @see org.eclipse.pde.internal.core.isite.ISite#getDigestURL() + */ + public String getDigestURL() { + return digestUrl; + } + + /** + * @see org.eclipse.pde.internal.core.isite.ISite#setAssociateSitesURL(String) + */ + public void setAssociateSitesURL(String url) throws CoreException { + ensureModelEditable(); + Object oldValue = this.associateSitesUrl; + this.associateSitesUrl = url; + firePropertyChanged(P_ASSOCIATE_SITES_URL, oldValue, url); + } + + /** + * @see org.eclipse.pde.internal.core.isite.ISite#getAssociateSitesURL() + */ + public String getAssociateSitesURL() { + return associateSitesUrl; + } + + /** * @see org.eclipse.pde.internal.core.isite.ISite#setMirrorsURL(String) */ public void setMirrorsURL(String url) throws CoreException { @@ -211,12 +242,16 @@ type = null; url = null; mirrorsUrl = null; + digestUrl = null; + associateSitesUrl = null; } protected void parse(Node node) { - type = getNodeAttribute(node, "type"); //$NON-NLS-1$ - url = getNodeAttribute(node, "url"); //$NON-NLS-1$ - mirrorsUrl = getNodeAttribute(node, "mirrorsURL"); //$NON-NLS-1$ + type = getNodeAttribute(node, P_TYPE); + url = getNodeAttribute(node, P_URL); + mirrorsUrl = getNodeAttribute(node, P_MIRRORS_URL); + digestUrl = getNodeAttribute(node, P_DIGEST_URL); + associateSitesUrl = getNodeAttribute(node, P_ASSOCIATE_SITES_URL); NodeList children = node.getChildNodes(); for (int i = 0; i < children.getLength(); i++) { Node child = children.item(i); @@ -243,7 +278,7 @@ ((SiteCategoryDefinition) def).parse(child); ((SiteCategoryDefinition) def).setInTheModel(true); categoryDefs.add(def); - } else if (tag.equals("description")) { //$NON-NLS-1$ + } else if (tag.equals(P_DESCRIPTION)) { if (description != null) return; description = getModel().getFactory().createDescription(this); @@ -259,6 +294,10 @@ setURL(newValue != null ? newValue.toString() : null); } else if (name.equals(P_MIRRORS_URL)) { setMirrorsURL(newValue != null ? newValue.toString() : null); + } else if (name.equals(P_DIGEST_URL)) { + setDigestURL(newValue != null ? newValue.toString() : null); + } else if (name.equals(P_ASSOCIATE_SITES_URL)) { + setAssociateSitesURL(newValue != null ? newValue.toString() : null); } else if (name.equals(P_DESCRIPTION) && newValue instanceof ISiteDescription) { setDescription((ISiteDescription) newValue); } else @@ -269,9 +308,11 @@ writer.print(indent + ""); //$NON-NLS-1$ if (description != null) { Index: src/org/eclipse/pde/internal/core/isite/ISite.java =================================================================== RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/isite/ISite.java,v retrieving revision 1.13 diff -u -r1.13 ISite.java --- src/org/eclipse/pde/internal/core/isite/ISite.java 2 Jan 2008 15:56:24 -0000 1.13 +++ src/org/eclipse/pde/internal/core/isite/ISite.java 15 Dec 2008 02:11:13 -0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2006 IBM Corporation and others. + * Copyright (c) 2000, 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -24,6 +24,10 @@ String P_DESCRIPTION = "description"; //$NON-NLS-1$ + String P_DIGEST_URL = "digestURL"; //$NON-NLS-1$ + + String P_ASSOCIATE_SITES_URL = "associateSitesURL"; //$NON-NLS-1$ + void setType(String type) throws CoreException; String getType(); @@ -32,10 +36,18 @@ void setMirrorsURL(String url) throws CoreException; + void setDigestURL(String url) throws CoreException; + + void setAssociateSitesURL(String url) throws CoreException; + String getURL(); String getMirrorsURL(); + String getDigestURL(); + + String getAssociateSitesURL(); + ISiteDescription getDescription(); void setDescription(ISiteDescription description) throws CoreException;