|
Lines 1-5
Link Here
|
| 1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2000, 2011 IBM Corporation and others. |
2 |
* Copyright (c) 2000, 2012 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 8-13
Link Here
|
| 8 |
* Contributors: |
8 |
* Contributors: |
| 9 |
* IBM Corporation - initial API and implementation |
9 |
* IBM Corporation - initial API and implementation |
| 10 |
* Andreas Buchen <andreas.buchen@sap.com> - Bug 206584 |
10 |
* Andreas Buchen <andreas.buchen@sap.com> - Bug 206584 |
|
|
11 |
* Red Hat, Inc. - Bug 370119 |
| 11 |
*******************************************************************************/ |
12 |
*******************************************************************************/ |
| 12 |
package org.eclipse.ui.internal.ide; |
13 |
package org.eclipse.ui.internal.ide; |
| 13 |
|
14 |
|
|
Lines 1017-1023
Link Here
|
| 1017 |
|
1018 |
|
| 1018 |
|
1019 |
|
| 1019 |
|
1020 |
|
| 1020 |
makeFeatureDependentActions(window); |
1021 |
makeFeatureDependentActions(window, window.getWorkbench().getIntroManager().hasIntro()); |
| 1021 |
|
1022 |
|
| 1022 |
// Actions for invisible accelerators |
1023 |
// Actions for invisible accelerators |
| 1023 |
showViewMenuAction = ActionFactory.SHOW_VIEW_MENU.create(window); |
1024 |
showViewMenuAction = ActionFactory.SHOW_VIEW_MENU.create(window); |
|
Lines 1174-1180
Link Here
|
| 1174 |
/** |
1175 |
/** |
| 1175 |
* Creates the feature-dependent actions for the menu bar. |
1176 |
* Creates the feature-dependent actions for the menu bar. |
| 1176 |
*/ |
1177 |
*/ |
| 1177 |
private void makeFeatureDependentActions(IWorkbenchWindow window) { |
1178 |
private void makeFeatureDependentActions(IWorkbenchWindow window, boolean hasIntroPage) { |
| 1178 |
AboutInfo[] infos = null; |
1179 |
AboutInfo[] infos = null; |
| 1179 |
|
1180 |
|
| 1180 |
IPreferenceStore prefs = IDEWorkbenchPlugin.getDefault().getPreferenceStore(); |
1181 |
IPreferenceStore prefs = IDEWorkbenchPlugin.getDefault().getPreferenceStore(); |
|
Lines 1193-1214
Link Here
|
| 1193 |
// Optimization: if welcome pages were found on a previous run, then just add the action. |
1194 |
// Optimization: if welcome pages were found on a previous run, then just add the action. |
| 1194 |
String quickStartKey = IDEActionFactory.QUICK_START.getId(); |
1195 |
String quickStartKey = IDEActionFactory.QUICK_START.getId(); |
| 1195 |
String showQuickStart = prefs.getString(quickStartKey); |
1196 |
String showQuickStart = prefs.getString(quickStartKey); |
| 1196 |
if (sameState && "true".equals(showQuickStart)) { //$NON-NLS-1$ |
1197 |
// if there is an intro, do not bother displaying legacy welcomes. |
| 1197 |
quickStartAction = IDEActionFactory.QUICK_START.create(window); |
1198 |
if(!hasIntroPage){ |
| 1198 |
register(quickStartAction); |
1199 |
if (sameState && "true".equals(showQuickStart)) { //$NON-NLS-1$ |
| 1199 |
} |
1200 |
quickStartAction = IDEActionFactory.QUICK_START.create(window); |
| 1200 |
else if (sameState && "false".equals(showQuickStart)) { //$NON-NLS-1$ |
1201 |
register(quickStartAction); |
| 1201 |
// do nothing |
1202 |
} else if (sameState && "false".equals(showQuickStart)) { //$NON-NLS-1$ |
| 1202 |
} |
1203 |
// do nothing |
| 1203 |
else { |
1204 |
} else { |
| 1204 |
// do the work |
1205 |
// do the work |
| 1205 |
infos = IDEWorkbenchPlugin.getDefault().getFeatureInfos(); |
1206 |
infos = IDEWorkbenchPlugin.getDefault().getFeatureInfos(); |
| 1206 |
boolean found = hasWelcomePage(infos); |
1207 |
boolean found = hasWelcomePage(infos); |
| 1207 |
prefs.setValue(quickStartKey, String.valueOf(found)); |
1208 |
prefs.setValue(quickStartKey, String.valueOf(found)); |
| 1208 |
if (found) { |
1209 |
if (found) { |
| 1209 |
quickStartAction = IDEActionFactory.QUICK_START.create(window); |
1210 |
quickStartAction = IDEActionFactory.QUICK_START |
| 1210 |
register(quickStartAction); |
1211 |
.create(window); |
| 1211 |
} |
1212 |
register(quickStartAction); |
|
|
1213 |
} |
| 1214 |
} |
| 1212 |
} |
1215 |
} |
| 1213 |
|
1216 |
|
| 1214 |
// See if a tips and tricks page is specified. |
1217 |
// See if a tips and tricks page is specified. |