mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
Bug 521265 - Check that the platform is running before querying bundle group providers in CCorePlugin.getCDTFeatureVersion()
Change-Id: I5910e8c7decd7c8a347ca640f9c99875ad95fcf6
This commit is contained in:
parent
a0ab38124c
commit
398ca82b48
1 changed files with 9 additions and 7 deletions
|
@ -1641,13 +1641,15 @@ public class CCorePlugin extends Plugin {
|
|||
* @since 6.3
|
||||
*/
|
||||
public static Version getCDTFeatureVersion() {
|
||||
IBundleGroupProvider[] providers = Platform.getBundleGroupProviders();
|
||||
if (providers != null) {
|
||||
for (IBundleGroupProvider provider : providers) {
|
||||
IBundleGroup[] bundleGroups = provider.getBundleGroups();
|
||||
for (IBundleGroup group : bundleGroups) {
|
||||
if (group.getIdentifier().equals(CDT_FEATURE_ID)) {
|
||||
return new Version(group.getVersion());
|
||||
if (Platform.isRunning()) {
|
||||
IBundleGroupProvider[] providers = Platform.getBundleGroupProviders();
|
||||
if (providers != null) {
|
||||
for (IBundleGroupProvider provider : providers) {
|
||||
IBundleGroup[] bundleGroups = provider.getBundleGroups();
|
||||
for (IBundleGroup group : bundleGroups) {
|
||||
if (group.getIdentifier().equals(CDT_FEATURE_ID)) {
|
||||
return new Version(group.getVersion());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue