Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 158774 Details for
Bug 243582
Support embedding repository information in released bundles
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch
generate-references.patch (text/plain), 6.09 KB, created by
Darin Wright
on 2010-02-10 15:38:26 EST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Darin Wright
Created:
2010-02-10 15:38:26 EST
Size:
6.09 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.pde.build >Index: src/org/eclipse/pde/build/Constants.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/build/org.eclipse.pde.build/src/org/eclipse/pde/build/Constants.java,v >retrieving revision 1.4 >diff -u -r1.4 Constants.java >--- src/org/eclipse/pde/build/Constants.java 4 Jun 2008 17:24:32 -0000 1.4 >+++ src/org/eclipse/pde/build/Constants.java 10 Feb 2010 20:35:25 -0000 >@@ -9,7 +9,7 @@ > * Gunnar Wagenknecht - Initial API and implementation > * IBM Corporation - Initial API and implementation > **********************************************************************/ >- package org.eclipse.pde.build; >+package org.eclipse.pde.build; > > /** > * Constants for the files usually manipulated by the fetch factory. >@@ -19,13 +19,33 @@ > public interface Constants { > /** Constant for the string <code>feature.xml</code> */ > public final static String FEATURE_FILENAME_DESCRIPTOR = "feature.xml"; //$NON-NLS-1$ >- >+ > /** Constant for the string <code>fragment.xml</code> */ > public final static String FRAGMENT_FILENAME_DESCRIPTOR = "fragment.xml"; //$NON-NLS-1$ >- >+ > /** Constant for the string <code>plugin.xml</code> */ > public final static String PLUGIN_FILENAME_DESCRIPTOR = "plugin.xml"; //$NON-NLS-1$ >- >+ > /** Constant for the string <code>META-INF/MANIFEST.MF</code> */ > public final static String BUNDLE_FILENAME_DESCRIPTOR = "META-INF/MANIFEST.MF"; //$NON-NLS-1$ >+ >+ /** >+ * Key used to store the value of an <code>org.eclipse.team.core.repository</code> extension >+ * identifier that provides a project set capability that can interpret project references >+ * generated by a fetch factory. >+ * >+ * @since 3.6 >+ * @see IFetchFactory >+ */ >+ public static final String KEY_REPOSITORY_PROVIDER_ID = "repositoryId"; //$NON-NLS-1$ >+ >+ /** >+ * Key used to store the value of a project reference that can be interpreted by an >+ * associated repository provider's project set capability to recreate a project >+ * in a workspace. >+ * >+ * @since 3.6 >+ * @see IFetchFactory >+ */ >+ public static final String KEY_PROJECT_REFERENCE = "projectReference"; //$NON-NLS-1$ > } >Index: src/org/eclipse/pde/build/IFetchFactory.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/build/org.eclipse.pde.build/src/org/eclipse/pde/build/IFetchFactory.java,v >retrieving revision 1.5 >diff -u -r1.5 IFetchFactory.java >--- src/org/eclipse/pde/build/IFetchFactory.java 4 Dec 2009 20:55:45 -0000 1.5 >+++ src/org/eclipse/pde/build/IFetchFactory.java 10 Feb 2010 20:35:25 -0000 >@@ -91,6 +91,8 @@ > * to fetch the element. This value is for example used to generate the "qualifier" value of a version number. > * Note that {@link #KEY_ELEMENT_NAME} and {@link #KEY_ELEMENT_TYPE} are reserved entries whose values respectively > * refer to the name of the element being fetched and its type. >+ * Since 3.6, factories may optionally set {@link Constants#KEY_REPOSITORY_PROVIDER_ID} and {@link Constants#KEY_PROJECT_REFERENCE} >+ * to support the inclusion of project references in a bundle manifest. > * @throws CoreException if the rawEntry is incorrect. > */ > public void parseMapFileEntry(String rawEntry, Properties overrideTags, Map entryInfos) throws CoreException; >Index: src/org/eclipse/pde/internal/build/fetch/CVSFetchTaskFactory.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/fetch/CVSFetchTaskFactory.java,v >retrieving revision 1.14 >diff -u -r1.14 CVSFetchTaskFactory.java >--- src/org/eclipse/pde/internal/build/fetch/CVSFetchTaskFactory.java 25 May 2009 15:45:36 -0000 1.14 >+++ src/org/eclipse/pde/internal/build/fetch/CVSFetchTaskFactory.java 10 Feb 2010 20:35:25 -0000 >@@ -59,6 +59,9 @@ > private static final String PROP_FILETOCHECK = "fileToCheck"; //$NON-NLS-1$ > private static final String PROP_ELEMENTNAME = "elementName"; //$NON-NLS-1$ > >+ //Associated repository provider >+ private static final String CVS_ID = "org.eclipse.team.cvs.core.cvsnature"; //$NON-NLS-1$ >+ > private void generateAuthentificationAntTask(Map entryInfos, IAntScript script) { > String password = (String) entryInfos.get(KEY_PASSWORD); > String cvsPassFileLocation = (String) entryInfos.get(KEY_CVSPASSFILE); >@@ -180,6 +183,7 @@ > int index = arg.indexOf('='); > if (index == -1) { > legacyParseMapFileEntry(arguments, overrideTags, entryInfos); >+ addProjectReference(entryInfos); > return; > } > String key = arg.substring(0, index); >@@ -197,6 +201,44 @@ > entryInfos.put(KEY_PASSWORD, table.get(KEY_PASSWORD)); > entryInfos.put(KEY_PATH, table.get(KEY_PATH)); > entryInfos.put(KEY_PREBUILT, table.get(KEY_PREBUILT)); >+ addProjectReference(entryInfos); >+ } >+ >+ private void addProjectReference(Map entryInfos) { >+ String repoLocation = (String) entryInfos.get(KEY_CVSROOT); >+ String module = (String) entryInfos.get(KEY_PATH); >+ String projectName = (String) entryInfos.get(KEY_ELEMENT_NAME); >+ String tag = (String) entryInfos.get(IFetchFactory.KEY_ELEMENT_TAG); >+ if (repoLocation != null && module != null && projectName != null) { >+ entryInfos.put(Constants.KEY_REPOSITORY_PROVIDER_ID, CVS_ID); >+ entryInfos.put(Constants.KEY_PROJECT_REFERENCE, asReference(repoLocation, module, projectName, tag)); >+ } >+ } >+ >+ /** >+ * Creates a project reference memento. >+ * >+ * @param repoLocation >+ * @param module >+ * @param projectName >+ * @return project reference string >+ */ >+ private String asReference(String repoLocation, String module, String projectName, String tagName) { >+ StringBuffer buffer = new StringBuffer(); >+ buffer.append("1.0,"); //$NON-NLS-1$ >+ >+ buffer.append(repoLocation); >+ buffer.append(","); //$NON-NLS-1$ >+ >+ buffer.append(module); >+ buffer.append(","); //$NON-NLS-1$ >+ >+ buffer.append(projectName); >+ if (tagName != null) { >+ buffer.append(","); //$NON-NLS-1$ >+ buffer.append(tagName); >+ } >+ return buffer.toString(); > } > > /**
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 243582
:
158774
|
160008
|
160150
|
160528
|
160673
|
160676
|
160857