|
Lines 43-48
Link Here
|
| 43 |
private Dictionary generatedManifest; |
43 |
private Dictionary generatedManifest; |
| 44 |
private byte manifestType; |
44 |
private byte manifestType; |
| 45 |
private String target; |
45 |
private String target; |
|
|
46 |
private Dictionary devProperties; |
| 46 |
static final String TARGET31 = "3.1"; //$NON-NLS-1$ |
47 |
static final String TARGET31 = "3.1"; //$NON-NLS-1$ |
| 47 |
private static final String MANIFEST_VERSION = "Manifest-Version"; //$NON-NLS-1$ |
48 |
private static final String MANIFEST_VERSION = "Manifest-Version"; //$NON-NLS-1$ |
| 48 |
private static final String PLUGIN_PROPERTIES_FILENAME = "plugin"; //$NON-NLS-1$ |
49 |
private static final String PLUGIN_PROPERTIES_FILENAME = "plugin"; //$NON-NLS-1$ |
|
Lines 80-85
Link Here
|
| 80 |
generatedManifest = new Hashtable(10); |
81 |
generatedManifest = new Hashtable(10); |
| 81 |
manifestType = EclipseBundleData.MANIFEST_TYPE_UNKNOWN; |
82 |
manifestType = EclipseBundleData.MANIFEST_TYPE_UNKNOWN; |
| 82 |
target = null; |
83 |
target = null; |
|
|
84 |
devProperties = null; |
| 83 |
} |
85 |
} |
| 84 |
|
86 |
|
| 85 |
private void fillPluginInfo(File pluginBaseLocation) throws PluginConversionException { |
87 |
private void fillPluginInfo(File pluginBaseLocation) throws PluginConversionException { |
|
Lines 396-403
Link Here
|
| 396 |
return null; |
398 |
return null; |
| 397 |
|
399 |
|
| 398 |
//If we are in dev mode, then add the binary folders on the list libs with the export clause set to be the cumulation of the export clause of the real libs |
400 |
//If we are in dev mode, then add the binary folders on the list libs with the export clause set to be the cumulation of the export clause of the real libs |
| 399 |
if (DevClassPathHelper.inDevelopmentMode()) { |
401 |
if (devProperties != null || DevClassPathHelper.inDevelopmentMode()) { |
| 400 |
String[] devClassPath = DevClassPathHelper.getDevClassPath(pluginInfo.getUniqueId()); |
402 |
String[] devClassPath = DevClassPathHelper.getDevClassPath(pluginInfo.getUniqueId(), devProperties); |
| 401 |
|
403 |
|
| 402 |
// collect export clauses |
404 |
// collect export clauses |
| 403 |
List allExportClauses = new ArrayList(libs.size()); |
405 |
List allExportClauses = new ArrayList(libs.size()); |
|
Lines 421-427
Link Here
|
| 421 |
continue; |
423 |
continue; |
| 422 |
String libEntryText = (String) element.getKey(); |
424 |
String libEntryText = (String) element.getKey(); |
| 423 |
File libraryLocation; |
425 |
File libraryLocation; |
| 424 |
if (DevClassPathHelper.inDevelopmentMode()) { |
426 |
if (devProperties != null || DevClassPathHelper.inDevelopmentMode()) { |
| 425 |
// in development time, libEntries may contain absolute locations (linked folders) |
427 |
// in development time, libEntries may contain absolute locations (linked folders) |
| 426 |
File libEntryAsPath = new File(libEntryText); |
428 |
File libEntryAsPath = new File(libEntryText); |
| 427 |
libraryLocation = libEntryAsPath.isAbsolute() ? libEntryAsPath : new File(pluginManifestLocation, libEntryText); |
429 |
libraryLocation = libEntryAsPath.isAbsolute() ? libEntryAsPath : new File(pluginManifestLocation, libEntryText); |
|
Lines 654-684
Link Here
|
| 654 |
return result.toString(); |
656 |
return result.toString(); |
| 655 |
} |
657 |
} |
| 656 |
|
658 |
|
| 657 |
public synchronized Dictionary convertManifest(File pluginBaseLocation, boolean compatibility, String target, boolean analyseJars) throws PluginConversionException { |
659 |
public synchronized Dictionary convertManifest(File pluginBaseLocation, boolean compatibility, String target, boolean analyseJars, Dictionary devProperties) throws PluginConversionException { |
| 658 |
if (DEBUG) |
660 |
if (DEBUG) |
| 659 |
System.out.println("Convert " + pluginBaseLocation); //$NON-NLS-1$ |
661 |
System.out.println("Convert " + pluginBaseLocation); //$NON-NLS-1$ |
| 660 |
init(); |
662 |
init(); |
| 661 |
this.target = target == null ? TARGET31 : target; |
663 |
this.target = target == null ? TARGET31 : target; |
|
|
664 |
this.devProperties = devProperties; |
| 662 |
fillPluginInfo(pluginBaseLocation); |
665 |
fillPluginInfo(pluginBaseLocation); |
| 663 |
fillManifest(compatibility, analyseJars); |
666 |
fillManifest(compatibility, analyseJars); |
| 664 |
return generatedManifest; |
667 |
return generatedManifest; |
| 665 |
} |
668 |
} |
| 666 |
|
669 |
|
| 667 |
public synchronized File convertManifest(File pluginBaseLocation, File bundleManifestLocation, boolean compatibilityManifest, String target, boolean analyseJars) throws PluginConversionException { |
670 |
public synchronized Dictionary convertManifest(File pluginBaseLocation, boolean compatibility, String target, boolean analyseJars) throws PluginConversionException { |
| 668 |
if (DEBUG) |
671 |
return convertManifest(pluginBaseLocation, compatibility, target, analyseJars, null); |
| 669 |
System.out.println("Convert " + pluginBaseLocation); //$NON-NLS-1$ |
672 |
} |
| 670 |
init(); |
673 |
|
| 671 |
this.target = target == null ? TARGET31 : target; |
674 |
public synchronized File convertManifest(File pluginBaseLocation, File bundleManifestLocation, boolean compatibilityManifest, String target, boolean analyseJars, Dictionary devProperties) throws PluginConversionException { |
| 672 |
fillPluginInfo(pluginBaseLocation); |
675 |
convertManifest(pluginBaseLocation, compatibilityManifest, target, analyseJars, devProperties); |
| 673 |
if (bundleManifestLocation == null) { |
676 |
if (bundleManifestLocation == null) { |
| 674 |
String cacheLocation = (String) System.getProperties().get(LocationManager.PROP_MANIFEST_CACHE); |
677 |
String cacheLocation = (String) System.getProperties().get(LocationManager.PROP_MANIFEST_CACHE); |
| 675 |
bundleManifestLocation = new File(cacheLocation, pluginInfo.getUniqueId() + '_' + pluginInfo.getVersion() + ".MF"); //$NON-NLS-1$ |
678 |
bundleManifestLocation = new File(cacheLocation, pluginInfo.getUniqueId() + '_' + pluginInfo.getVersion() + ".MF"); //$NON-NLS-1$ |
| 676 |
} |
679 |
} |
| 677 |
fillManifest(compatibilityManifest, analyseJars); |
|
|
| 678 |
if (upToDate(bundleManifestLocation, pluginManifestLocation, manifestType)) |
680 |
if (upToDate(bundleManifestLocation, pluginManifestLocation, manifestType)) |
| 679 |
return bundleManifestLocation; |
681 |
return bundleManifestLocation; |
| 680 |
writeManifest(bundleManifestLocation, generatedManifest, compatibilityManifest); |
682 |
writeManifest(bundleManifestLocation, generatedManifest, compatibilityManifest); |
| 681 |
return bundleManifestLocation; |
683 |
return bundleManifestLocation; |
|
|
684 |
} |
| 685 |
|
| 686 |
public synchronized File convertManifest(File pluginBaseLocation, File bundleManifestLocation, boolean compatibilityManifest, String target, boolean analyseJars) throws PluginConversionException { |
| 687 |
return convertManifest(pluginBaseLocation, bundleManifestLocation, compatibilityManifest, target, analyseJars, null); |
| 682 |
} |
688 |
} |
| 683 |
|
689 |
|
| 684 |
private String getVersionRange(String reqVersion, String matchRule) { |
690 |
private String getVersionRange(String reqVersion, String matchRule) { |