|
Lines 10-27
Link Here
|
| 10 |
*******************************************************************************/ |
10 |
*******************************************************************************/ |
| 11 |
package org.eclipse.pde.internal.core.importing; |
11 |
package org.eclipse.pde.internal.core.importing; |
| 12 |
|
12 |
|
| 13 |
import org.eclipse.pde.internal.core.importing.provisional.BundleImportDescription; |
|
|
| 14 |
import org.eclipse.pde.internal.core.importing.provisional.IBundleImporterDelegate; |
| 15 |
|
| 16 |
import java.util.*; |
13 |
import java.util.*; |
| 17 |
import org.eclipse.core.resources.IProject; |
14 |
import org.eclipse.core.resources.IProject; |
| 18 |
import org.eclipse.core.runtime.*; |
15 |
import org.eclipse.core.runtime.*; |
| 19 |
import org.eclipse.osgi.util.ManifestElement; |
16 |
import org.eclipse.osgi.util.ManifestElement; |
| 20 |
import org.eclipse.pde.internal.core.ICoreConstants; |
17 |
import org.eclipse.pde.internal.core.ICoreConstants; |
| 21 |
import org.eclipse.pde.internal.core.PDECore; |
18 |
import org.eclipse.pde.internal.core.PDECore; |
|
|
19 |
import org.eclipse.pde.internal.core.importing.provisional.BundleImportDescription; |
| 20 |
import org.eclipse.pde.internal.core.importing.provisional.IBundleImporterDelegate; |
| 22 |
import org.eclipse.team.core.*; |
21 |
import org.eclipse.team.core.*; |
| 23 |
import org.osgi.framework.BundleException; |
22 |
import org.osgi.framework.BundleException; |
| 24 |
import org.osgi.framework.Constants; |
|
|
| 25 |
|
23 |
|
| 26 |
/** |
24 |
/** |
| 27 |
* Handles SCM CVS headers of the following form. Tag and project name can be specified |
25 |
* Handles SCM CVS headers of the following form. Tag and project name can be specified |
|
Lines 79-89
Link Here
|
| 79 |
String tag = element.getAttribute(ATTR_TAG); |
77 |
String tag = element.getAttribute(ATTR_TAG); |
| 80 |
String project = element.getAttribute(ATTR_PROJECT); |
78 |
String project = element.getAttribute(ATTR_PROJECT); |
| 81 |
if (project == null) { |
79 |
if (project == null) { |
| 82 |
String bsn = (String) manifests[i].get(Constants.BUNDLE_SYMBOLICNAME); |
80 |
String[] paths = url.split("/"); //$NON-NLS-1$ |
| 83 |
if (bsn != null) { |
81 |
if (paths != null && paths.length > 0) |
| 84 |
ManifestElement[] bsnElement = ManifestElement.parseHeader(Constants.BUNDLE_SYMBOLICNAME, bsn); |
82 |
project = paths[paths.length - 1]; |
| 85 |
project = bsnElement[0].getValue(); |
|
|
| 86 |
} |
| 87 |
} |
83 |
} |
| 88 |
results[i] = createImportDescription(url, manifest, tag, project); |
84 |
results[i] = createImportDescription(url, manifest, tag, project); |
| 89 |
} |
85 |
} |