Lines 1-5
Link Here
|
1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
2 |
* Copyright (c) 2007, 2010 IBM Corporation and others. |
2 |
* Copyright (c) 2007, 2011 IBM Corporation and others. |
3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
Lines 32-38
Link Here
|
32 |
* simple configurator and update configurator, we change the start level as they |
32 |
* simple configurator and update configurator, we change the start level as they |
33 |
* shouldn't be started together. |
33 |
* shouldn't be started together. |
34 |
*/ |
34 |
*/ |
35 |
public static final String DEFAULT_UPDATE_CONFIGURATOR_START_LEVEL = "3:true"; //$NON-NLS-1$ |
35 |
public static final String DEFAULT_UPDATE_CONFIGURATOR_START_LEVEL_TEXT = "3"; //$NON-NLS-1$ |
|
|
36 |
public static final String DEFAULT_UPDATE_CONFIGURATOR_AUTO_START_TEXT = "true"; //$NON-NLS-1$ |
37 |
public static final String DEFAULT_UPDATE_CONFIGURATOR_START_LEVEL = DEFAULT_UPDATE_CONFIGURATOR_START_LEVEL_TEXT + ":" + DEFAULT_UPDATE_CONFIGURATOR_AUTO_START_TEXT; //$NON-NLS-1$ |
36 |
|
38 |
|
37 |
public static final char VERSION_SEPARATOR = '*'; |
39 |
public static final char VERSION_SEPARATOR = '*'; |
38 |
|
40 |
|
Lines 358-363
Link Here
|
358 |
return map; |
360 |
return map; |
359 |
} |
361 |
} |
360 |
|
362 |
|
|
|
363 |
public static String resolveSystemRunLevelText(IPluginModelBase model) { |
364 |
BundleDescription description = model.getBundleDescription(); |
365 |
String modelName = description.getSymbolicName(); |
366 |
|
367 |
if (IPDEBuildConstants.BUNDLE_DS.equals(modelName)) { |
368 |
return "1"; //$NON-NLS-1$ |
369 |
} else if (IPDEBuildConstants.BUNDLE_SIMPLE_CONFIGURATOR.equals(modelName)) { |
370 |
return "1"; //$NON-NLS-1$ |
371 |
} else if (IPDEBuildConstants.BUNDLE_EQUINOX_COMMON.equals(modelName)) { |
372 |
return "2"; //$NON-NLS-1$ |
373 |
} else if (IPDEBuildConstants.BUNDLE_OSGI.equals(modelName)) { |
374 |
return "-1"; //$NON-NLS-1$ |
375 |
} else if (IPDEBuildConstants.BUNDLE_UPDATE_CONFIGURATOR.equals(modelName)) { |
376 |
return DEFAULT_UPDATE_CONFIGURATOR_START_LEVEL_TEXT; |
377 |
} else if (IPDEBuildConstants.BUNDLE_CORE_RUNTIME.equals(modelName)) { |
378 |
if (TargetPlatformHelper.getTargetVersion() > 3.1) { |
379 |
return "default"; //$NON-NLS-1$ |
380 |
} |
381 |
return "2"; //$NON-NLS-1$ |
382 |
} else { |
383 |
return null; |
384 |
} |
385 |
} |
386 |
|
387 |
public static String resolveSystemAutoText(IPluginModelBase model) { |
388 |
BundleDescription description = model.getBundleDescription(); |
389 |
String modelName = description.getSymbolicName(); |
390 |
|
391 |
if (IPDEBuildConstants.BUNDLE_DS.equals(modelName)) { |
392 |
return "true"; //$NON-NLS-1$ |
393 |
} else if (IPDEBuildConstants.BUNDLE_SIMPLE_CONFIGURATOR.equals(modelName)) { |
394 |
return "true"; //$NON-NLS-1$ |
395 |
} else if (IPDEBuildConstants.BUNDLE_EQUINOX_COMMON.equals(modelName)) { |
396 |
return "true"; //$NON-NLS-1$ |
397 |
} else if (IPDEBuildConstants.BUNDLE_OSGI.equals(modelName)) { |
398 |
return "true"; //$NON-NLS-1$ |
399 |
} else if (IPDEBuildConstants.BUNDLE_UPDATE_CONFIGURATOR.equals(modelName)) { |
400 |
return DEFAULT_UPDATE_CONFIGURATOR_AUTO_START_TEXT; |
401 |
} else if (IPDEBuildConstants.BUNDLE_CORE_RUNTIME.equals(modelName)) { |
402 |
if (TargetPlatformHelper.getTargetVersion() > 3.1) { |
403 |
return "true"; //$NON-NLS-1$ |
404 |
} |
405 |
return "true"; //$NON-NLS-1$ |
406 |
} else { |
407 |
return null; |
408 |
} |
409 |
} |
410 |
|
361 |
/** |
411 |
/** |
362 |
* Adds the given bundle and start information to the map. This will override anything set |
412 |
* Adds the given bundle and start information to the map. This will override anything set |
363 |
* for system bundles, and set their start level to the appropriate level |
413 |
* for system bundles, and set their start level to the appropriate level |
Lines 369-391
Link Here
|
369 |
BundleDescription desc = bundle.getBundleDescription(); |
419 |
BundleDescription desc = bundle.getBundleDescription(); |
370 |
boolean defaultsl = (sl == null || sl.equals("default:default")); //$NON-NLS-1$ |
420 |
boolean defaultsl = (sl == null || sl.equals("default:default")); //$NON-NLS-1$ |
371 |
if (desc != null && defaultsl) { |
421 |
if (desc != null && defaultsl) { |
372 |
String modelName = desc.getSymbolicName(); |
422 |
String runLevelText = resolveSystemRunLevelText(bundle); |
373 |
if (IPDEBuildConstants.BUNDLE_DS.equals(modelName)) { |
423 |
String autoText = resolveSystemAutoText(bundle); |
374 |
map.put(bundle, "1:true"); //$NON-NLS-1$ |
424 |
if (runLevelText != null && autoText != null) { |
375 |
} else if (IPDEBuildConstants.BUNDLE_SIMPLE_CONFIGURATOR.equals(modelName)) { |
425 |
map.put(bundle, runLevelText + ":" + autoText); //$NON-NLS-1$ |
376 |
map.put(bundle, "1:true"); //$NON-NLS-1$ |
|
|
377 |
} else if (IPDEBuildConstants.BUNDLE_EQUINOX_COMMON.equals(modelName)) { |
378 |
map.put(bundle, "2:true"); //$NON-NLS-1$ |
379 |
} else if (IPDEBuildConstants.BUNDLE_OSGI.equals(modelName)) { |
380 |
map.put(bundle, "-1:true"); //$NON-NLS-1$ |
381 |
} else if (IPDEBuildConstants.BUNDLE_UPDATE_CONFIGURATOR.equals(modelName)) { |
382 |
map.put(bundle, DEFAULT_UPDATE_CONFIGURATOR_START_LEVEL); |
383 |
} else if (IPDEBuildConstants.BUNDLE_CORE_RUNTIME.equals(modelName)) { |
384 |
if (TargetPlatformHelper.getTargetVersion() > 3.1) { |
385 |
map.put(bundle, "default:true"); //$NON-NLS-1$ |
386 |
} else { |
387 |
map.put(bundle, "2:true"); //$NON-NLS-1$ |
388 |
} |
389 |
} else { |
426 |
} else { |
390 |
map.put(bundle, sl); |
427 |
map.put(bundle, sl); |
391 |
} |
428 |
} |