return;
}
IDEWorkbenchPlugin.getDefault().getPreferenceStore().setValue(
IDEInternalPreferences.WELCOME_DIALOG, false);
openWelcomeEditor(window, new WelcomeEditorInput(productInfo), null);
} else {
// Show the welcome page for any newly installed features
List welcomeFeatures = new ArrayList();
for (Iterator it = wbAdvisor.getNewlyAddedBundleGroups().entrySet()
.iterator(); it.hasNext();) {
Map.Entry entry = (Map.Entry) it.next();
AboutInfo info = (AboutInfo) entry.getValue();
if (info != null && info.getWelcomePageURL() != null) {
welcomeFeatures.add(info);
// activate the feature plug-in so it can run some install
// code
String pi = info.getBrandingBundleId();
if (pi != null) {
// Start the bundle if there is one
Bundle bundle = Platform.getBundle(pi);
if (bundle != null) {
try {
bundle.start(Bundle.START_TRANSIENT);
} catch (BundleException exception) {
StatusManager
.getManager()
.handle(
new Status(
IStatus.ERROR,
IDEApplication.PLUGIN_ID,
"Failed to load feature", exception));//$NON-NLS-1$
}
}
}
}
}
int wCount = getWorkbench().getWorkbenchWindowCount();
for (int i = 0; i < welcomeFeatures.size(); i++) {
AboutInfo newInfo = (AboutInfo) welcomeFeatures.get(i);
String id = newInfo.getWelcomePerspectiveId();
// Other editors were already opened in postWindowRestore(..)
if (id == null || i >= wCount) {
openWelcomeEditor(window, new WelcomeEditorInput(newInfo),
id);
}
}
}
}