Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Muskalla2009-09-10 10:56:01 +0000
committerBenjamin Muskalla2009-09-10 10:56:01 +0000
commit27922934bdb70834af6f1788212830198c3228c2 (patch)
tree41a87e8f2c6bf2dfb83c3979da60e2d06f5b3a70 /bundles
parent164d841bc470a31b62046d6acdcc45a8bab0f326 (diff)
downloadorg.eclipse.rap-27922934bdb70834af6f1788212830198c3228c2.tar.gz
org.eclipse.rap-27922934bdb70834af6f1788212830198c3228c2.tar.xz
org.eclipse.rap-27922934bdb70834af6f1788212830198c3228c2.zip
fixed bug 278358: Support Workbench Help System
Diffstat (limited to 'bundles')
-rwxr-xr-xbundles/org.eclipse.rap.jface/src/org/eclipse/jface/action/ActionContributionItem.java7
-rwxr-xr-xbundles/org.eclipse.rap.jface/src/org/eclipse/jface/dialogs/StatusDialog.java18
-rwxr-xr-xbundles/org.eclipse.rap.jface/src/org/eclipse/jface/dialogs/TrayDialog.java121
-rwxr-xr-xbundles/org.eclipse.rap.jface/src/org/eclipse/jface/preference/PreferenceDialog.java20
-rwxr-xr-xbundles/org.eclipse.rap.jface/src/org/eclipse/jface/preference/PreferencePage.java7
-rwxr-xr-xbundles/org.eclipse.rap.jface/src/org/eclipse/jface/wizard/WizardDialog.java3
-rw-r--r--bundles/org.eclipse.rap.ui.cheatsheets/META-INF/MANIFEST.MF3
-rw-r--r--bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/cheatsheets/OpenCheatSheetFromHelpAction.java121
-rw-r--r--bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/CheatSheetPlugin.java6
-rw-r--r--bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/parser/CompositeCheatSheetParser.java6
-rw-r--r--bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/data/CheatSheetParser.java118
-rw-r--r--bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/dialogs/CheatSheetCategoryBasedSelectionDialog.java7
-rw-r--r--bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetView.java8
-rw-r--r--bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/ViewItem.java84
-rw-r--r--bundles/org.eclipse.rap.ui.views/META-INF/MANIFEST.MF3
-rw-r--r--bundles/org.eclipse.rap.ui.views/src/org/eclipse/ui/views/contentoutline/ContentOutline.java5
-rw-r--r--bundles/org.eclipse.rap.ui.views/src/org/eclipse/ui/views/properties/CategoriesAction.java7
-rw-r--r--bundles/org.eclipse.rap.ui.views/src/org/eclipse/ui/views/properties/DefaultsAction.java7
-rw-r--r--bundles/org.eclipse.rap.ui.views/src/org/eclipse/ui/views/properties/FilterAction.java7
-rw-r--r--bundles/org.eclipse.rap.ui.views/src/org/eclipse/ui/views/properties/PropertySheet.java7
-rw-r--r--bundles/org.eclipse.rap.ui.views/src/org/eclipse/ui/views/properties/PropertySheetPage.java102
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbench.java15
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPreferenceConstants.java67
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ActionFactory.java214
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ContributionItemFactory.java30
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ExportResourcesAction.java7
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ImportResourcesAction.java7
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/NewWizardAction.java12
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/OpenInNewWindowAction.java7
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/OpenPerspectiveAction.java7
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/activities/ActivityCategoryPreferencePage.java48
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ICommandService.java27
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/EditorSelectionDialog.java12
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/ListSelectionDialog.java8
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/PropertyDialogAction.java9
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/SelectionStatusDialog.java16
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/TypeFilteringDialog.java7
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/YesNoCancelListSelectionDialog.java9
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/handlers/IHandlerService.java26
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/help/AbstractHelpUI.java288
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/help/DialogPageContextComputer.java248
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/help/IContextComputer.java117
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/help/IWorkbenchHelpSystem.java423
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/help/ViewContextComputer.java242
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/help/WorkbenchHelp.java846
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ActionDescriptor.java26
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CloseAllSavedAction.java5
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IntroAction.java5
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/LockToolBarAction.java5
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/NavigationHistoryAction.java10
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/OpenPreferencesAction.java5
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ResetPerspectiveAction.java5
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveAction.java5
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveAllAction.java5
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveAsAction.java5
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SavePerspectiveAction.java5
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowInAction.java5
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowViewAction.java5
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowViewMenu.java5
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ToggleEditorsVisibilityAction.java5
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java13
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java7
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/ClearWorkingSetAction.java8
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/DynamicHelpAction.java208
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/EditWorkingSetAction.java8
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/HelpContentsAction.java187
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/HelpSearchAction.java187
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/HelpSearchContributionItem.java236
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/ModifyWorkingSetDelegate.java7
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/NewWizardShortcutAction.java7
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/SelectWorkingSetAction.java7
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/SlaveCommandService.java10
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/AbstractWorkingSetDialog.java12
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/CustomizePerspectiveDialog.java9
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/DecoratorsPreferencePage.java9
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/EditorsPreferencePage.java9
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ExportPage.java7
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ExportWizard.java7
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ImportPage.java9
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ImportWizard.java13
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/NewWizardSelectionPage.java7
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PerspectivesPreferencePage.java9
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PropertyDialog.java11
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/SavePerspectiveDialog.java9
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/SelectPerspectiveDialog.java7
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ShowViewDialog.java7
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/StartupPreferencePage.java9
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchEditorsDialog.java9
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchPreferenceDialog.java9
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchPreferencePage.java7
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkingSetSelectionDialog.java7
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkingSetTypePage.java9
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/DisplayHelpHandler.java85
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HandlerPersistence.java8
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HandlerService.java9
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/SlaveHandlerService.java9
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/WizardHandler.java19
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/help/WorkbenchHelpSystem.java2029
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/LegacyActionPersistence.java10
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/DetailedProgressViewer.java12
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressView.java22
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/menus/CommandContributionItem.java55
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/part/CellEditorActionHandler.java28
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/META-INF/MANIFEST.MF1
-rwxr-xr-xbundles/org.eclipse.rap.ui/plugin.xml4
-rwxr-xr-xbundles/org.eclipse.rap.ui/schema/commands.exsd6
106 files changed, 3364 insertions, 3453 deletions
diff --git a/bundles/org.eclipse.rap.jface/src/org/eclipse/jface/action/ActionContributionItem.java b/bundles/org.eclipse.rap.jface/src/org/eclipse/jface/action/ActionContributionItem.java
index da314be9c3..d492951acd 100755
--- a/bundles/org.eclipse.rap.jface/src/org/eclipse/jface/action/ActionContributionItem.java
+++ b/bundles/org.eclipse.rap.jface/src/org/eclipse/jface/action/ActionContributionItem.java
@@ -1317,9 +1317,9 @@ public class ActionContributionItem extends ContributionItem {
// pass through any events
proxyItem.addListener(SWT.Selection, passThrough);
- // RAP [bm]:
+ // RAP [bm]: SWT.Arm missing
// proxyItem.addListener(SWT.Arm, passThrough);
-// proxyItem.addListener(SWT.Help, passThrough);
+ proxyItem.addListener(SWT.Help, passThrough);
final Menu itemMenu = realItem.getMenu();
if (itemMenu != null) {
@@ -1335,8 +1335,7 @@ public class ActionContributionItem extends ContributionItem {
}
}
});
- // RAP [bm]:
-// subMenu.addListener(SWT.Help, passThrough);
+ subMenu.addListener(SWT.Help, passThrough);
subMenu.addListener(SWT.Hide, passThrough);
}
}
diff --git a/bundles/org.eclipse.rap.jface/src/org/eclipse/jface/dialogs/StatusDialog.java b/bundles/org.eclipse.rap.jface/src/org/eclipse/jface/dialogs/StatusDialog.java
index 376b48c734..0034055b23 100755
--- a/bundles/org.eclipse.rap.jface/src/org/eclipse/jface/dialogs/StatusDialog.java
+++ b/bundles/org.eclipse.rap.jface/src/org/eclipse/jface/dialogs/StatusDialog.java
@@ -242,22 +242,18 @@ public abstract class StatusDialog extends TrayDialog {
composite.setLayout(layout);
composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- // RAP [bm]:
-// if (!fStatusLineAboveButtons && isHelpAvailable()) {
-// createHelpControl(composite);
-// }
- // RAPEND: [bm]
+ if (!fStatusLineAboveButtons && isHelpAvailable()) {
+ createHelpControl(composite);
+ }
fStatusLine = new MessageLine(composite);
fStatusLine.setAlignment(SWT.LEFT);
GridData statusData = new GridData(GridData.FILL_HORIZONTAL);
fStatusLine.setErrorStatus(null);
- // RAP [bm]:
-// if (fStatusLineAboveButtons && isHelpAvailable()) {
-// statusData.horizontalSpan = 2;
-// createHelpControl(composite);
-// }
- // RAPEND: [bm]
+ if (fStatusLineAboveButtons && isHelpAvailable()) {
+ statusData.horizontalSpan = 2;
+ createHelpControl(composite);
+ }
fStatusLine.setLayoutData(statusData);
applyDialogFont(composite);
diff --git a/bundles/org.eclipse.rap.jface/src/org/eclipse/jface/dialogs/TrayDialog.java b/bundles/org.eclipse.rap.jface/src/org/eclipse/jface/dialogs/TrayDialog.java
index 386fd43caa..af999d0006 100755
--- a/bundles/org.eclipse.rap.jface/src/org/eclipse/jface/dialogs/TrayDialog.java
+++ b/bundles/org.eclipse.rap.jface/src/org/eclipse/jface/dialogs/TrayDialog.java
@@ -10,8 +10,13 @@
*******************************************************************************/
package org.eclipse.jface.dialogs;
+import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.window.IShellProvider;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Cursor;
+import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
@@ -20,9 +25,12 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Layout;
+import org.eclipse.swt.widgets.Link;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Sash;
import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.ToolBar;
+import org.eclipse.swt.widgets.ToolItem;
/**
* A <code>TrayDialog</code> is a specialized <code>Dialog</code> that can contain
@@ -151,11 +159,10 @@ public abstract class TrayDialog extends Dialog {
composite.setFont(parent.getFont());
// create help control if needed
- // RAP [bm]:
-// if (isHelpAvailable()) {
-// Control helpControl = createHelpControl(composite);
-// ((GridData) helpControl.getLayoutData()).horizontalIndent = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
-// }
+ if (isHelpAvailable()) {
+ Control helpControl = createHelpControl(composite);
+ ((GridData) helpControl.getLayoutData()).horizontalIndent = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
+ }
Control buttonSection = super.createButtonBar(composite);
((GridData) buttonSection.getLayoutData()).grabExcessHorizontalSpace = true;
return composite;
@@ -173,62 +180,63 @@ public abstract class TrayDialog extends Dialog {
*
* @param parent the parent composite
* @return the help control
+ * @since 1.3
*/
- // RAP [bm]:
-// protected Control createHelpControl(Composite parent) {
-// Image helpImage = JFaceResources.getImage(DLG_IMG_HELP);
-// if (helpImage != null) {
-// return createHelpImageButton(parent, helpImage);
-// }
-// return createHelpLink(parent);
-// }
+ protected Control createHelpControl(Composite parent) {
+ Image helpImage = JFaceResources.getImage(DLG_IMG_HELP);
+ if (helpImage != null) {
+ return createHelpImageButton(parent, helpImage);
+ }
+ return createHelpLink(parent);
+ }
/*
* Creates a button with a help image. This is only used if there
* is an image available.
*/
- // RAP [bm]:
-// private ToolBar createHelpImageButton(Composite parent, Image image) {
-// ToolBar toolBar = new ToolBar(parent, SWT.FLAT | SWT.NO_FOCUS);
-// ((GridLayout) parent.getLayout()).numColumns++;
-// toolBar.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER));
+ private ToolBar createHelpImageButton(Composite parent, Image image) {
+ ToolBar toolBar = new ToolBar(parent, SWT.FLAT | SWT.NO_FOCUS);
+ ((GridLayout) parent.getLayout()).numColumns++;
+ toolBar.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER));
+ // RAP [bm]: Cursor ctor
// final Cursor cursor = new Cursor(parent.getDisplay(), SWT.CURSOR_HAND);
-// toolBar.setCursor(cursor);
+ final Cursor cursor = parent.getDisplay().getSystemCursor(SWT.CURSOR_HAND);
+ toolBar.setCursor(cursor);
+ // RAP [bm]: Cursor#dispose
// toolBar.addDisposeListener(new DisposeListener() {
// public void widgetDisposed(DisposeEvent e) {
// cursor.dispose();
// }
// });
-//
-// ToolItem item = new ToolItem(toolBar, SWT.NONE);
-// item.setImage(image);
-// item.setToolTipText(JFaceResources.getString("helpToolTip")); //$NON-NLS-1$
-// item.addSelectionListener(new SelectionAdapter() {
-// public void widgetSelected(SelectionEvent e) {
-// helpPressed();
-// }
-// });
-// return toolBar;
-// }
+
+ ToolItem item = new ToolItem(toolBar, SWT.NONE);
+ item.setImage(image);
+ item.setToolTipText(JFaceResources.getString("helpToolTip")); //$NON-NLS-1$
+ item.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ helpPressed();
+ }
+ });
+ return toolBar;
+ }
/*
* Creates a help link. This is used when there is no help image
* available.
*/
- // RAP [bm]:
-// private Link createHelpLink(Composite parent) {
-// Link link = new Link(parent, SWT.WRAP | SWT.NO_FOCUS);
-// ((GridLayout) parent.getLayout()).numColumns++;
-// link.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER));
-// link.setText("<a>"+IDialogConstants.get().HELP_LABEL+"</a>"); //$NON-NLS-1$ //$NON-NLS-2$
-// link.setToolTipText(IDialogConstants.get().HELP_LABEL);
-// link.addSelectionListener(new SelectionAdapter() {
-// public void widgetSelected(SelectionEvent e) {
-// helpPressed();
-// }
-// });
-// return link;
-// }
+ private Link createHelpLink(Composite parent) {
+ Link link = new Link(parent, SWT.WRAP | SWT.NO_FOCUS);
+ ((GridLayout) parent.getLayout()).numColumns++;
+ link.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER));
+ link.setText("<a>"+IDialogConstants.get().HELP_LABEL+"</a>"); //$NON-NLS-1$ //$NON-NLS-2$
+ link.setToolTipText(IDialogConstants.get().HELP_LABEL);
+ link.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ helpPressed();
+ }
+ });
+ return link;
+ }
/*
* Returns whether or not the given layout can support the addition of a tray.
@@ -290,19 +298,18 @@ public abstract class TrayDialog extends Dialog {
* tree upward until it finds a widget that has a help listener on it,
* then invokes a help event on that widget.
*/
- // RAP [bm]:
-// private void helpPressed() {
-// if (getShell() != null) {
-// Control c = getShell().getDisplay().getFocusControl();
-// while (c != null) {
-// if (c.isListening(SWT.Help)) {
-// c.notifyListeners(SWT.Help, new Event());
-// break;
-// }
-// c = c.getParent();
-// }
-// }
-// }
+ private void helpPressed() {
+ if (getShell() != null) {
+ Control c = getShell().getDisplay().getFocusControl();
+ while (c != null) {
+ if (c.isListening(SWT.Help)) {
+ c.notifyListeners(SWT.Help, new Event());
+ break;
+ }
+ c = c.getParent();
+ }
+ }
+ }
/**
* Constructs the tray's widgets and displays the tray in this dialog. The
diff --git a/bundles/org.eclipse.rap.jface/src/org/eclipse/jface/preference/PreferenceDialog.java b/bundles/org.eclipse.rap.jface/src/org/eclipse/jface/preference/PreferenceDialog.java
index 9cef88fa01..a960bd1a3b 100755
--- a/bundles/org.eclipse.rap.jface/src/org/eclipse/jface/preference/PreferenceDialog.java
+++ b/bundles/org.eclipse.rap.jface/src/org/eclipse/jface/preference/PreferenceDialog.java
@@ -238,11 +238,10 @@ public class PreferenceDialog extends TrayDialog implements IPreferencePageConta
cancelPressed();
return;
}
- // RAP [bm]:
-// case IDialogConstants.HELP_ID: {
-// helpPressed();
-// return;
-// }
+ case IDialogConstants.HELP_ID: {
+ helpPressed();
+ return;
+ }
}
}
@@ -868,12 +867,11 @@ public class PreferenceDialog extends TrayDialog implements IPreferencePageConta
* <code>performHelp</code> on the currently active page.
* </p>
*/
- // RAP [bm]:
-// protected void helpPressed() {
-// if (currentPage != null) {
-// currentPage.performHelp();
-// }
-// }
+ protected void helpPressed() {
+ if (currentPage != null) {
+ currentPage.performHelp();
+ }
+ }
/**
* Returns whether the current page is valid.
diff --git a/bundles/org.eclipse.rap.jface/src/org/eclipse/jface/preference/PreferencePage.java b/bundles/org.eclipse.rap.jface/src/org/eclipse/jface/preference/PreferencePage.java
index ff208bec72..ab4f379100 100755
--- a/bundles/org.eclipse.rap.jface/src/org/eclipse/jface/preference/PreferencePage.java
+++ b/bundles/org.eclipse.rap.jface/src/org/eclipse/jface/preference/PreferencePage.java
@@ -32,6 +32,7 @@ import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
/**
@@ -626,9 +627,9 @@ public abstract class PreferencePage extends DialogPage implements
/* (non-Javadoc)
* @see org.eclipse.jface.dialogs.IDialogPage#performHelp()
*/
-// public void performHelp() {
-// getControl().notifyListeners(SWT.Help, new Event());
-// }
+ public void performHelp() {
+ getControl().notifyListeners(SWT.Help, new Event());
+ }
/**
* Apply the data to the receiver. By default do nothing.
diff --git a/bundles/org.eclipse.rap.jface/src/org/eclipse/jface/wizard/WizardDialog.java b/bundles/org.eclipse.rap.jface/src/org/eclipse/jface/wizard/WizardDialog.java
index a553566234..cccab1853e 100755
--- a/bundles/org.eclipse.rap.jface/src/org/eclipse/jface/wizard/WizardDialog.java
+++ b/bundles/org.eclipse.rap.jface/src/org/eclipse/jface/wizard/WizardDialog.java
@@ -807,8 +807,7 @@ public class WizardDialog extends TitleAreaDialog implements IWizardContainer2,
*/
protected void helpPressed() {
if (currentPage != null) {
- // RAP [bm]: Help
-// currentPage.performHelp();
+ currentPage.performHelp();
}
}
diff --git a/bundles/org.eclipse.rap.ui.cheatsheets/META-INF/MANIFEST.MF b/bundles/org.eclipse.rap.ui.cheatsheets/META-INF/MANIFEST.MF
index fa9ecc0c45..b10b81d882 100644
--- a/bundles/org.eclipse.rap.ui.cheatsheets/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.rap.ui.cheatsheets/META-INF/MANIFEST.MF
@@ -23,7 +23,8 @@ Export-Package: org.eclipse.ui.cheatsheets,
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.1.0,4.0.0)",
org.eclipse.core.expressions;bundle-version="3.4.0",
org.eclipse.rap.ui;bundle-version="[1.2.0,2.0.0)",
- org.eclipse.rap.ui.forms;bundle-version="[1.2.0,2.0.0)"
+ org.eclipse.rap.ui.forms;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.rap.help;bundle-version="[1.3.0,2.0.0)"
Eclipse-LazyStart: true
Import-Package: com.ibm.icu.text;version="[3.4.0,4.2.0)",
javax.xml.parsers,
diff --git a/bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/cheatsheets/OpenCheatSheetFromHelpAction.java b/bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/cheatsheets/OpenCheatSheetFromHelpAction.java
index 08230f160e..a7ef6b087b 100644
--- a/bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/cheatsheets/OpenCheatSheetFromHelpAction.java
+++ b/bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/cheatsheets/OpenCheatSheetFromHelpAction.java
@@ -1,61 +1,60 @@
-// RAP [if] Help system not supported
-///*******************************************************************************
-// * Copyright (c) 2004, 2007 IBM Corporation and others.
-// * All rights reserved. This program and the accompanying materials
-// * are made available under the terms of the Eclipse Public License v1.0
-// * which accompanies this distribution, and is available at
-// * http://www.eclipse.org/legal/epl-v10.html
-// *
-// * Contributors:
-// * IBM Corporation - initial API and implementation
-// *******************************************************************************/
-//package org.eclipse.ui.cheatsheets;
-//
-//import org.eclipse.help.ILiveHelpAction;
-//import org.eclipse.swt.widgets.Display;
-//
-///**
-// * Live help action for launching a cheat sheet from a help book.
-// * <p>
-// * The initialization string passed to {@link #setInitializationString(String)}
-// * is the id of a cheat sheet contributed to the <code>cheatsheetContent</code>
-// * extension point.
-// * </p>
-// *
-// * @since 3.0
-// */
-//public final class OpenCheatSheetFromHelpAction implements ILiveHelpAction {
-//
-// /**
-// * Cheat sheet id; null until initialized.
-// */
-// private String cheatsheetID = null;
-//
-// /**
-// * Creates a new live help action.
-// */
-// public OpenCheatSheetFromHelpAction() {
-// super();
-// }
-//
-// /* (non-javadoc)
-// * This method is called by the eclipse framework. The initialization string must be the id of a
-// * registered cheat sheet in order for the action to work.
-// * @see ILiveHelpAction#setInitializationString(String)
-// */
-// public void setInitializationString(String data) {
-// cheatsheetID = data;
-// }
-//
-// /* (non-javadoc)
-// * @see java.lang.Runnable#run()
-// */
-// public void run() {
-// // Active help does not run on the UI thread, so we must use syncExec
-// Display.getDefault().syncExec(new Runnable() {
-// public void run() {
-// new OpenCheatSheetAction(cheatsheetID).run();
-// }
-// });
-// }
-//}
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.cheatsheets;
+
+import org.eclipse.help.ILiveHelpAction;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * Live help action for launching a cheat sheet from a help book.
+ * <p>
+ * The initialization string passed to {@link #setInitializationString(String)}
+ * is the id of a cheat sheet contributed to the <code>cheatsheetContent</code>
+ * extension point.
+ * </p>
+ *
+ * @since 1.3
+ */
+public final class OpenCheatSheetFromHelpAction implements ILiveHelpAction {
+
+ /**
+ * Cheat sheet id; null until initialized.
+ */
+ private String cheatsheetID = null;
+
+ /**
+ * Creates a new live help action.
+ */
+ public OpenCheatSheetFromHelpAction() {
+ super();
+ }
+
+ /* (non-javadoc)
+ * This method is called by the eclipse framework. The initialization string must be the id of a
+ * registered cheat sheet in order for the action to work.
+ * @see ILiveHelpAction#setInitializationString(String)
+ */
+ public void setInitializationString(String data) {
+ cheatsheetID = data;
+ }
+
+ /* (non-javadoc)
+ * @see java.lang.Runnable#run()
+ */
+ public void run() {
+ // Active help does not run on the UI thread, so we must use syncExec
+ Display.getDefault().syncExec(new Runnable() {
+ public void run() {
+ new OpenCheatSheetAction(cheatsheetID).run();
+ }
+ });
+ }
+}
diff --git a/bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/CheatSheetPlugin.java b/bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/CheatSheetPlugin.java
index 975b00c7e2..b85623b0fd 100644
--- a/bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/CheatSheetPlugin.java
+++ b/bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/CheatSheetPlugin.java
@@ -28,7 +28,7 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.SafeRunner;
import org.eclipse.core.runtime.Status;
-//import org.eclipse.help.internal.entityresolver.LocalEntityResolver;
+import org.eclipse.help.internal.entityresolver.LocalEntityResolver;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.jface.util.SafeRunnable;
@@ -144,9 +144,7 @@ public class CheatSheetPlugin extends AbstractUIPlugin {
if(documentBuilder == null) {
try {
documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
-// RAP [if] Help system not supported
-// documentBuilder.setEntityResolver(new LocalEntityResolver());
- documentBuilder.setEntityResolver(null);
+ documentBuilder.setEntityResolver(new LocalEntityResolver());
} catch (Exception e) {
IStatus status = new Status(IStatus.ERROR, ICheatSheetResource.CHEAT_SHEET_PLUGIN_ID, IStatus.OK, Messages.get().ERROR_CREATING_DOCUMENT_BUILDER, e);
CheatSheetPlugin.getPlugin().getLog().log(status);
diff --git a/bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/parser/CompositeCheatSheetParser.java b/bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/parser/CompositeCheatSheetParser.java
index e114c6edd0..911598d8cb 100644
--- a/bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/parser/CompositeCheatSheetParser.java
+++ b/bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/parser/CompositeCheatSheetParser.java
@@ -20,7 +20,7 @@ import javax.xml.parsers.DocumentBuilderFactory;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
-//import org.eclipse.help.internal.entityresolver.LocalEntityResolver;
+import org.eclipse.help.internal.entityresolver.LocalEntityResolver;
import org.eclipse.osgi.util.NLS;
import org.eclipse.ui.internal.cheatsheets.Messages;
import org.eclipse.ui.internal.cheatsheets.composite.model.AbstractTask;
@@ -62,9 +62,7 @@ public class CompositeCheatSheetParser implements IStatusContainer {
if(documentBuilder == null) {
try {
documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
-// RAP [if] Help system not supported
-// documentBuilder.setEntityResolver(new LocalEntityResolver());
- documentBuilder.setEntityResolver(null);
+ documentBuilder.setEntityResolver(new LocalEntityResolver());
} catch (Exception e) {
addStatus(IStatus.ERROR, Messages.get().ERROR_CREATING_DOCUMENT_BUILDER, e);
}
diff --git a/bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/data/CheatSheetParser.java b/bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/data/CheatSheetParser.java
index dab8c83e90..9f43e3f792 100644
--- a/bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/data/CheatSheetParser.java
+++ b/bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/data/CheatSheetParser.java
@@ -22,17 +22,18 @@ import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IStatus;
//import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
-//import org.eclipse.help.internal.UAElement;
-//import org.eclipse.help.internal.UAElementFactory;
-//import org.eclipse.help.internal.dynamic.DocumentProcessor;
-//import org.eclipse.help.internal.dynamic.DocumentReader;
-//import org.eclipse.help.internal.dynamic.ExtensionHandler;
-//import org.eclipse.help.internal.dynamic.FilterHandler;
-//import org.eclipse.help.internal.dynamic.IncludeHandler;
-//import org.eclipse.help.internal.dynamic.ProcessorHandler;
+import org.eclipse.help.internal.UAElement;
+import org.eclipse.help.internal.UAElementFactory;
+import org.eclipse.help.internal.dynamic.DocumentProcessor;
+import org.eclipse.help.internal.dynamic.DocumentReader;
+import org.eclipse.help.internal.dynamic.ExtensionHandler;
+import org.eclipse.help.internal.dynamic.FilterHandler;
+import org.eclipse.help.internal.dynamic.IncludeHandler;
+import org.eclipse.help.internal.dynamic.ProcessorHandler;
import org.eclipse.osgi.util.NLS;
+import org.eclipse.rwt.RWT;
import org.eclipse.ui.cheatsheets.AbstractItemExtensionElement;
-//import org.eclipse.ui.internal.cheatsheets.CheatSheetEvaluationContext;
+import org.eclipse.ui.internal.cheatsheets.CheatSheetEvaluationContext;
import org.eclipse.ui.internal.cheatsheets.CheatSheetPlugin;
import org.eclipse.ui.internal.cheatsheets.ICheatSheetResource;
import org.eclipse.ui.internal.cheatsheets.Messages;
@@ -66,8 +67,7 @@ public class CheatSheetParser implements IStatusContainer {
private static final String TRUE_STRING = "true"; //$NON-NLS-1$
private DocumentBuilder documentBuilder;
-// RAP [if] Help system not supported
-// private DocumentProcessor processor;
+ private DocumentProcessor processor;
private ArrayList itemExtensionContainerList;
// Cheatsheet kinds that can be parsed
@@ -935,22 +935,25 @@ public class CheatSheetParser implements IStatusContainer {
}
}
-// RAP [if] Help system not supported
-// // process dynamic content, normalize paths
-// if (processor == null) {
-// DocumentReader reader = new DocumentReader();
-// processor = new DocumentProcessor(new ProcessorHandler[] {
-// new FilterHandler(CheatSheetEvaluationContext.getContext()),
-// new NormalizeHandler(),
+ // process dynamic content, normalize paths
+ if (processor == null) {
+ DocumentReader reader = new DocumentReader();
+ processor = new DocumentProcessor(new ProcessorHandler[] {
+ new FilterHandler(CheatSheetEvaluationContext.getContext()),
+ new NormalizeHandler(),
+ // RAP [bm]: replaced with correct NL for RAP
// new IncludeHandler(reader, Platform.getNL()),
// new ExtensionHandler(reader, Platform.getNL())
-// });
-// }
-// String documentPath = null;
-// if (input.getPluginId() != null) {
-// documentPath = '/' + input.getPluginId() + input.getUrl().getPath();
-// }
-// processor.process(UAElementFactory.newElement(document.getDocumentElement()), documentPath);
+ new IncludeHandler(reader, RWT.getLocale().getLanguage()),
+ new ExtensionHandler(reader, RWT.getLocale().getLanguage())
+ // RAPEND: [bm]
+ });
+ }
+ String documentPath = null;
+ if (input.getPluginId() != null) {
+ documentPath = '/' + input.getPluginId() + input.getUrl().getPath();
+ }
+ processor.process(UAElementFactory.newElement(document.getDocumentElement()), documentPath);
if ( cheatSheetKind == COMPOSITE_ONLY || (cheatSheetKind == ANY && isComposite(document))) {
CompositeCheatSheetParser compositeParser = new CompositeCheatSheetParser();
@@ -1040,37 +1043,36 @@ public class CheatSheetParser implements IStatusContainer {
throw new CheatSheetParserException(Messages.get().ERROR_PARSING_CHEATSHEET_CONTENTS);
}
-// RAP [if] Help system not supported
-// /*
-// * Normalizes composite cheat sheet-relative paths to simple cheat sheets into fully
-// * qualified paths, e.g. for the path "tasks/mySimpleCheatSheet.xml" in composite cheat
-// * sheet "/my.plugin/cheatsheets/myCompositeCheatSheet.xml", this normalizes to
-// * "/my.plugin/cheatsheets/tasks/mySimpleCheatSheet.xml".
-// *
-// * This is necessary because with dynamic content we are pulling in tasks from other
-// * plug-ins and those tasks have relative paths. It also only applies for cheat sheets
-// * located in running plug-ins.
-// */
-// private class NormalizeHandler extends ProcessorHandler {
-//
-// private static final String ELEMENT_PARAM = "param"; //$NON-NLS-1$
-// private static final String ATTRIBUTE_NAME = "name"; //$NON-NLS-1$
-// private static final String ATTRIBUTE_VALUE = "value"; //$NON-NLS-1$
-// private static final String NAME_PATH = "path"; //$NON-NLS-1$
-//
-// public short handle(UAElement element, String id) {
-// if (id != null && ELEMENT_PARAM.equals(element.getElementName())) {
-// String name = element.getAttribute(ATTRIBUTE_NAME);
-// if (NAME_PATH.equals(name)) {
-// String value = element.getAttribute(ATTRIBUTE_VALUE);
-// if (value != null) {
-// int index = id.lastIndexOf('/');
-// element.setAttribute(ATTRIBUTE_VALUE, id.substring(0, index + 1) + value);
-// }
-// }
-// return HANDLED_CONTINUE;
-// }
-// return UNHANDLED;
-// }
-// }
+ /*
+ * Normalizes composite cheat sheet-relative paths to simple cheat sheets into fully
+ * qualified paths, e.g. for the path "tasks/mySimpleCheatSheet.xml" in composite cheat
+ * sheet "/my.plugin/cheatsheets/myCompositeCheatSheet.xml", this normalizes to
+ * "/my.plugin/cheatsheets/tasks/mySimpleCheatSheet.xml".
+ *
+ * This is necessary because with dynamic content we are pulling in tasks from other
+ * plug-ins and those tasks have relative paths. It also only applies for cheat sheets
+ * located in running plug-ins.
+ */
+ private class NormalizeHandler extends ProcessorHandler {
+
+ private static final String ELEMENT_PARAM = "param"; //$NON-NLS-1$
+ private static final String ATTRIBUTE_NAME = "name"; //$NON-NLS-1$
+ private static final String ATTRIBUTE_VALUE = "value"; //$NON-NLS-1$
+ private static final String NAME_PATH = "path"; //$NON-NLS-1$
+
+ public short handle(UAElement element, String id) {
+ if (id != null && ELEMENT_PARAM.equals(element.getElementName())) {
+ String name = element.getAttribute(ATTRIBUTE_NAME);
+ if (NAME_PATH.equals(name)) {
+ String value = element.getAttribute(ATTRIBUTE_VALUE);
+ if (value != null) {
+ int index = id.lastIndexOf('/');
+ element.setAttribute(ATTRIBUTE_VALUE, id.substring(0, index + 1) + value);
+ }
+ }
+ return HANDLED_CONTINUE;
+ }
+ return UNHANDLED;
+ }
+ }
}
diff --git a/bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/dialogs/CheatSheetCategoryBasedSelectionDialog.java b/bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/dialogs/CheatSheetCategoryBasedSelectionDialog.java
index a9d67b3466..65f414996d 100644
--- a/bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/dialogs/CheatSheetCategoryBasedSelectionDialog.java
+++ b/bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/dialogs/CheatSheetCategoryBasedSelectionDialog.java
@@ -80,8 +80,8 @@ import org.eclipse.ui.model.WorkbenchAdapter;
*/
public class CheatSheetCategoryBasedSelectionDialog extends TrayDialog //extends SelectionDialog
implements ISelectionChangedListener {
-// RAP [if] Not in use
-// private static final String CHEAT_SHEET_SELECTION_HELP_ID = "org.eclipse.ui.cheatsheets.cheatSheetSelection"; //$NON-NLS-1$
+
+ private static final String CHEAT_SHEET_SELECTION_HELP_ID = "org.eclipse.ui.cheatsheets.cheatSheetSelection"; //$NON-NLS-1$
private IDialogSettings settings;
@@ -260,8 +260,7 @@ public class CheatSheetCategoryBasedSelectionDialog extends TrayDialog //extends
// top level group
Composite outerContainer = (Composite) super.createDialogArea(parent);
-// RAP [if] Help system not supported
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, CHEAT_SHEET_SELECTION_HELP_ID);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, CHEAT_SHEET_SELECTION_HELP_ID);
GridLayout gridLayout = new GridLayout();
gridLayout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
gridLayout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
diff --git a/bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetView.java b/bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetView.java
index 076bc07a2b..0cc9861240 100644
--- a/bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetView.java
+++ b/bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetView.java
@@ -21,7 +21,7 @@ import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.IViewSite;
import org.eclipse.ui.PartInitException;
-//import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.PlatformUI;
//import org.eclipse.ui.actions.ActionFactory;
import org.eclipse.ui.internal.cheatsheets.CheatSheetStopWatch;
import org.eclipse.ui.internal.cheatsheets.ICheatSheetResource;
@@ -39,8 +39,7 @@ public class CheatSheetView extends ViewPart {
// private Action copyAction;
private CheatSheetViewer viewer;
private IMemento memento;
-// RAP [if] not used
-// private static final String CHEAT_SHEET_VIEW_HELP_ID = "org.eclipse.ui.cheatsheets.cheatSheetView"; //$NON-NLS-1$
+ private static final String CHEAT_SHEET_VIEW_HELP_ID = "org.eclipse.ui.cheatsheets.cheatSheetView"; //$NON-NLS-1$
private void contributeToActionBars() {
IActionBars bars = getViewSite().getActionBars();
@@ -93,8 +92,7 @@ public class CheatSheetView extends ViewPart {
viewer = new CheatSheetViewer(false);
viewer.createPartControl(parent);
-// RAP [if] Help system not supported
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, CHEAT_SHEET_VIEW_HELP_ID);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, CHEAT_SHEET_VIEW_HELP_ID);
if (!actionBarContributed) {
contributeToActionBars();
diff --git a/bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/ViewItem.java b/bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/ViewItem.java
index bd71f0a5b2..e3711d50a5 100644
--- a/bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/ViewItem.java
+++ b/bundles/org.eclipse.rap.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/ViewItem.java
@@ -10,28 +10,25 @@
*******************************************************************************/
package org.eclipse.ui.internal.cheatsheets.views;
-import java.net.MalformedURLException;
-import java.net.URL;
import java.util.ArrayList;
import java.util.Iterator;
+import org.eclipse.help.HelpSystem;
+import org.eclipse.help.IContext;
import org.eclipse.rwt.graphics.Graphics;
-import org.eclipse.rwt.internal.util.URLHelper;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PartInitException;
+import org.eclipse.swt.widgets.Widget;
import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.browser.IWebBrowser;
-import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
import org.eclipse.ui.cheatsheets.AbstractItemExtensionElement;
import org.eclipse.ui.forms.events.ExpansionAdapter;
import org.eclipse.ui.forms.events.ExpansionEvent;
@@ -154,14 +151,13 @@ public abstract class ViewItem {
ImageHyperlink helpButton = createButton(titleComposite, CheatSheetPlugin.getPlugin().getImage(ICheatSheetResource.CHEATSHEET_ITEM_HELP), this, itemColor, Messages.get().HELP_BUTTON_TOOLTIP);
helpButton.addHyperlinkListener(new HyperlinkAdapter() {
public void linkActivated(HyperlinkEvent e) {
-// RAP [if] Help system not supported
-// // If we have a context id, handle this first and ignore an hrefs
-// if(item.getContextId() != null) {
-// openInfopop(e.widget);
-// } else {
-// // We only have an href, so let's open it in the help system
+ // If we have a context id, handle this first and ignore an hrefs
+ if(item.getContextId() != null) {
+ openInfopop(e.widget);
+ } else {
+ // We only have an href, so let's open it in the help system
openHelpTopic();
-// }
+ }
}
});
}
@@ -383,53 +379,27 @@ public abstract class ViewItem {
if (item == null || item.getHref() == null) {
return;
}
-// RAP [if] Help system not available
-// PlatformUI.getWorkbench().getHelpSystem().displayHelpResource(item.getHref());
-// RAP [if] Use external browser to display the help
- String href = null;
- if( item.getHref().startsWith( "http://" ) //$NON-NLS-1$
- || item.getHref().startsWith( "https://" ) ) //$NON-NLS-1$
- {
- href = item.getHref();
- } else if( item.getHref().startsWith( "/" ) ) { //$NON-NLS-1$
-// TODO [if] Make this path configurable
- href = URLHelper.getContextURLString() + "/topic" + item.getHref(); //$NON-NLS-1$
+ PlatformUI.getWorkbench().getHelpSystem().displayHelpResource(item.getHref());
+ }
+
+ /**
+ * Open an infopop
+ */
+ private void openInfopop(Widget widget) {
+ if (item == null || item.getContextId() == null) {
+ return;
}
- if( href != null ) {
- IWorkbench workbench = PlatformUI.getWorkbench();
- IWorkbenchBrowserSupport browserSupport = workbench.getBrowserSupport();
- try {
- IWebBrowser browser = browserSupport.createBrowser( "helpBrowser" ); //$NON-NLS-1$
- URL url = new URL( href );
- browser.openURL( url );
- } catch( PartInitException e ) {
- throw new RuntimeException( e );
- } catch( MalformedURLException e ) {
- throw new RuntimeException( e );
- }
+ IContext context = HelpSystem.getContext(item.getContextId());
+
+ if (context != null) {
+ // determine a location in the upper right corner of the widget
+ Point point = widget.getDisplay().getCursorLocation();
+ point = new Point(point.x + 15, point.y);
+ // display the help
+ PlatformUI.getWorkbench().getHelpSystem().displayContext(context, point.x, point.y);
}
- //RAPEND [if]
}
-// RAP [if] Help system not available
-// /**
-// * Open an infopop
-// */
-// private void openInfopop(Widget widget) {
-// if (item == null || item.getContextId() == null) {
-// return;
-// }
-// IContext context = HelpSystem.getContext(item.getContextId());
-//
-// if (context != null) {
-// // determine a location in the upper right corner of the widget
-// Point point = widget.getDisplay().getCursorLocation();
-// point = new Point(point.x + 15, point.y);
-// // display the help
-// PlatformUI.getWorkbench().getHelpSystem().displayContext(context, point.x, point.y);
-// }
-// }
-
public void setAsCurrentActiveItem() {
setColorAsCurrent(true);
setButtonsVisible(true);
diff --git a/bundles/org.eclipse.rap.ui.views/META-INF/MANIFEST.MF b/bundles/org.eclipse.rap.ui.views/META-INF/MANIFEST.MF
index 996d7608b6..f1d9b84468 100644
--- a/bundles/org.eclipse.rap.ui.views/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.rap.ui.views/META-INF/MANIFEST.MF
@@ -15,6 +15,7 @@ Export-Package: org.eclipse.ui.internal.views;x-internal:=true,
org.eclipse.ui.views.contentoutline,
org.eclipse.ui.views.properties; ui.views="split"; mandatory:="ui.views"
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.rap.ui;bundle-version="[1.2.0,4.0.0)"
+ org.eclipse.rap.ui;bundle-version="[1.2.0,4.0.0)",
+ org.eclipse.rap.help;bundle-version="[1.3.0,4.0.0)"
Bundle-RequiredExecutionEnvironment: J2SE-1.4
Eclipse-LazyStart: true
diff --git a/bundles/org.eclipse.rap.ui.views/src/org/eclipse/ui/views/contentoutline/ContentOutline.java b/bundles/org.eclipse.rap.ui.views/src/org/eclipse/ui/views/contentoutline/ContentOutline.java
index ffc86f7973..c5754f66c7 100644
--- a/bundles/org.eclipse.rap.ui.views/src/org/eclipse/ui/views/contentoutline/ContentOutline.java
+++ b/bundles/org.eclipse.rap.ui.views/src/org/eclipse/ui/views/contentoutline/ContentOutline.java
@@ -108,9 +108,8 @@ public class ContentOutline extends PageBookView implements ISelectionProvider,
*/
public void createPartControl(Composite parent) {
super.createPartControl(parent);
-// RAP [fappel]: helpsystem not yet support by RAP
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(getPageBook(),
-// CONTENT_OUTLINE_VIEW_HELP_CONTEXT_ID);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(getPageBook(),
+ CONTENT_OUTLINE_VIEW_HELP_CONTEXT_ID);
}
/* (non-Javadoc)
diff --git a/bundles/org.eclipse.rap.ui.views/src/org/eclipse/ui/views/properties/CategoriesAction.java b/bundles/org.eclipse.rap.ui.views/src/org/eclipse/ui/views/properties/CategoriesAction.java
index 38c7797e36..0538ab7b33 100644
--- a/bundles/org.eclipse.rap.ui.views/src/org/eclipse/ui/views/properties/CategoriesAction.java
+++ b/bundles/org.eclipse.rap.ui.views/src/org/eclipse/ui/views/properties/CategoriesAction.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.ui.views.properties;
+import org.eclipse.ui.PlatformUI;
+
/**
* This action hides or shows categories in the <code>PropertySheetViewer</code>.
@@ -23,9 +25,8 @@ package org.eclipse.ui.views.properties;
*/
public CategoriesAction(PropertySheetViewer viewer, String name) {
super(viewer, name);
-// RAP [fappel]: helpsystem not yet support by RAP
-// PlatformUI.getWorkbench().getHelpSystem()
-// .setHelp(this, IPropertiesHelpContextIds.CATEGORIES_ACTION);
+ PlatformUI.getWorkbench().getHelpSystem()
+ .setHelp(this, IPropertiesHelpContextIds.CATEGORIES_ACTION);
}
/**
diff --git a/bundles/org.eclipse.rap.ui.views/src/org/eclipse/ui/views/properties/DefaultsAction.java b/bundles/org.eclipse.rap.ui.views/src/org/eclipse/ui/views/properties/DefaultsAction.java
index 4226e480f2..95f2bb8c7f 100644
--- a/bundles/org.eclipse.rap.ui.views/src/org/eclipse/ui/views/properties/DefaultsAction.java
+++ b/bundles/org.eclipse.rap.ui.views/src/org/eclipse/ui/views/properties/DefaultsAction.java
@@ -11,6 +11,8 @@
package org.eclipse.ui.views.properties;
+import org.eclipse.ui.PlatformUI;
+
/**
* This action resets the <code>PropertySheetViewer</code> values back
@@ -28,9 +30,8 @@ package org.eclipse.ui.views.properties;
*/
public DefaultsAction(PropertySheetViewer viewer, String name) {
super(viewer, name);
-// RAP [fappel]: helpsystem not supported
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(this,
-// IPropertiesHelpContextIds.DEFAULTS_ACTION);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(this,
+ IPropertiesHelpContextIds.DEFAULTS_ACTION);
}
/**
diff --git a/bundles/org.eclipse.rap.ui.views/src/org/eclipse/ui/views/properties/FilterAction.java b/bundles/org.eclipse.rap.ui.views/src/org/eclipse/ui/views/properties/FilterAction.java
index d94aeaebdb..e9fcaba51a 100644
--- a/bundles/org.eclipse.rap.ui.views/src/org/eclipse/ui/views/properties/FilterAction.java
+++ b/bundles/org.eclipse.rap.ui.views/src/org/eclipse/ui/views/properties/FilterAction.java
@@ -11,6 +11,8 @@
package org.eclipse.ui.views.properties;
+import org.eclipse.ui.PlatformUI;
+
/**
* This action hides or shows expert properties in the <code>PropertySheetViewer</code>.
@@ -25,9 +27,8 @@ package org.eclipse.ui.views.properties;
*/
public FilterAction(PropertySheetViewer viewer, String name) {
super(viewer, name);
-// RAP [fappel]: helpsystem not supported
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(this,
-// IPropertiesHelpContextIds.FILTER_ACTION);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(this,
+ IPropertiesHelpContextIds.FILTER_ACTION);
}
/**
diff --git a/bundles/org.eclipse.rap.ui.views/src/org/eclipse/ui/views/properties/PropertySheet.java b/bundles/org.eclipse.rap.ui.views/src/org/eclipse/ui/views/properties/PropertySheet.java
index 77d6b20d79..a00558e136 100644
--- a/bundles/org.eclipse.rap.ui.views/src/org/eclipse/ui/views/properties/PropertySheet.java
+++ b/bundles/org.eclipse.rap.ui.views/src/org/eclipse/ui/views/properties/PropertySheet.java
@@ -97,10 +97,9 @@ public class PropertySheet extends PageBookView implements ISelectionListener {
*/
public void createPartControl(Composite parent) {
super.createPartControl(parent);
-// RAP [fappel]: helpsystem not supported
-// getSite().getPage().getWorkbenchWindow().getWorkbench().getHelpSystem()
-// .setHelp(getPageBook(),
-// IPropertiesHelpContextIds.PROPERTY_SHEET_VIEW);
+ getSite().getPage().getWorkbenchWindow().getWorkbench().getHelpSystem()
+ .setHelp(getPageBook(),
+ IPropertiesHelpContextIds.PROPERTY_SHEET_VIEW);
}
/* (non-Javadoc)
diff --git a/bundles/org.eclipse.rap.ui.views/src/org/eclipse/ui/views/properties/PropertySheetPage.java b/bundles/org.eclipse.rap.ui.views/src/org/eclipse/ui/views/properties/PropertySheetPage.java
index d8211aae78..333f7a61d6 100644
--- a/bundles/org.eclipse.rap.ui.views/src/org/eclipse/ui/views/properties/PropertySheetPage.java
+++ b/bundles/org.eclipse.rap.ui.views/src/org/eclipse/ui/views/properties/PropertySheetPage.java
@@ -13,10 +13,15 @@
package org.eclipse.ui.views.properties;
import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.help.IContext;
import org.eclipse.jface.action.*;
import org.eclipse.jface.viewers.*;
+import org.eclipse.swt.events.HelpEvent;
+import org.eclipse.swt.events.HelpListener;
import org.eclipse.swt.widgets.*;
import org.eclipse.ui.*;
+import org.eclipse.ui.help.IContextComputer;
+import org.eclipse.ui.help.IWorkbenchHelpSystem;
import org.eclipse.ui.internal.views.ViewsPlugin;
import org.eclipse.ui.internal.views.properties.PropertiesMessages;
import org.eclipse.ui.part.CellEditorActionHandler;
@@ -160,55 +165,54 @@ public class PropertySheetPage extends Page implements IPropertySheetPage, IAdap
viewer.getControl().setMenu(menu);
// Set help on the viewer
-// RAP [fappel]: Helpsystem not supported
-// viewer.getControl().addHelpListener(new HelpListener() {
-// /*
-// * @see HelpListener#helpRequested(HelpEvent)
-// */
-// public void helpRequested(HelpEvent e) {
-// // Get the context for the selected item
-// IStructuredSelection selection = (IStructuredSelection) viewer
-// .getSelection();
-// if (!selection.isEmpty()) {
-// IPropertySheetEntry entry = (IPropertySheetEntry) selection
-// .getFirstElement();
-// Object helpContextId = entry.getHelpContextIds();
-// if (helpContextId != null) {
-// if (helpContextId instanceof String) {
-// PlatformUI.getWorkbench()
-// .getHelpSystem().displayHelp(
-// (String) helpContextId);
-// return;
-// }
-//
-// // Since 2.0 the only valid type for helpContextIds
-// // is a String (a single id).
-// // However for backward compatibility we have to handle
-// // and array of contexts (Strings and/or IContexts)
-// // or a context computer.
-// Object[] contexts = null;
-// if (helpContextId instanceof IContextComputer) {
-// // get local contexts
-// contexts = ((IContextComputer) helpContextId)
-// .getLocalContexts(e);
-// } else {
-// contexts = (Object[]) helpContextId;
-// }
-// IWorkbenchHelpSystem help = PlatformUI.getWorkbench().getHelpSystem();
-// // Ignore all but the first element in the array
-// if (contexts[0] instanceof IContext) {
-// help.displayHelp((IContext) contexts[0]);
-// } else {
-// help.displayHelp((String) contexts[0]);
-// }
-// return;
-// }
-// }
-//
-// // No help for the selection so show page help
-// PlatformUI.getWorkbench().getHelpSystem().displayHelp(HELP_CONTEXT_PROPERTY_SHEET_PAGE);
-// }
-// });
+ viewer.getControl().addHelpListener(new HelpListener() {
+ /*
+ * @see HelpListener#helpRequested(HelpEvent)
+ */
+ public void helpRequested(HelpEvent e) {
+ // Get the context for the selected item
+ IStructuredSelection selection = (IStructuredSelection) viewer
+ .getSelection();
+ if (!selection.isEmpty()) {
+ IPropertySheetEntry entry = (IPropertySheetEntry) selection
+ .getFirstElement();
+ Object helpContextId = entry.getHelpContextIds();
+ if (helpContextId != null) {
+ if (helpContextId instanceof String) {
+ PlatformUI.getWorkbench()
+ .getHelpSystem().displayHelp(
+ (String) helpContextId);
+ return;
+ }
+
+ // Since 2.0 the only valid type for helpContextIds
+ // is a String (a single id).
+ // However for backward compatibility we have to handle
+ // and array of contexts (Strings and/or IContexts)
+ // or a context computer.
+ Object[] contexts = null;
+ if (helpContextId instanceof IContextComputer) {
+ // get local contexts
+ contexts = ((IContextComputer) helpContextId)
+ .getLocalContexts(e);
+ } else {
+ contexts = (Object[]) helpContextId;
+ }
+ IWorkbenchHelpSystem help = PlatformUI.getWorkbench().getHelpSystem();
+ // Ignore all but the first element in the array
+ if (contexts[0] instanceof IContext) {
+ help.displayHelp((IContext) contexts[0]);
+ } else {
+ help.displayHelp((String) contexts[0]);
+ }
+ return;
+ }
+ }
+
+ // No help for the selection so show page help
+ PlatformUI.getWorkbench().getHelpSystem().displayHelp(HELP_CONTEXT_PROPERTY_SHEET_PAGE);
+ }
+ });
}
/**
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbench.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbench.java
index a4503adc88..f6ec21fe23 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbench.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbench.java
@@ -23,6 +23,7 @@ import org.eclipse.ui.commands.ICommandService;
import org.eclipse.ui.contexts.IContextService;
import org.eclipse.ui.contexts.IWorkbenchContextSupport;
import org.eclipse.ui.handlers.IHandlerService;
+import org.eclipse.ui.help.IWorkbenchHelpSystem;
import org.eclipse.ui.intro.IIntroManager;
import org.eclipse.ui.keys.IBindingService;
import org.eclipse.ui.operations.IWorkbenchOperationSupport;
@@ -505,13 +506,13 @@ public interface IWorkbench extends IAdaptable, IServiceLocator {
*/
public IIntroManager getIntroManager();
- // RAP [bm]:
-// /**
-// * Return the help system for this workbench.
-// *
-// * @return the help system
-// */
-// public IWorkbenchHelpSystem getHelpSystem();
+ /**
+ * Return the help system for this workbench.
+ *
+ * @return the help system
+ * @since 1.3
+ */
+ public IWorkbenchHelpSystem getHelpSystem();
/**
* Return the browser support for this workbench.
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPreferenceConstants.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPreferenceConstants.java
index ed007f5f01..ab91896580 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPreferenceConstants.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPreferenceConstants.java
@@ -292,38 +292,41 @@ public interface IWorkbenchPreferenceConstants {
*/
public static String SHOW_OTHER_IN_PERSPECTIVE_MENU = "SHOW_OTHER_IN_PERSPECTIVE_MENU"; //$NON-NLS-1$
- // RAP [bm]: help
-// /**
-// * A named preference for the text of the Help Contents action.
-// *
-// * String-valued. If not specified, <code>"&Help Contents"</code> is used.
-// * <p>
-// * The default value for this preference is: <code>null</code>
-// * </p>
-// *
-// * @since 3.0
-// */
-// public static String HELP_CONTENTS_ACTION_TEXT = "helpContentsActionText"; //$NON-NLS-1$
-//
-// /**
-// * A named preference for the text of the Help Search action.
-// *
-// * String-valued. If not specified, <code>"S&earch"</code> is used.
-// * <p>
-// * The default value for this preference is: <code>null</code>
-// * </p>
-// */
-// public static String HELP_SEARCH_ACTION_TEXT = "helpSearchActionText"; //$NON-NLS-1$
-//
-// /**
-// * A named preference for the text of the Dynamic Help action.
-// *
-// * String-valued. If not specified, <code>"&Dynamic Help"</code> is used.
-// * <p>
-// * The default value for this preference is: <code>null</code>
-// * </p>
-// */
-// public static String DYNAMIC_HELP_ACTION_TEXT = "dynamicHelpActionText"; //$NON-NLS-1$
+ /**
+ * A named preference for the text of the Help Contents action.
+ *
+ * String-valued. If not specified, <code>"&Help Contents"</code> is used.
+ * <p>
+ * The default value for this preference is: <code>null</code>
+ * </p>
+ *
+ * @since 1.3
+ */
+ public static String HELP_CONTENTS_ACTION_TEXT = "helpContentsActionText"; //$NON-NLS-1$
+
+ /**
+ * A named preference for the text of the Help Search action.
+ *
+ * String-valued. If not specified, <code>"S&earch"</code> is used.
+ * <p>
+ * The default value for this preference is: <code>null</code>
+ * </p>
+ *
+ * @since 1.3
+ */
+ public static String HELP_SEARCH_ACTION_TEXT = "helpSearchActionText"; //$NON-NLS-1$
+
+ /**
+ * A named preference for the text of the Dynamic Help action.
+ *
+ * String-valued. If not specified, <code>"&Dynamic Help"</code> is used.
+ * <p>
+ * The default value for this preference is: <code>null</code>
+ * </p>
+ *
+ * @since 1.3
+ */
+ public static String DYNAMIC_HELP_ACTION_TEXT = "dynamicHelpActionText"; //$NON-NLS-1$
// RAP [bm]: no animations
// /**
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ActionFactory.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ActionFactory.java
index e97d3b1d98..6d2d8a869c 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ActionFactory.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ActionFactory.java
@@ -17,6 +17,7 @@ import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.internal.CloseAllSavedAction;
import org.eclipse.ui.internal.IWorkbenchGraphicConstants;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.IntroAction;
import org.eclipse.ui.internal.NavigationHistoryAction;
import org.eclipse.ui.internal.OpenPreferencesAction;
@@ -28,6 +29,9 @@ import org.eclipse.ui.internal.ToggleEditorsVisibilityAction;
import org.eclipse.ui.internal.WorkbenchImages;
import org.eclipse.ui.internal.WorkbenchMessages;
import org.eclipse.ui.internal.actions.CommandAction;
+import org.eclipse.ui.internal.actions.DynamicHelpAction;
+import org.eclipse.ui.internal.actions.HelpContentsAction;
+import org.eclipse.ui.internal.actions.HelpSearchAction;
import org.eclipse.ui.services.IServiceLocator;
/**
@@ -270,8 +274,7 @@ public abstract class ActionFactory {
action.setId(getId());
action.setText(WorkbenchMessages.get().CloseAllPerspectivesAction_text);
action.setToolTipText(WorkbenchMessages.get().CloseAllPerspectivesAction_toolTip);
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// window.getWorkbench().getHelpSystem().setHelp(action, IWorkbenchHelpContextIds.CLOSE_ALL_PAGES_ACTION);
+ window.getWorkbench().getHelpSystem().setHelp(action, IWorkbenchHelpContextIds.CLOSE_ALL_PAGES_ACTION);
return action;
}
@@ -321,9 +324,8 @@ public abstract class ActionFactory {
ClosePerspectiveAction_text);
action.setToolTipText(WorkbenchMessages.get().
ClosePerspectiveAction_toolTip);
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// window.getWorkbench().getHelpSystem().setHelp(action,
-// IWorkbenchHelpContextIds.CLOSE_PAGE_ACTION);
+ window.getWorkbench().getHelpSystem().setHelp(action,
+ IWorkbenchHelpContextIds.CLOSE_PAGE_ACTION);
return action;
}
};
@@ -422,9 +424,8 @@ public abstract class ActionFactory {
window.getPartService().addPartListener(action);
action.setActionDefinitionId("org.eclipse.ui.edit.delete"); //$NON-NLS-1$
action.enableAccelerator(false);
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// window.getWorkbench().getHelpSystem().setHelp(action,
-// IWorkbenchHelpContextIds.DELETE_RETARGET_ACTION);
+ window.getWorkbench().getHelpSystem().setHelp(action,
+ IWorkbenchHelpContextIds.DELETE_RETARGET_ACTION);
ISharedImages sharedImages = window.getWorkbench()
.getSharedImages();
action.setImageDescriptor(sharedImages
@@ -455,9 +456,8 @@ public abstract class ActionFactory {
action.setId(getId());
action.setText(WorkbenchMessages.get().EditActionSetsAction_text);
action.setToolTipText(WorkbenchMessages.get().EditActionSetsAction_toolTip);
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// window.getWorkbench().getHelpSystem().setHelp(action,
-// IWorkbenchHelpContextIds.EDIT_ACTION_SETS_ACTION);
+ window.getWorkbench().getHelpSystem().setHelp(action,
+ IWorkbenchHelpContextIds.EDIT_ACTION_SETS_ACTION);
return action;
}
@@ -481,9 +481,8 @@ public abstract class ActionFactory {
action.setId(getId());
action.setText(WorkbenchMessages.get().ExportResourcesAction_text);
action.setToolTipText(WorkbenchMessages.get().ExportResourcesAction_toolTip);
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// window.getWorkbench().getHelpSystem().setHelp(action,
-// IWorkbenchHelpContextIds.EXPORT_ACTION);
+ window.getWorkbench().getHelpSystem().setHelp(action,
+ IWorkbenchHelpContextIds.EXPORT_ACTION);
action.setImageDescriptor(WorkbenchImages
.getImageDescriptor(IWorkbenchGraphicConstants.IMG_ETOOL_EXPORT_WIZ));
return action;
@@ -603,9 +602,8 @@ public abstract class ActionFactory {
action.setId(getId());
action.setText(WorkbenchMessages.get().ImportResourcesAction_text);
action.setToolTipText(WorkbenchMessages.get().ImportResourcesAction_toolTip);
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// window.getWorkbench().getHelpSystem().setHelp(action,
-// IWorkbenchHelpContextIds.IMPORT_ACTION);
+ window.getWorkbench().getHelpSystem().setHelp(action,
+ IWorkbenchHelpContextIds.IMPORT_ACTION);
action.setImageDescriptor(WorkbenchImages
.getImageDescriptor(IWorkbenchGraphicConstants.IMG_ETOOL_IMPORT_WIZ));
return action;
@@ -652,9 +650,8 @@ public abstract class ActionFactory {
"org.eclipse.ui.window.maximizePart", window); //$NON-NLS-1$
action.setId(getId());
action.setToolTipText(WorkbenchMessages.get().MaximizePartAction_toolTip);
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// window.getWorkbench().getHelpSystem().setHelp(action,
-// IWorkbenchHelpContextIds.MAXIMIZE_PART_ACTION);
+ window.getWorkbench().getHelpSystem().setHelp(action,
+ IWorkbenchHelpContextIds.MAXIMIZE_PART_ACTION);
return action;
}
@@ -678,9 +675,8 @@ public abstract class ActionFactory {
"org.eclipse.ui.window.minimizePart", window); //$NON-NLS-1$
action.setId(getId());
action.setToolTipText(WorkbenchMessages.get().MinimizePartAction_toolTip);
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// window.getWorkbench().getHelpSystem().setHelp(action,
-// IWorkbenchHelpContextIds.MINIMIZE_PART_ACTION);
+ window.getWorkbench().getHelpSystem().setHelp(action,
+ IWorkbenchHelpContextIds.MINIMIZE_PART_ACTION);
return action;
}
};
@@ -731,9 +727,8 @@ public abstract class ActionFactory {
.getImageDescriptor(ISharedImages.IMG_TOOL_NEW_WIZARD_DISABLED));
action.setText(WorkbenchMessages.get().NewWizardAction_text);
action.setToolTipText(WorkbenchMessages.get().NewWizardAction_toolTip);
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// window.getWorkbench().getHelpSystem().setHelp(action,
-// IWorkbenchHelpContextIds.NEW_ACTION);
+ window.getWorkbench().getHelpSystem().setHelp(action,
+ IWorkbenchHelpContextIds.NEW_ACTION);
return action;
}
};
@@ -811,9 +806,8 @@ public abstract class ActionFactory {
action.setText(WorkbenchMessages.get().CycleEditorAction_next_text);
action.setToolTipText(WorkbenchMessages.get().CycleEditorAction_next_toolTip);
// @issue missing action ids
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// window.getWorkbench().getHelpSystem().setHelp(action,
-// IWorkbenchHelpContextIds.CYCLE_EDITOR_FORWARD_ACTION);
+ window.getWorkbench().getHelpSystem().setHelp(action,
+ IWorkbenchHelpContextIds.CYCLE_EDITOR_FORWARD_ACTION);
return action;
}
@@ -843,9 +837,8 @@ public abstract class ActionFactory {
action.setText(WorkbenchMessages.get().CyclePartAction_next_text);
action.setToolTipText(WorkbenchMessages.get().CyclePartAction_next_toolTip);
// @issue missing action ids
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// window.getWorkbench().getHelpSystem().setHelp(action,
-// IWorkbenchHelpContextIds.CYCLE_PART_FORWARD_ACTION);
+ window.getWorkbench().getHelpSystem().setHelp(action,
+ IWorkbenchHelpContextIds.CYCLE_PART_FORWARD_ACTION);
return action;
}
};
@@ -875,9 +868,8 @@ public abstract class ActionFactory {
action.setText(WorkbenchMessages.get().CyclePerspectiveAction_next_text);
action.setToolTipText(WorkbenchMessages.get().CyclePerspectiveAction_next_toolTip);
// @issue missing action ids
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// window.getWorkbench().getHelpSystem().setHelp(action,
-// IWorkbenchHelpContextIds.CYCLE_PERSPECTIVE_FORWARD_ACTION);
+ window.getWorkbench().getHelpSystem().setHelp(action,
+ IWorkbenchHelpContextIds.CYCLE_PERSPECTIVE_FORWARD_ACTION);
return action;
}
};
@@ -1002,9 +994,8 @@ public abstract class ActionFactory {
action.setText(WorkbenchMessages.get().CycleEditorAction_prev_text);
action.setToolTipText(WorkbenchMessages.get().CycleEditorAction_prev_toolTip);
// @issue missing action ids
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// window.getWorkbench().getHelpSystem().setHelp(action,
-// IWorkbenchHelpContextIds.CYCLE_EDITOR_BACKWARD_ACTION);
+ window.getWorkbench().getHelpSystem().setHelp(action,
+ IWorkbenchHelpContextIds.CYCLE_EDITOR_BACKWARD_ACTION);
return action;
}
@@ -1035,9 +1026,8 @@ public abstract class ActionFactory {
action.setText(WorkbenchMessages.get().CyclePartAction_prev_text);
action.setToolTipText(WorkbenchMessages.get().CyclePartAction_prev_toolTip);
// @issue missing action ids
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// window.getWorkbench().getHelpSystem().setHelp(action,
-// IWorkbenchHelpContextIds.CYCLE_PART_BACKWARD_ACTION);
+ window.getWorkbench().getHelpSystem().setHelp(action,
+ IWorkbenchHelpContextIds.CYCLE_PART_BACKWARD_ACTION);
return action;
}
};
@@ -1067,9 +1057,8 @@ public abstract class ActionFactory {
action.setText(WorkbenchMessages.get().CyclePerspectiveAction_prev_text);
action.setToolTipText(WorkbenchMessages.get().CyclePerspectiveAction_prev_toolTip);
// @issue missing action ids
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// window.getWorkbench().getHelpSystem().setHelp(action,
-// IWorkbenchHelpContextIds.CYCLE_PERSPECTIVE_BACKWARD_ACTION);
+ window.getWorkbench().getHelpSystem().setHelp(action,
+ IWorkbenchHelpContextIds.CYCLE_PERSPECTIVE_BACKWARD_ACTION);
return action;
}
};
@@ -1144,9 +1133,8 @@ public abstract class ActionFactory {
action.setId(getId());
action.setText(WorkbenchMessages.get().Exit_text);
action.setToolTipText(WorkbenchMessages.get().Exit_toolTip);
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// window.getWorkbench().getHelpSystem().setHelp(action,
-// IWorkbenchHelpContextIds.QUIT_ACTION);
+ window.getWorkbench().getHelpSystem().setHelp(action,
+ IWorkbenchHelpContextIds.QUIT_ACTION);
return action;
}
};
@@ -1414,9 +1402,8 @@ public abstract class ActionFactory {
action.setId(getId());
action.setText(WorkbenchMessages.get().WorkbenchEditorsAction_label);
// @issue missing action id
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// window.getWorkbench().getHelpSystem().setHelp(action,
-// IWorkbenchHelpContextIds.WORKBENCH_EDITORS_ACTION);
+ window.getWorkbench().getHelpSystem().setHelp(action,
+ IWorkbenchHelpContextIds.WORKBENCH_EDITORS_ACTION);
return action;
}
};
@@ -1567,72 +1554,71 @@ public abstract class ActionFactory {
}
};
-// RAP [rh] HELP_CONTENTS action: help support disabled
-// /**
-// * Workbench action (id "helpContents"): Open the help contents. This action
-// * is always enabled.
-// */
-// public static final ActionFactory HELP_CONTENTS = new ActionFactory(
-// "helpContents") {//$NON-NLS-1$
-//
-// /* (non-Javadoc)
-// * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
-// */
-// public IWorkbenchAction create(IWorkbenchWindow window) {
-// if (window == null) {
-// throw new IllegalArgumentException();
-// }
-// IWorkbenchAction action = new HelpContentsAction(window);
-// action.setId(getId());
-// return action;
-// }
-// };
+ /**
+ * Workbench action (id "helpContents"): Open the help contents. This action
+ * is always enabled.
+ *
+ * @since 1.3
+ */
+ public static final ActionFactory HELP_CONTENTS = new ActionFactory(
+ "helpContents") {//$NON-NLS-1$
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
+ */
+ public IWorkbenchAction create(IWorkbenchWindow window) {
+ if (window == null) {
+ throw new IllegalArgumentException();
+ }
+ IWorkbenchAction action = new HelpContentsAction(window);
+ action.setId(getId());
+ return action;
+ }
+ };
-// RAP [rh] HELP_SEARCH action: help support disabled
-// /**
-// * Workbench action (id "helpSearch"): Open the help search. This action
-// * is always enabled.
-// *
-// * @since 3.1
-// */
-// public static final ActionFactory HELP_SEARCH = new ActionFactory(
-// "helpSearch") {//$NON-NLS-1$
-//
-// /* (non-Javadoc)
-// * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
-// */
-// public IWorkbenchAction create(IWorkbenchWindow window) {
-// if (window == null) {
-// throw new IllegalArgumentException();
-// }
-// IWorkbenchAction action = new HelpSearchAction(window);
-// action.setId(getId());
-// return action;
-// }
-// };
+ /**
+ * Workbench action (id "helpSearch"): Open the help search. This action
+ * is always enabled.
+ *
+ * @since 1.3
+ */
+ public static final ActionFactory HELP_SEARCH = new ActionFactory(
+ "helpSearch") {//$NON-NLS-1$
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
+ */
+ public IWorkbenchAction create(IWorkbenchWindow window) {
+ if (window == null) {
+ throw new IllegalArgumentException();
+ }
+ IWorkbenchAction action = new HelpSearchAction(window);
+ action.setId(getId());
+ return action;
+ }
+ };
-// RAP [rh] DYNAMIC_HELP action: help system disabled
-// /**
-// * Workbench action (id "dynamicHelp"): Open the dynamic help. This action
-// * is always enabled.
-// *
-// * @since 3.1
-// */
-// public static final ActionFactory DYNAMIC_HELP = new ActionFactory(
-// "dynamicHelp") {//$NON-NLS-1$
-//
-// /* (non-Javadoc)
-// * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
-// */
-// public IWorkbenchAction create(IWorkbenchWindow window) {
-// if (window == null) {
-// throw new IllegalArgumentException();
-// }
-// IWorkbenchAction action = new DynamicHelpAction(window);
-// action.setId(getId());
-// return action;
-// }
-// };
+ /**
+ * Workbench action (id "dynamicHelp"): Open the dynamic help. This action
+ * is always enabled.
+ *
+ * @since 1.3
+ */
+ public static final ActionFactory DYNAMIC_HELP = new ActionFactory(
+ "dynamicHelp") {//$NON-NLS-1$
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
+ */
+ public IWorkbenchAction create(IWorkbenchWindow window) {
+ if (window == null) {
+ throw new IllegalArgumentException();
+ }
+ IWorkbenchAction action = new DynamicHelpAction(window);
+ action.setId(getId());
+ return action;
+ }
+ };
/**
* Workbench action (id "openPerspectiveDialog"): Open the Open Perspective dialog. This action
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ContributionItemFactory.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ContributionItemFactory.java
index d494ce7d2c..6872f1261c 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ContributionItemFactory.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ContributionItemFactory.java
@@ -15,6 +15,7 @@ import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.internal.ChangeToPerspectiveMenu;
import org.eclipse.ui.internal.ReopenEditorMenu;
import org.eclipse.ui.internal.ShowViewMenu;
+import org.eclipse.ui.internal.actions.HelpSearchContributionItem;
/**
* Access to standard contribution items provided by the workbench.
@@ -215,21 +216,20 @@ public abstract class ContributionItemFactory {
}
};
-// RAP [rh] HELP_SEARCH contribution item: help system not supported
-// /**
-// * Workbench contribution item (id "helpSearch"): An editable field
-// * for entering help search queries.
-// * @since 3.1
-// */
-// public static final ContributionItemFactory HELP_SEARCH = new ContributionItemFactory(
-// "helpSearch") {//$NON-NLS-1$
-// public IContributionItem create(IWorkbenchWindow window) {
-// if (window == null) {
-// throw new IllegalArgumentException();
-// }
-// return new HelpSearchContributionItem(window, getId());
-// }
-// };
+ /**
+ * Workbench contribution item (id "helpSearch"): An editable field
+ * for entering help search queries.
+ * @since 1.3
+ */
+ public static final ContributionItemFactory HELP_SEARCH = new ContributionItemFactory(
+ "helpSearch") {//$NON-NLS-1$
+ public IContributionItem create(IWorkbenchWindow window) {
+ if (window == null) {
+ throw new IllegalArgumentException();
+ }
+ return new HelpSearchContributionItem(window, getId());
+ }
+ };
}
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ExportResourcesAction.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ExportResourcesAction.java
index 432a5b3d36..196f90744b 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ExportResourcesAction.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ExportResourcesAction.java
@@ -13,7 +13,7 @@ package org.eclipse.ui.actions;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchWindow;
-//import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.WorkbenchMessages;
/**
@@ -79,9 +79,8 @@ public class ExportResourcesAction extends BaseSelectionListenerAction
setToolTipText(action.getToolTipText());
setId(action.getId());
setActionDefinitionId(action.getActionDefinitionId());
-// RAP [rh] Help system not supported
-// window.getWorkbench().getHelpSystem().setHelp(this,
-// IWorkbenchHelpContextIds.EXPORT_ACTION);
+ window.getWorkbench().getHelpSystem().setHelp(this,
+ IWorkbenchHelpContextIds.EXPORT_ACTION);
setImageDescriptor(action.getImageDescriptor());
}
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ImportResourcesAction.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ImportResourcesAction.java
index ae82325301..7987270f68 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ImportResourcesAction.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ImportResourcesAction.java
@@ -13,7 +13,7 @@ package org.eclipse.ui.actions;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchWindow;
-//import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.WorkbenchMessages;
/**
@@ -70,9 +70,8 @@ public class ImportResourcesAction extends BaseSelectionListenerAction
setToolTipText(action.getToolTipText());
setId(action.getId());
setActionDefinitionId(action.getActionDefinitionId());
-// RAP [rh] Help system not supported
-// window.getWorkbench().getHelpSystem().setHelp(this,
-// IWorkbenchHelpContextIds.IMPORT_ACTION);
+ window.getWorkbench().getHelpSystem().setHelp(this,
+ IWorkbenchHelpContextIds.IMPORT_ACTION);
setImageDescriptor(action.getImageDescriptor());
}
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/NewWizardAction.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/NewWizardAction.java
index 71abe2072a..3653ed5ad1 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/NewWizardAction.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/NewWizardAction.java
@@ -24,7 +24,7 @@ import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
-//import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.LegacyResourceSupport;
import org.eclipse.ui.internal.PerspectiveTracker;
import org.eclipse.ui.internal.WorkbenchMessages;
@@ -98,9 +98,8 @@ public class NewWizardAction extends Action implements
setDisabledImageDescriptor(images
.getImageDescriptor(ISharedImages.IMG_TOOL_NEW_WIZARD_DISABLED));
setToolTipText(WorkbenchMessages.get().NewWizardAction_toolTip);
-// RAP [rh] Help system not supported
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(this,
-// IWorkbenchHelpContextIds.NEW_ACTION);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(this,
+ IWorkbenchHelpContextIds.NEW_ACTION);
}
/**
@@ -180,9 +179,8 @@ public class NewWizardAction extends Action implements
dialog.getShell().setSize(
Math.max(SIZING_WIZARD_WIDTH, dialog.getShell().getSize().x),
SIZING_WIZARD_HEIGHT);
-// RAP [rh] Help system not supported
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(),
-// IWorkbenchHelpContextIds.NEW_WIZARD);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(),
+ IWorkbenchHelpContextIds.NEW_WIZARD);
dialog.open();
}
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/OpenInNewWindowAction.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/OpenInNewWindowAction.java
index 736ad04a0b..ca75adab78 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/OpenInNewWindowAction.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/OpenInNewWindowAction.java
@@ -15,7 +15,7 @@ import org.eclipse.jface.action.Action;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.WorkbenchException;
-//import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.Workbench;
import org.eclipse.ui.internal.WorkbenchMessages;
import org.eclipse.ui.internal.misc.StatusUtil;
@@ -67,9 +67,8 @@ public class OpenInNewWindowAction extends Action implements
// @issue missing action id
setToolTipText(WorkbenchMessages.get().OpenInNewWindowAction_toolTip);
pageInput = input;
-// RAP [rh] Help system not supported
-// window.getWorkbench().getHelpSystem().setHelp(this,
-// IWorkbenchHelpContextIds.OPEN_NEW_WINDOW_ACTION);
+ window.getWorkbench().getHelpSystem().setHelp(this,
+ IWorkbenchHelpContextIds.OPEN_NEW_WINDOW_ACTION);
}
/**
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/OpenPerspectiveAction.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/OpenPerspectiveAction.java
index a8f1398f1e..21c9feff47 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/OpenPerspectiveAction.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/actions/OpenPerspectiveAction.java
@@ -16,7 +16,7 @@ import org.eclipse.swt.widgets.Event;
import org.eclipse.ui.IPerspectiveDescriptor;
import org.eclipse.ui.IPluginContribution;
import org.eclipse.ui.IWorkbenchWindow;
-//import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.util.Util;
/**
@@ -66,9 +66,8 @@ public final class OpenPerspectiveAction extends Action implements
setToolTipText(label);
setImageDescriptor(descriptor.getImageDescriptor());
-// RAP [rh] Help system not supported
-// window.getWorkbench().getHelpSystem().setHelp(this,
-// IWorkbenchHelpContextIds.OPEN_PERSPECTIVE_ACTION);
+ window.getWorkbench().getHelpSystem().setHelp(this,
+ IWorkbenchHelpContextIds.OPEN_PERSPECTIVE_ACTION);
}
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/activities/ActivityCategoryPreferencePage.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/activities/ActivityCategoryPreferencePage.java
index 4098352405..9c5a6d50d9 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/activities/ActivityCategoryPreferencePage.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/activities/ActivityCategoryPreferencePage.java
@@ -10,15 +10,36 @@
*******************************************************************************/
package org.eclipse.ui.activities;
-import java.util.*;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.Set;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExecutableExtension;
-import org.eclipse.jface.dialogs.*;
import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.dialogs.TrayDialog;
import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.resource.*;
-import org.eclipse.jface.viewers.*;
+import org.eclipse.jface.resource.DeviceResourceException;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.resource.LocalResourceManager;
+import org.eclipse.jface.viewers.CheckboxTableViewer;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.LabelProviderChangedEvent;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerComparator;
+import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
@@ -26,9 +47,19 @@ import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.*;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.internal.IPreferenceConstants;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.WorkbenchPlugin;
import org.eclipse.ui.internal.activities.ws.ActivityEnabler;
import org.eclipse.ui.internal.activities.ws.ActivityMessages;
@@ -350,9 +381,8 @@ public final class ActivityCategoryPreferencePage extends PreferencePage impleme
createDetailsArea(composite);
createButtons(composite);
-// RAP [fappel]: help system not supported
-// workbench.getHelpSystem().setHelp(parent,
-// IWorkbenchHelpContextIds.CAPABILITY_PREFERENCE_PAGE);
+ workbench.getHelpSystem().setHelp(parent,
+ IWorkbenchHelpContextIds.CAPABILITY_PREFERENCE_PAGE);
Dialog.applyDialogFont(composite);
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ICommandService.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ICommandService.java
index c0702ff9c8..64c7c1a075 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ICommandService.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ICommandService.java
@@ -21,6 +21,7 @@ import org.eclipse.core.commands.ParameterType;
import org.eclipse.core.commands.ParameterizedCommand;
import org.eclipse.core.commands.SerializationException;
import org.eclipse.core.commands.common.NotDefinedException;
+import org.eclipse.core.commands.IHandler;
import org.eclipse.ui.menus.UIElement;
import org.eclipse.ui.services.IDisposable;
@@ -256,19 +257,19 @@ public interface ICommandService extends IDisposable {
*/
public void removeExecutionListener(IExecutionListener listener);
- // RAP [bm]: Help
-// /**
-// * Sets the help context identifier to associate with a particular handler.
-// *
-// * @param handler
-// * The handler with which to register a help context identifier;
-// * must not be <code>null</code>.
-// * @param helpContextId
-// * The help context identifier to register; may be
-// * <code>null</code> if the help context identifier should be
-// * removed.
-// */
-// public void setHelpContextId(IHandler handler, String helpContextId);
+ /**
+ * Sets the help context identifier to associate with a particular handler.
+ *
+ * @param handler
+ * The handler with which to register a help context identifier;
+ * must not be <code>null</code>.
+ * @param helpContextId
+ * The help context identifier to register; may be
+ * <code>null</code> if the help context identifier should be
+ * removed.
+ * @since 1.3
+ */
+ public void setHelpContextId(IHandler handler, String helpContextId);
/**
* Register that this element accepts callbacks for this parameterized
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/EditorSelectionDialog.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/EditorSelectionDialog.java
index 7e90c2dbc7..2fd046752c 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/EditorSelectionDialog.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/EditorSelectionDialog.java
@@ -18,9 +18,7 @@ import java.util.ArrayList;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.IDialogSettings;
-//import org.eclipse.rwt.graphics.Graphics;
import org.eclipse.swt.SWT;
-//import org.eclipse.swt.graphics.Cursor;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
@@ -29,15 +27,14 @@ import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Event;
-//import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.ui.IEditorDescriptor;
-//import org.eclipse.ui.PlatformUI;
-//import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.WorkbenchMessages;
import org.eclipse.ui.internal.WorkbenchPlugin;
import org.eclipse.ui.internal.registry.EditorDescriptor;
@@ -144,9 +141,8 @@ public final class EditorSelectionDialog extends Dialog {
protected void configureShell(Shell shell) {
super.configureShell(shell);
shell.setText(WorkbenchMessages.get().EditorSelection_title);
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(shell,
-// IWorkbenchHelpContextIds.EDITOR_SELECTION_DIALOG);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(shell,
+ IWorkbenchHelpContextIds.EDITOR_SELECTION_DIALOG);
}
/**
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/ListSelectionDialog.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/ListSelectionDialog.java
index 745fc25a6d..2bf328914f 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/ListSelectionDialog.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/ListSelectionDialog.java
@@ -30,8 +30,8 @@ import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
-//import org.eclipse.ui.PlatformUI;
-//import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.WorkbenchMessages;
/**
@@ -154,8 +154,8 @@ public class ListSelectionDialog extends SelectionDialog {
*/
protected void configureShell(Shell shell) {
super.configureShell(shell);
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(shell,
-// IWorkbenchHelpContextIds.LIST_SELECTION_DIALOG);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(shell,
+ IWorkbenchHelpContextIds.LIST_SELECTION_DIALOG);
}
/* (non-Javadoc)
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/PropertyDialogAction.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/PropertyDialogAction.java
index 8cb0994241..edf638e543 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/PropertyDialogAction.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/PropertyDialogAction.java
@@ -17,9 +17,9 @@ import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.window.IShellProvider;
import org.eclipse.jface.window.SameShellProvider;
import org.eclipse.swt.widgets.Shell;
-//import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.SelectionProviderAction;
-//import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.WorkbenchMessages;
import org.eclipse.ui.internal.dialogs.PropertyDialog;
import org.eclipse.ui.internal.dialogs.PropertyPageContributorManager;
@@ -88,9 +88,8 @@ public class PropertyDialogAction extends SelectionProviderAction {
Assert.isNotNull(shell);
this.shellProvider = shell;
setToolTipText(WorkbenchMessages.get().PropertyDialog_toolTip);
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(this,
-// IWorkbenchHelpContextIds.PROPERTY_DIALOG_ACTION);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(this,
+ IWorkbenchHelpContextIds.PROPERTY_DIALOG_ACTION);
}
/**
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/SelectionStatusDialog.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/SelectionStatusDialog.java
index 6c58cbadef..fa30914153 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/SelectionStatusDialog.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/SelectionStatusDialog.java
@@ -173,20 +173,18 @@ public abstract class SelectionStatusDialog extends SelectionDialog {
composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
composite.setFont(font);
-// RAP [rh] Help not supported
-// if (!fStatusLineAboveButtons && isHelpAvailable()) {
-// createHelpControl(composite);
-// }
+ if (!fStatusLineAboveButtons && isHelpAvailable()) {
+ createHelpControl(composite);
+ }
fStatusLine = new MessageLine(composite);
fStatusLine.setAlignment(SWT.LEFT);
GridData statusData = new GridData(GridData.FILL_HORIZONTAL);
fStatusLine.setErrorStatus(null);
fStatusLine.setFont(font);
-// RAP [rh] Help not supported
-// if (fStatusLineAboveButtons && isHelpAvailable()) {
-// statusData.horizontalSpan = 2;
-// createHelpControl(composite);
-// }
+ if (fStatusLineAboveButtons && isHelpAvailable()) {
+ statusData.horizontalSpan = 2;
+ createHelpControl(composite);
+ }
fStatusLine.setLayoutData(statusData);
/*
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/TypeFilteringDialog.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/TypeFilteringDialog.java
index b9ec31c8a6..777ac1e7bc 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/TypeFilteringDialog.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/TypeFilteringDialog.java
@@ -38,7 +38,7 @@ import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IFileEditorMapping;
import org.eclipse.ui.PlatformUI;
-//import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.WorkbenchMessages;
import org.eclipse.ui.internal.registry.EditorRegistry;
@@ -201,9 +201,8 @@ public class TypeFilteringDialog extends SelectionDialog {
*/
protected void configureShell(Shell shell) {
super.configureShell(shell);
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(shell,
-// IWorkbenchHelpContextIds.TYPE_FILTERING_DIALOG);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(shell,
+ IWorkbenchHelpContextIds.TYPE_FILTERING_DIALOG);
}
/*
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/YesNoCancelListSelectionDialog.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/YesNoCancelListSelectionDialog.java
index 618918d945..4096f108e6 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/YesNoCancelListSelectionDialog.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/YesNoCancelListSelectionDialog.java
@@ -13,8 +13,8 @@ package org.eclipse.ui.dialogs;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
-//import org.eclipse.ui.PlatformUI;
-//import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
/**
* YesNoCancelListSelectionDialog is a list selection dialog that also allows
@@ -70,9 +70,8 @@ public class YesNoCancelListSelectionDialog extends ListSelectionDialog {
*/
protected void configureShell(Shell shell) {
super.configureShell(shell);
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(shell,
-// IWorkbenchHelpContextIds.YES_NO_CANCEL_LIST_SELECTION_DIALOG);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(shell,
+ IWorkbenchHelpContextIds.YES_NO_CANCEL_LIST_SELECTION_DIALOG);
}
/*
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/handlers/IHandlerService.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/handlers/IHandlerService.java
index 3f14de6602..ea4db8e225 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/handlers/IHandlerService.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/handlers/IHandlerService.java
@@ -373,17 +373,17 @@ public interface IHandlerService extends IServiceWithSources {
*/
public void readRegistry();
- // RAP [bm]: Help
-// /**
-// * Sets the help context identifier to associate with a particular handler.
-// *
-// * @param handler
-// * The handler with which to register a help context identifier;
-// * must not be <code>null</code>.
-// * @param helpContextId
-// * The help context identifier to register; may be
-// * <code>null</code> if the help context identifier should be
-// * removed.
-// */
-// public void setHelpContextId(IHandler handler, String helpContextId);
+ /**
+ * Sets the help context identifier to associate with a particular handler.
+ *
+ * @param handler
+ * The handler with which to register a help context identifier;
+ * must not be <code>null</code>.
+ * @param helpContextId
+ * The help context identifier to register; may be
+ * <code>null</code> if the help context identifier should be
+ * removed.
+ * @since 1.3
+ */
+ public void setHelpContextId(IHandler handler, String helpContextId);
}
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/help/AbstractHelpUI.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/help/AbstractHelpUI.java
index bf0ba17d5d..dffa82acfd 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/help/AbstractHelpUI.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/help/AbstractHelpUI.java
@@ -1,146 +1,142 @@
-// RAP [rh] AbstractHelpUI: help support left aside for now
-///*******************************************************************************
-// * Copyright (c) 2003, 2p005 IBM Corporation and others.
-// * All rights reserved. This program and the accompanying materials
-// * are made available under the terms of the Eclipse Public License v1.0
-// * which accompanies this distribution, and is available at
-// * http://www.eclipse.org/legal/epl-v10.html
-// *
-// * Contributors:
-// * IBM Corporation - initial API and implementation
-// *******************************************************************************/
-//package org.eclipse.ui.help;
-//
-//import java.net.URL;
-//
-//import org.eclipse.help.IContext;
-//
-///**
-// * Abstract base class for the help system UI.
-// * <p>
-// * The Eclipse platform provides an extension point (<code>"org.eclipse.ui.helpSupport"</code>)
-// * for plugging in a help system UI. The help system UI is an optional
-// * component; applications may provide a UI for presenting help to the user by
-// * implementing a subclass and including the name of their class in the
-// * <code>&lt;config&gt;</code> element in an extension to the
-// * <code>"org.eclipse.ui.helpSupport"</code> extension point.
-// * </p>
-// * <p>
-// * Note that the standard implementation of the help system UI is provided by
-// * the <code>"org.eclipse.help.ui"</code> plug-in. Since the platform can only
-// * make use of a single help system UI implementation, make sure that the
-// * platform is not configured with more than one plug-in trying to extend this
-// * extension point.
-// * </p>
-// *
-// * @since 3.0
-// */
-//public abstract class AbstractHelpUI {
-//
-// /**
-// * Displays the entire help bookshelf.
-// */
-// public abstract void displayHelp();
-//
-// /**
-// * Displays the help search facility. For backward compatibility, the
-// * default implementation does nothing.
-// *
-// * @since 3.1
-// */
-// public void displaySearch() {
-// // do nothing
-// }
-//
-// /**
-// * Displays the dynamic help for the active context. For backward
-// * compatibility, the default implementation does nothing.
-// *
-// * @since 3.1
-// */
-// public void displayDynamicHelp() {
-// // do nothing
-// }
-//
-// /**
-// * Starts the help search using the help search facility. For backward
-// * compatibility, the default implementation does nothing.
-// *
-// * @param expression
-// * the search expression
-// * @since 3.1
-// */
-// public void search(String expression) {
-// // do nothing
-// }
-//
-// /**
-// * Resolves the help resource href according to the help system
-// * implementation.
-// *
-// * @param href
-// * the help resource
-// * @param documentOnly
-// * if <code>true</code>, the resulting URL must point at the
-// * document referenced by href. Otherwise, it can be a URL that
-// * contains additional elements like navigation that the help
-// * system adds to the document.
-// * @return the fully resolved URL of the help resource or <code>null</code>
-// * if not supported. Help systems that use application servers
-// * typically return URLs with http: protocol. Simple help system
-// * implementations can return URLs with file: protocol.
-// *
-// * @since 3.1
-// */
-// public URL resolve(String href, boolean documentOnly) {
-// return null;
-// }
-//
-// /**
-// * Displays context-sensitive help for the given context.
-// * <p>
-// * (x,y) coordinates specify the location where the context sensitive help
-// * UI will be presented. These coordinates are screen-relative (ie: (0,0) is
-// * the top left-most screen corner). The platform is responsible for calling
-// * this method and supplying the appropriate location.
-// * </p>
-// *
-// * @param context
-// * the context to display
-// * @param x
-// * horizontal position
-// * @param y
-// * verifical position
-// */
-// public abstract void displayContext(IContext context, int x, int y);
-//
-// /**
-// * Displays help content for the help resource with the given URL.
-// * <p>
-// * This method is called by the platform to launch the help system UI,
-// * displaying the documentation identified by the <code>href</code>
-// * parameter.
-// * </p>
-// * <p>
-// * The help system makes no guarantee that all the help resources can be
-// * displayed or how they are displayed.
-// * </p>
-// *
-// * @param href
-// * the URL of the help resource.
-// * <p>
-// * Valid href are as described in
-// * {@link org.eclipse.help.IHelpResource#getHref() IHelpResource.getHref()}
-// * </p>
-// */
-// public abstract void displayHelpResource(String href);
-//
-// /**
-// * Returns whether the context-sensitive help window is currently being
-// * displayed.
-// *
-// * @return <code>true</code> if the context-sensitive help window is
-// * currently being displayed, <code>false</code> if not
-// */
-// public abstract boolean isContextHelpDisplayed();
-//}
+/*******************************************************************************
+ * Copyright (c) 2003, 2p005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.help;
+
+import java.net.URL;
+
+import org.eclipse.help.IContext;
+
+/**
+ * Abstract base class for the help system UI.
+ * <p>
+ * The Eclipse platform provides an extension point (<code>"org.eclipse.ui.helpSupport"</code>)
+ * for plugging in a help system UI. The help system UI is an optional
+ * component; applications may provide a UI for presenting help to the user by
+ * implementing a subclass and including the name of their class in the
+ * <code>&lt;config&gt;</code> element in an extension to the
+ * <code>"org.eclipse.ui.helpSupport"</code> extension point.
+ * </p>
+ * <p>
+ * Note that the standard implementation of the help system UI is provided by
+ * the <code>"org.eclipse.help.ui"</code> plug-in. Since the platform can only
+ * make use of a single help system UI implementation, make sure that the
+ * platform is not configured with more than one plug-in trying to extend this
+ * extension point.
+ * </p>
+ *
+ * @since 1.3
+ */
+public abstract class AbstractHelpUI {
+
+ /**
+ * Displays the entire help bookshelf.
+ */
+ public abstract void displayHelp();
+
+ /**
+ * Displays the help search facility. For backward compatibility, the
+ * default implementation does nothing.
+ *
+ */
+ public void displaySearch() {
+ // do nothing
+ }
+
+ /**
+ * Displays the dynamic help for the active context. For backward
+ * compatibility, the default implementation does nothing.
+ *
+ * @since 3.1
+ */
+ public void displayDynamicHelp() {
+ // do nothing
+ }
+
+ /**
+ * Starts the help search using the help search facility. For backward
+ * compatibility, the default implementation does nothing.
+ *
+ * @param expression
+ * the search expression
+ */
+ public void search(String expression) {
+ // do nothing
+ }
+
+ /**
+ * Resolves the help resource href according to the help system
+ * implementation.
+ *
+ * @param href
+ * the help resource
+ * @param documentOnly
+ * if <code>true</code>, the resulting URL must point at the
+ * document referenced by href. Otherwise, it can be a URL that
+ * contains additional elements like navigation that the help
+ * system adds to the document.
+ * @return the fully resolved URL of the help resource or <code>null</code>
+ * if not supported. Help systems that use application servers
+ * typically return URLs with http: protocol. Simple help system
+ * implementations can return URLs with file: protocol.
+ *
+ */
+ public URL resolve(String href, boolean documentOnly) {
+ return null;
+ }
+
+ /**
+ * Displays context-sensitive help for the given context.
+ * <p>
+ * (x,y) coordinates specify the location where the context sensitive help
+ * UI will be presented. These coordinates are screen-relative (ie: (0,0) is
+ * the top left-most screen corner). The platform is responsible for calling
+ * this method and supplying the appropriate location.
+ * </p>
+ *
+ * @param context
+ * the context to display
+ * @param x
+ * horizontal position
+ * @param y
+ * verifical position
+ */
+ public abstract void displayContext(IContext context, int x, int y);
+
+ /**
+ * Displays help content for the help resource with the given URL.
+ * <p>
+ * This method is called by the platform to launch the help system UI,
+ * displaying the documentation identified by the <code>href</code>
+ * parameter.
+ * </p>
+ * <p>
+ * The help system makes no guarantee that all the help resources can be
+ * displayed or how they are displayed.
+ * </p>
+ *
+ * @param href
+ * the URL of the help resource.
+ * <p>
+ * Valid href are as described in
+ * {@link org.eclipse.help.IHelpResource#getHref() IHelpResource.getHref()}
+ * </p>
+ */
+ public abstract void displayHelpResource(String href);
+
+ /**
+ * Returns whether the context-sensitive help window is currently being
+ * displayed.
+ *
+ * @return <code>true</code> if the context-sensitive help window is
+ * currently being displayed, <code>false</code> if not
+ */
+ public abstract boolean isContextHelpDisplayed();
+}
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/help/DialogPageContextComputer.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/help/DialogPageContextComputer.java
index 4d60d4ebfa..e2518a0f16 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/help/DialogPageContextComputer.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/help/DialogPageContextComputer.java
@@ -1,124 +1,124 @@
-// RAP [rh] DialogPageContextComputer: help support left aside for now
-///*******************************************************************************
-// * Copyright (c) 2000, 2006 IBM Corporation and others.
-// * All rights reserved. This program and the accompanying materials
-// * are made available under the terms of the Eclipse Public License v1.0
-// * which accompanies this distribution, and is available at
-// * http://www.eclipse.org/legal/epl-v10.html
-// *
-// * Contributors:
-// * IBM Corporation - initial API and implementation
-// *******************************************************************************/
-//package org.eclipse.ui.help;
-//
-//import java.util.ArrayList;
-//
-//import org.eclipse.core.runtime.Assert;
-//import org.eclipse.help.IContext;
-//import org.eclipse.jface.dialogs.IDialogPage;
-//import org.eclipse.swt.events.HelpEvent;
-//import org.eclipse.swt.widgets.Control;
-//
-///**
-// * For determining the help context for controls in a dialog page.
-// * <p>
-// * This class may be instantiated; it is not intended to be subclassed.
-// * </p>
-// * @deprecated nested contexts are no longer supported by the help support system
-// * @noextend This class is not intended to be subclassed by clients.
-// */
-//public class DialogPageContextComputer implements IContextComputer {
-// private IDialogPage page;
-//
-// private ArrayList contextList;
-//
-// private Object context;
-//
-// /**
-// * Creates a new context computer for the given dialog page and help context.
-// *
-// * @param page the dialog page
-// * @param helpContext a single help context id (type <code>String</code>) or
-// * help context object (type <code>IContext</code>)
-// */
-// public DialogPageContextComputer(IDialogPage page, Object helpContext) {
-// Assert.isTrue(helpContext instanceof String
-// || helpContext instanceof IContext);
-// this.page = page;
-// context = helpContext;
-// }
-//
-// /**
-// * Add the contexts to the context list.
-// *
-// * @param object the contexts (<code>Object[]</code> or <code>IContextComputer</code>)
-// * @param event the help event
-// */
-// private void addContexts(Object object, HelpEvent event) {
-// Assert.isTrue(object instanceof Object[]
-// || object instanceof IContextComputer
-// || object instanceof String);
-//
-// if (object instanceof String) {
-// contextList.add(object);
-// return;
-// }
-//
-// Object[] contexts;
-// if (object instanceof IContextComputer) {
-// // get local contexts
-// contexts = ((IContextComputer) object).getLocalContexts(event);
-// } else {
-// contexts = (Object[]) object;
-// }
-//
-// // copy the contexts into our list
-// for (int i = 0; i < contexts.length; i++) {
-// contextList.add(contexts[i]);
-// }
-// }
-//
-// /**
-// * Add the contexts for the given control to the context list.
-// *
-// * @param control the control from which to obtain the contexts
-// * @param event the help event
-// */
-// private void addContextsForControl(Control control, HelpEvent event) {
-// // See if there is are help contexts on the control
-// Object object = WorkbenchHelp.getHelp(control);
-//
-// if (object == null || object == this) {
-// // We need to check for this in order to avoid recursion
-// return;
-// }
-//
-// addContexts(object, event);
-// }
-//
-// /* (non-Javadoc)
-// * Method declared on IContextComputer.
-// */
-// public Object[] computeContexts(HelpEvent event) {
-// contextList = new ArrayList();
-//
-// // Add the local context
-// contextList.add(context);
-//
-// // Add the contexts for the page
-// addContextsForControl(page.getControl(), event);
-//
-// // Add the contexts for the container shell
-// addContextsForControl(page.getControl().getShell(), event);
-//
-// // Return the contexts
-// return contextList.toArray();
-// }
-//
-// /* (non-Javadoc)
-// * Method declared on IContextComputer.
-// */
-// public Object[] getLocalContexts(HelpEvent event) {
-// return new Object[] { context };
-// }
-//}
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.help;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.help.IContext;
+import org.eclipse.jface.dialogs.IDialogPage;
+import org.eclipse.swt.events.HelpEvent;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * For determining the help context for controls in a dialog page.
+ * <p>
+ * This class may be instantiated; it is not intended to be subclassed.
+ * </p>
+ * @deprecated nested contexts are no longer supported by the help support system
+ * @noextend This class is not intended to be subclassed by clients.
+ * @since 1.3
+ */
+public class DialogPageContextComputer implements IContextComputer {
+ private IDialogPage page;
+
+ private ArrayList contextList;
+
+ private Object context;
+
+ /**
+ * Creates a new context computer for the given dialog page and help context.
+ *
+ * @param page the dialog page
+ * @param helpContext a single help context id (type <code>String</code>) or
+ * help context object (type <code>IContext</code>)
+ */
+ public DialogPageContextComputer(IDialogPage page, Object helpContext) {
+ Assert.isTrue(helpContext instanceof String
+ || helpContext instanceof IContext);
+ this.page = page;
+ context = helpContext;
+ }
+
+ /**
+ * Add the contexts to the context list.
+ *
+ * @param object the contexts (<code>Object[]</code> or <code>IContextComputer</code>)
+ * @param event the help event
+ */
+ private void addContexts(Object object, HelpEvent event) {
+ Assert.isTrue(object instanceof Object[]
+ || object instanceof IContextComputer
+ || object instanceof String);
+
+ if (object instanceof String) {
+ contextList.add(object);
+ return;
+ }
+
+ Object[] contexts;
+ if (object instanceof IContextComputer) {
+ // get local contexts
+ contexts = ((IContextComputer) object).getLocalContexts(event);
+ } else {
+ contexts = (Object[]) object;
+ }
+
+ // copy the contexts into our list
+ for (int i = 0; i < contexts.length; i++) {
+ contextList.add(contexts[i]);
+ }
+ }
+
+ /**
+ * Add the contexts for the given control to the context list.
+ *
+ * @param control the control from which to obtain the contexts
+ * @param event the help event
+ */
+ private void addContextsForControl(Control control, HelpEvent event) {
+ // See if there is are help contexts on the control
+ Object object = WorkbenchHelp.getHelp(control);
+
+ if (object == null || object == this) {
+ // We need to check for this in order to avoid recursion
+ return;
+ }
+
+ addContexts(object, event);
+ }
+
+ /* (non-Javadoc)
+ * Method declared on IContextComputer.
+ */
+ public Object[] computeContexts(HelpEvent event) {
+ contextList = new ArrayList();
+
+ // Add the local context
+ contextList.add(context);
+
+ // Add the contexts for the page
+ addContextsForControl(page.getControl(), event);
+
+ // Add the contexts for the container shell
+ addContextsForControl(page.getControl().getShell(), event);
+
+ // Return the contexts
+ return contextList.toArray();
+ }
+
+ /* (non-Javadoc)
+ * Method declared on IContextComputer.
+ */
+ public Object[] getLocalContexts(HelpEvent event) {
+ return new Object[] { context };
+ }
+}
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/help/IContextComputer.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/help/IContextComputer.java
index e3c0aa83b6..3b06f87234 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/help/IContextComputer.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/help/IContextComputer.java
@@ -1,59 +1,58 @@
-// RAP [rh] IContextComputer: help support left aside for now
-///*******************************************************************************
-// * Copyright (c) 2000, 2006 IBM Corporation and others.
-// * All rights reserved. This program and the accompanying materials
-// * are made available under the terms of the Eclipse Public License v1.0
-// * which accompanies this distribution, and is available at
-// * http://www.eclipse.org/legal/epl-v10.html
-// *
-// * Contributors:
-// * IBM Corporation - initial API and implementation
-// *******************************************************************************/
-//package org.eclipse.ui.help;
-//
-//import org.eclipse.swt.events.HelpEvent;
-//
-///**
-// * A content computer is used to dynamically calculate help support contexts at the
-// * time the user requests help.
-// * <p>
-// * This interface may be implemented by clients.
-// * </p>
-// * @deprecated nested contexts are no longer supported by the help support system
-// *
-// */
-//public interface IContextComputer {
-// /**
-// * Computes contexts for the help system.
-// *
-// * @param event the help event which triggered this request for help
-// * @return a mixed-type array of context ids (type <code>String</code>)
-// * and/or help contexts (type <code>IContext</code>)
-// * @see org.eclipse.help.IContext
-// */
-// public Object[] computeContexts(HelpEvent event);
-//
-// /**
-// * Returns the local contexts for this context computer.
-// * <p>
-// * Typically this method is called by other instances of
-// * <code>IContextComputer</code> in their <code>computeContexts</code>
-// * method.
-// * </p>
-// * <p>
-// * The important concept here is that the value returned by
-// * <code>computeContexts</code> represents the complete help
-// * contexts and is passed directly to the help support system.
-// * </p>
-// * <p>
-// * However the value returned by this method represents the
-// * only the contexts for the particular control with which this
-// * <code>IContextComputer</code> is associated.
-// * </p>
-// * @param event the help event which triggered this request for help
-// * @return a mixed-type array of context ids (type <code>String</code>)
-// * and/or help contexts (type <code>IContext</code>)
-// * @see org.eclipse.help.IContext
-// */
-// public Object[] getLocalContexts(HelpEvent event);
-//}
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.help;
+
+import org.eclipse.swt.events.HelpEvent;
+
+/**
+ * A content computer is used to dynamically calculate help support contexts at the
+ * time the user requests help.
+ * <p>
+ * This interface may be implemented by clients.
+ * </p>
+ * @deprecated nested contexts are no longer supported by the help support system
+ * @since 1.3
+ */
+public interface IContextComputer {
+ /**
+ * Computes contexts for the help system.
+ *
+ * @param event the help event which triggered this request for help
+ * @return a mixed-type array of context ids (type <code>String</code>)
+ * and/or help contexts (type <code>IContext</code>)
+ * @see org.eclipse.help.IContext
+ */
+ public Object[] computeContexts(HelpEvent event);
+
+ /**
+ * Returns the local contexts for this context computer.
+ * <p>
+ * Typically this method is called by other instances of
+ * <code>IContextComputer</code> in their <code>computeContexts</code>
+ * method.
+ * </p>
+ * <p>
+ * The important concept here is that the value returned by
+ * <code>computeContexts</code> represents the complete help
+ * contexts and is passed directly to the help support system.
+ * </p>
+ * <p>
+ * However the value returned by this method represents the
+ * only the contexts for the particular control with which this
+ * <code>IContextComputer</code> is associated.
+ * </p>
+ * @param event the help event which triggered this request for help
+ * @return a mixed-type array of context ids (type <code>String</code>)
+ * and/or help contexts (type <code>IContext</code>)
+ * @see org.eclipse.help.IContext
+ */
+ public Object[] getLocalContexts(HelpEvent event);
+}
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/help/IWorkbenchHelpSystem.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/help/IWorkbenchHelpSystem.java
index 0eab962cbf..08fa11be58 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/help/IWorkbenchHelpSystem.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/help/IWorkbenchHelpSystem.java
@@ -1,212 +1,211 @@
-// RAP [rh] WorkbenchHelpSystem: help support left aside for now
-///*******************************************************************************
-// * Copyright (c) 2005 IBM Corporation and others.
-// * All rights reserved. This program and the accompanying materials
-// * are made available under the terms of the Eclipse Public License v1.0
-// * which accompanies this distribution, and is available at
-// * http://www.eclipse.org/legal/epl-v10.html
-// *
-// * Contributors:
-// * IBM Corporation - initial API and implementation
-// *******************************************************************************/
-//package org.eclipse.ui.help;
-//
-//import java.net.URL;
-//
-//import org.eclipse.help.IContext;
-//import org.eclipse.jface.action.IAction;
-//import org.eclipse.swt.widgets.Control;
-//import org.eclipse.swt.widgets.Menu;
-//import org.eclipse.swt.widgets.MenuItem;
-//
-///**
-// * <p>
-// * The interface that is used to access the workbench help system. Replaces
-// * static methods on <code>WorkbenchHelp</code>.
-// * </p>
-// * <p>
-// * This interface is not intended to be implemented by clients.
-// * </p>
-// *
-// * @since 3.1
-// * @noimplement This interface is not intended to be implemented by clients.
-// */
-//public interface IWorkbenchHelpSystem {
-//
-// /**
-// * Returns whether there is a UI help system installed.
-// *
-// * @return whether there is a UI help system installed
-// */
-// boolean hasHelpUI();
-//
-// /**
-// * Displays the entire help bookshelf.
-// * <p>
-// * Ignored if no help UI is available.
-// * </p>
-// */
-// void displayHelp();
-//
-// /**
-// * Displays the help search system.
-// * <p>
-// * Ignored if no help UI is available.
-// * </p>
-// */
-// void displaySearch();
-//
-// /**
-// * Displays the dynamic help for the current UI context.
-// * <p>
-// * Ignored if no help UI is available.
-// * </p>
-// */
-// void displayDynamicHelp();
-//
-// /**
-// * Starts the search using the help search system.
-// * <p>
-// * Ignored if no help UI is available.
-// * </p>
-// *
-// * @param expression
-// * the search expression. The actual syntax rules of the
-// * expression are dependent on the active
-// * help system. Refer to the help system
-// * documentation for more details.
-// */
-// void search(String expression);
-//
-// /**
-// * Displays context-sensitive help for the given context.
-// * <p>
-// * (x,y) coordinates specify the location where the context sensitive help
-// * UI will be presented. These coordinates are screen-relative (ie: (0,0) is
-// * the top left-most screen corner). The platform is responsible for calling
-// * this method and supplying the appropriate location.
-// * </p>
-// * <p>
-// * Ignored if no help UI is available.
-// * </p>
-// *
-// * @param context
-// * the context to display
-// * @param x
-// * horizontal position
-// * @param y
-// * verifical position
-// */
-// void displayContext(IContext context, int x, int y);
-//
-// /**
-// * Displays help content for the help resource with the given URL.
-// * <p>
-// * This method is called by the platform to launch the help system UI,
-// * displaying the documentation identified by the <code>href</code>
-// * parameter.
-// * </p>
-// * <p>
-// * The help system makes no guarantee that all the help resources can be
-// * displayed or how they are displayed.
-// * </p>
-// * <p>
-// * Ignored if no help UI is available.
-// * </p>
-// *
-// * @param href
-// * the URL of the help resource.
-// * <p>
-// * Valid href are as described in
-// * {@link org.eclipse.help.IHelpResource#getHref() IHelpResource.getHref()}
-// * </p>
-// */
-// void displayHelpResource(String href);
-//
-// /**
-// * Calls the help support system to display the given help context id.
-// * <p>
-// * May only be called from a UI thread.
-// * <p>
-// *
-// * @param contextId
-// * the id of the context to display
-// */
-// void displayHelp(String contextId);
-//
-// /**
-// * Displays context-sensitive help for the given context.
-// * <p>
-// * May only be called from a UI thread.
-// * <p>
-// *
-// * @param context
-// * the context to display
-// */
-// void displayHelp(IContext context);
-//
-// /**
-// * Returns whether the context-sensitive help window is currently being
-// * displayed. Returns <code>false</code> if the help UI has not been
-// * activated yet.
-// *
-// * @return <code>true</code> if the context-sensitive help window is
-// * currently being displayed, <code>false</code> otherwise
-// */
-// boolean isContextHelpDisplayed();
-//
-// /**
-// * Sets the given help context id on the given action.
-// *
-// * @param action
-// * the action on which to register the context id
-// * @param contextId
-// * the context id to use when F1 help is invoked
-// */
-// void setHelp(IAction action, String contextId);
-//
-// /**
-// * Sets the given help context id on the given control.
-// *
-// * @param control
-// * the control on which to register the context id
-// * @param contextId
-// * the context id to use when F1 help is invoked
-// */
-// void setHelp(Control control, String contextId);
-//
-// /**
-// * Sets the given help context id on the given menu.
-// *
-// * @param menu
-// * the menu on which to register the context id
-// * @param contextId
-// * the context id to use when F1 help is invoked
-// */
-// void setHelp(Menu menu, String contextId);
-//
-// /**
-// * Sets the given help context id on the given menu item.
-// *
-// * @param item
-// * the menu item on which to register the context id
-// * @param contextId
-// * the context id to use when F1 help is invoked
-// */
-// void setHelp(MenuItem item, String contextId);
-//
-// /**
-// * Resolves the help resource href by converting it into a legitimate URL
-// * according to the implementation of the help system. Help resources that
-// * already have a protocol will be unchanged.
-// *
-// * @param href
-// * @param documentOnly if <code>true</code>, the resulting URL must point
-// * at the document referenced by href. Otherwise, it can be a URL that
-// * contains additional elements like navigation that the help system
-// * adds to the document.
-// * @return the resolved URL or <code>null</code> if no help UI is
-// * available.
-// */
-// URL resolve(String href, boolean documentOnly);
-//} \ No newline at end of file
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.help;
+
+import java.net.URL;
+
+import org.eclipse.help.IContext;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+
+/**
+ * <p>
+ * The interface that is used to access the workbench help system. Replaces
+ * static methods on <code>WorkbenchHelp</code>.
+ * </p>
+ * <p>
+ * This interface is not intended to be implemented by clients.
+ * </p>
+ *
+ * @since 1.3
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IWorkbenchHelpSystem {
+
+ /**
+ * Returns whether there is a UI help system installed.
+ *
+ * @return whether there is a UI help system installed
+ */
+ boolean hasHelpUI();
+
+ /**
+ * Displays the entire help bookshelf.
+ * <p>
+ * Ignored if no help UI is available.
+ * </p>
+ */
+ void displayHelp();
+
+ /**
+ * Displays the help search system.
+ * <p>
+ * Ignored if no help UI is available.
+ * </p>
+ */
+ void displaySearch();
+
+ /**
+ * Displays the dynamic help for the current UI context.
+ * <p>
+ * Ignored if no help UI is available.
+ * </p>
+ */
+ void displayDynamicHelp();
+
+ /**
+ * Starts the search using the help search system.
+ * <p>
+ * Ignored if no help UI is available.
+ * </p>
+ *
+ * @param expression
+ * the search expression. The actual syntax rules of the
+ * expression are dependent on the active
+ * help system. Refer to the help system
+ * documentation for more details.
+ */
+ void search(String expression);
+
+ /**
+ * Displays context-sensitive help for the given context.
+ * <p>
+ * (x,y) coordinates specify the location where the context sensitive help
+ * UI will be presented. These coordinates are screen-relative (ie: (0,0) is
+ * the top left-most screen corner). The platform is responsible for calling
+ * this method and supplying the appropriate location.
+ * </p>
+ * <p>
+ * Ignored if no help UI is available.
+ * </p>
+ *
+ * @param context
+ * the context to display
+ * @param x
+ * horizontal position
+ * @param y
+ * verifical position
+ */
+ void displayContext(IContext context, int x, int y);
+
+ /**
+ * Displays help content for the help resource with the given URL.
+ * <p>
+ * This method is called by the platform to launch the help system UI,
+ * displaying the documentation identified by the <code>href</code>
+ * parameter.
+ * </p>
+ * <p>
+ * The help system makes no guarantee that all the help resources can be
+ * displayed or how they are displayed.
+ * </p>
+ * <p>
+ * Ignored if no help UI is available.
+ * </p>
+ *
+ * @param href
+ * the URL of the help resource.
+ * <p>
+ * Valid href are as described in
+ * {@link org.eclipse.help.IHelpResource#getHref() IHelpResource.getHref()}
+ * </p>
+ */
+ void displayHelpResource(String href);
+
+ /**
+ * Calls the help support system to display the given help context id.
+ * <p>
+ * May only be called from a UI thread.
+ * <p>
+ *
+ * @param contextId
+ * the id of the context to display
+ */
+ void displayHelp(String contextId);
+
+ /**
+ * Displays context-sensitive help for the given context.
+ * <p>
+ * May only be called from a UI thread.
+ * <p>
+ *
+ * @param context
+ * the context to display
+ */
+ void displayHelp(IContext context);
+
+ /**
+ * Returns whether the context-sensitive help window is currently being
+ * displayed. Returns <code>false</code> if the help UI has not been
+ * activated yet.
+ *
+ * @return <code>true</code> if the context-sensitive help window is
+ * currently being displayed, <code>false</code> otherwise
+ */
+ boolean isContextHelpDisplayed();
+
+ /**
+ * Sets the given help context id on the given action.
+ *
+ * @param action
+ * the action on which to register the context id
+ * @param contextId
+ * the context id to use when F1 help is invoked
+ */
+ void setHelp(IAction action, String contextId);
+
+ /**
+ * Sets the given help context id on the given control.
+ *
+ * @param control
+ * the control on which to register the context id
+ * @param contextId
+ * the context id to use when F1 help is invoked
+ */
+ void setHelp(Control control, String contextId);
+
+ /**
+ * Sets the given help context id on the given menu.
+ *
+ * @param menu
+ * the menu on which to register the context id
+ * @param contextId
+ * the context id to use when F1 help is invoked
+ */
+ void setHelp(Menu menu, String contextId);
+
+ /**
+ * Sets the given help context id on the given menu item.
+ *
+ * @param item
+ * the menu item on which to register the context id
+ * @param contextId
+ * the context id to use when F1 help is invoked
+ */
+ void setHelp(MenuItem item, String contextId);
+
+ /**
+ * Resolves the help resource href by converting it into a legitimate URL
+ * according to the implementation of the help system. Help resources that
+ * already have a protocol will be unchanged.
+ *
+ * @param href
+ * @param documentOnly if <code>true</code>, the resulting URL must point
+ * at the document referenced by href. Otherwise, it can be a URL that
+ * contains additional elements like navigation that the help system
+ * adds to the document.
+ * @return the resolved URL or <code>null</code> if no help UI is
+ * available.
+ */
+ URL resolve(String href, boolean documentOnly);
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/help/ViewContextComputer.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/help/ViewContextComputer.java
index ac82b6adba..59b5a1c361 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/help/ViewContextComputer.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/help/ViewContextComputer.java
@@ -1,121 +1,121 @@
-// RAP [rh] ViewContextComputer: help support left aside for now
-///*******************************************************************************
-// * Copyright (c) 2000, 2006 IBM Corporation and others.
-// * All rights reserved. This program and the accompanying materials
-// * are made available under the terms of the Eclipse Public License v1.0
-// * which accompanies this distribution, and is available at
-// * http://www.eclipse.org/legal/epl-v10.html
-// *
-// * Contributors:
-// * IBM Corporation - initial API and implementation
-// *******************************************************************************/
-//package org.eclipse.ui.help;
-//
-//import java.util.ArrayList;
-//
-//import org.eclipse.core.runtime.Assert;
-//import org.eclipse.help.IContext;
-//import org.eclipse.swt.events.HelpEvent;
-//import org.eclipse.swt.widgets.Control;
-//import org.eclipse.ui.IViewPart;
-//
-///**
-// * For determining the help context for controls in a view.
-// * <p>
-// * This class may be instantiated; it is not intended to be subclassed.
-// * </p>
-// * @deprecated nested contexts are no longer supported by the help support system
-// * @noextend This class is not intended to be subclassed by clients.
-// */
-//public class ViewContextComputer implements IContextComputer {
-// private IViewPart view;
-//
-// private ArrayList contextList;
-//
-// private Object context;
-//
-// /**
-// * Creates a new context computer for the given view and help context.
-// *
-// * @param viewPart the view
-// * @param helpContext a single help context id (type <code>String</code>) or
-// * help context object (type <code>IContext</code>)
-// */
-// public ViewContextComputer(IViewPart viewPart, Object helpContext) {
-// Assert.isTrue(helpContext instanceof String
-// || helpContext instanceof IContext);
-// view = viewPart;
-// context = helpContext;
-// }
-//
-// /**
-// * Add the contexts to the context list.
-// *
-// * @param object the contexts (<code>Object[]</code> or <code>IContextComputer</code>)
-// * @param event the help event
-// */
-// private void addContexts(Object object, HelpEvent event) {
-// Assert.isTrue(object instanceof Object[]
-// || object instanceof IContextComputer
-// || object instanceof String);
-//
-// if (object instanceof String) {
-// contextList.add(object);
-// return;
-// }
-//
-// Object[] contexts;
-// if (object instanceof IContextComputer) {
-// // get local contexts
-// contexts = ((IContextComputer) object).getLocalContexts(event);
-// } else {
-// contexts = (Object[]) object;
-// }
-//
-// // copy the contexts into our list
-// for (int i = 0; i < contexts.length; i++) {
-// contextList.add(contexts[i]);
-// }
-// }
-//
-// /**
-// * Add the contexts for the given control to the context list.
-// *
-// * @param control the control from which to obtain the contexts
-// * @param event the help event
-// */
-// private void addContextsForControl(Control control, HelpEvent event) {
-// // See if there is are help contexts on the control
-// Object object = WorkbenchHelp.getHelp(control);
-//
-// if (object == null || object == this) {
-// // We need to check for this in order to avoid recursion
-// return;
-// }
-//
-// addContexts(object, event);
-// }
-//
-// /* (non-Javadoc)
-// * Method declared on IContextComputer.
-// */
-// public Object[] computeContexts(HelpEvent event) {
-// contextList = new ArrayList();
-//
-// // Add the local context
-// contextList.add(context);
-//
-// // Add the contexts for the window shell
-// addContextsForControl(view.getSite().getShell(), event);
-//
-// // Return the contexts
-// return contextList.toArray();
-// }
-//
-// /* (non-Javadoc)
-// * Method declared on IContextComputer.
-// */
-// public Object[] getLocalContexts(HelpEvent event) {
-// return new Object[] { context };
-// }
-//}
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.help;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.help.IContext;
+import org.eclipse.swt.events.HelpEvent;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IViewPart;
+
+/**
+ * For determining the help context for controls in a view.
+ * <p>
+ * This class may be instantiated; it is not intended to be subclassed.
+ * </p>
+ * @deprecated nested contexts are no longer supported by the help support system
+ * @noextend This class is not intended to be subclassed by clients.
+ * @since 1.3
+ */
+public class ViewContextComputer implements IContextComputer {
+ private IViewPart view;
+
+ private ArrayList contextList;
+
+ private Object context;
+
+ /**
+ * Creates a new context computer for the given view and help context.
+ *
+ * @param viewPart the view
+ * @param helpContext a single help context id (type <code>String</code>) or
+ * help context object (type <code>IContext</code>)
+ */
+ public ViewContextComputer(IViewPart viewPart, Object helpContext) {
+ Assert.isTrue(helpContext instanceof String
+ || helpContext instanceof IContext);
+ view = viewPart;
+ context = helpContext;
+ }
+
+ /**
+ * Add the contexts to the context list.
+ *
+ * @param object the contexts (<code>Object[]</code> or <code>IContextComputer</code>)
+ * @param event the help event
+ */
+ private void addContexts(Object object, HelpEvent event) {
+ Assert.isTrue(object instanceof Object[]
+ || object instanceof IContextComputer
+ || object instanceof String);
+
+ if (object instanceof String) {
+ contextList.add(object);
+ return;
+ }
+
+ Object[] contexts;
+ if (object instanceof IContextComputer) {
+ // get local contexts
+ contexts = ((IContextComputer) object).getLocalContexts(event);
+ } else {
+ contexts = (Object[]) object;
+ }
+
+ // copy the contexts into our list
+ for (int i = 0; i < contexts.length; i++) {
+ contextList.add(contexts[i]);
+ }
+ }
+
+ /**
+ * Add the contexts for the given control to the context list.
+ *
+ * @param control the control from which to obtain the contexts
+ * @param event the help event
+ */
+ private void addContextsForControl(Control control, HelpEvent event) {
+ // See if there is are help contexts on the control
+ Object object = WorkbenchHelp.getHelp(control);
+
+ if (object == null || object == this) {
+ // We need to check for this in order to avoid recursion
+ return;
+ }
+
+ addContexts(object, event);
+ }
+
+ /* (non-Javadoc)
+ * Method declared on IContextComputer.
+ */
+ public Object[] computeContexts(HelpEvent event) {
+ contextList = new ArrayList();
+
+ // Add the local context
+ contextList.add(context);
+
+ // Add the contexts for the window shell
+ addContextsForControl(view.getSite().getShell(), event);
+
+ // Return the contexts
+ return contextList.toArray();
+ }
+
+ /* (non-Javadoc)
+ * Method declared on IContextComputer.
+ */
+ public Object[] getLocalContexts(HelpEvent event) {
+ return new Object[] { context };
+ }
+}
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/help/WorkbenchHelp.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/help/WorkbenchHelp.java
index fe1216df96..b067509a35 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/help/WorkbenchHelp.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/help/WorkbenchHelp.java
@@ -1,428 +1,418 @@
-// RAP [rh] WorkbenchHelp: help support left aside for now
-///*******************************************************************************
-// * Copyright (c) 2000, 2005 IBM Corporation and others.
-// * All rights reserved. This program and the accompanying materials
-// * are made available under the terms of the Eclipse Public License v1.0
-// * which accompanies this distribution, and is available at
-// * http://www.eclipse.org/legal/epl-v10.html
-// *
-// * Contributors:
-// * IBM Corporation - initial API and implementation
-// *******************************************************************************/
-//package org.eclipse.ui.help;
-//
-//import org.eclipse.help.IContext;
-//import org.eclipse.help.IHelp;
-//import org.eclipse.jface.action.IAction;
-//import org.eclipse.swt.events.HelpListener;
-//import org.eclipse.swt.widgets.Control;
-//import org.eclipse.swt.widgets.Menu;
-//import org.eclipse.swt.widgets.MenuItem;
-//import org.eclipse.ui.PlatformUI;
-//import org.eclipse.ui.commands.ICommand;
-//import org.eclipse.ui.internal.help.WorkbenchHelpSystem;
-//
-///**
-// * Provides methods for accessing the help UI.
-// * <p>
-// * The help UI is optional, to allow applications to be configured
-// * without one.
-// * </p>
-// * <p>
-// * The various <code>setHelp</code> methods allow context help to be hooked in
-// * to SWT menus, menu items, and controls, and into JFace actions. This involves
-// * furnishing a help context id. When the user requests help for one of the
-// * established widgets (for instance, by hitting F1), the context id is
-// * retrieved and passed to the help UI using
-// * <code>WorkbenchHelp.displayContext(helpContext, xposition, yposition)</code>.
-// * </p>
-// * <p>
-// * In cases more dynamic situations, clients may hook their own help listener
-// * and call <code>WorkbenchHelp.displayContext</code> with an
-// * <code>IContext</code>.
-// * </p>
-// * <p>
-// * This class provides static methods only; it is not intended to be instantiated
-// * or subclassed.
-// * </p>
-// *
-// * @deprecated clients should use <code>IWorkbenchHelpSystem</code> instead
-// *
-// * @see org.eclipse.help.HelpSystem
-// * @see org.eclipse.ui.help.IWorkbenchHelpSystem
-// * @see org.eclipse.ui.IWorkbench#getHelpSystem()
-// * @noinstantiate This class is not intended to be instantiated by clients.
-// * @noextend This class is not intended to be subclassed by clients.
-// */
-//public class WorkbenchHelp {
-//
-// /**
-// * This class is not intented to be instantiated
-// */
-// private WorkbenchHelp() {
-// }
-//
-// /**
-// * Displays the entire help bookshelf.
-// * <p>
-// * Ignored if no help UI is available.
-// * </p>
-// *
-// * @since 3.0
-// */
-// public static void displayHelp() {
-// PlatformUI.getWorkbench().getHelpSystem().displayHelp();
-// }
-//
-// /**
-// * Displays context-sensitive help for the given context.
-// * <p>
-// * (x,y) coordinates specify the location where the context sensitive
-// * help UI will be presented. These coordinates are screen-relative
-// * (ie: (0,0) is the top left-most screen corner).
-// * The platform is responsible for calling this method and supplying the
-// * appropriate location.
-// * </p>
-// * <p>
-// * Ignored if no help UI is available.
-// * </p>
-// *
-// * @param context the context to display
-// * @param x horizontal position
-// * @param y verifical position
-// * @since 3.0
-// */
-// public static void displayContext(IContext context, int x, int y) {
-// PlatformUI.getWorkbench().getHelpSystem().displayContext(context, x, y);
-// }
-//
-// /**
-// * Displays help content for the help resource with the given URL.
-// * <p>
-// * This method is called by the platform to launch the help system UI, displaying
-// * the documentation identified by the <code>href</code> parameter.
-// * </p>
-// * <p>
-// * The help system makes no guarantee that all the help resources can be displayed or how they are displayed.
-// * </p>
-// * <p>
-// * Ignored if no help UI is available.
-// * </p>
-// *
-// * @param href the URL of the help resource.
-// * <p>Valid href are as described in
-// * {@link org.eclipse.help.IHelpResource#getHref() IHelpResource.getHref()}
-// * </p>
-// * @since 3.0
-// */
-// public static void displayHelpResource(String href) {
-// PlatformUI.getWorkbench().getHelpSystem().displayHelpResource(href);
-// }
-//
-// /**
-// * Creates a new help listener for the given command. This retrieves the
-// * help context ID from the command, and creates an appropriate listener
-// * based on this.
-// *
-// * @param command
-// * The command for which the listener should be created; must
-// * not be <code>null</code>.
-// * @return A help listener; never <code>null</code>.
-// */
-// public static HelpListener createHelpListener(ICommand command) {
-// return WorkbenchHelpSystem.getInstance().createHelpListener(command);
-// }
-//
-// /**
-// * Calls the help support system to display the given help context id.
-// * <p>
-// * May only be called from a UI thread.
-// * <p>
-// *
-// * @param contextId the id of the context to display
-// * @since 2.0
-// */
-// public static void displayHelp(String contextId) {
-// PlatformUI.getWorkbench().getHelpSystem().displayHelp(contextId);
-// }
-//
-// /**
-// * Displays context-sensitive help for the given context.
-// * <p>
-// * May only be called from a UI thread.
-// * <p>
-// *
-// * @param context the context to display
-// * @since 2.0
-// */
-// public static void displayHelp(IContext context) {
-// PlatformUI.getWorkbench().getHelpSystem().displayHelp(context);
-// }
-//
-// /**
-// * Returns the help contexts on the given control.
-// * <p>
-// * Instances of <code>IContextComputer</code> may use this method
-// * to obtain the previously registered help contexts of a control.
-// * </p>
-// *
-// * @param control the control on which the contexts are registered
-// * @return contexts the contexts to use when F1 help is invoked; a mixed-type
-// * array of context ids (type <code>String</code>) and/or help contexts (type
-// * <code>IContext</code>) or an <code>IContextComputer</code> or
-// * <code>null</code> if no contexts have been set.
-// * @deprecated as context computers are no longer supported
-// */
-// public static Object getHelp(Control control) {
-// return control.getData(WorkbenchHelpSystem.HELP_KEY);
-// }
-//
-// /**
-// * Returns the help contexts on the given menu.
-// * <p>
-// * Instances of <code>IContextComputer</code> may use this method
-// * to obtain the previously registered help contexts of a menu.
-// * </p>
-// *
-// * @param menu the menu on which the contexts are registered
-// * @return contexts the contexts to use when F1 help is invoked; a mixed-type
-// * array of context ids (type <code>String</code>) and/or help contexts (type
-// * <code>IContext</code>) or an <code>IContextComputer</code> or
-// * <code>null</code> if no contexts have been set.
-// * @deprecated as context computers are no longer supported
-// */
-// public static Object getHelp(Menu menu) {
-// return menu.getData(WorkbenchHelpSystem.HELP_KEY);
-// }
-//
-// /**
-// * Returns the help contexts on the given menu item.
-// * <p>
-// * Instances of <code>IContextComputer</code> may use this method
-// * to obtain the previously registered help contexts of a menu.
-// * </p>
-// *
-// * @param menuItem the menu item on which the contexts are registered
-// * @return contexts the contexts to use when F1 help is invoked; a mixed-type
-// * array of context ids (type <code>String</code>) and/or help contexts (type
-// * <code>IContext</code>) or an <code>IContextComputer</code> or
-// * <code>null</code> if no contexts have been set.
-// * @deprecated as context computers are no longer supported
-// */
-// public static Object getHelp(MenuItem menuItem) {
-// return menuItem.getData(WorkbenchHelpSystem.HELP_KEY);
-// }
-//
-// /**
-// * Returns the help support system for the platform, if available.
-// *
-// * @return the help support system, or <code>null</code> if none
-// * @deprecated Use the static methods on this class and on
-// * {@link org.eclipse.help.HelpSystem HelpSystem} instead of the IHelp methods
-// * on the object returned by this method.
-// */
-// public static IHelp getHelpSupport() {
-// return WorkbenchHelpSystem.getInstance().getHelpSupport();
-// }
-//
-//
-// /**
-// * Returns whether the context-sensitive help window is currently being
-// * displayed. Returns <code>false</code> if the help UI has not been
-// * activated yet.
-// *
-// * @return <code>true</code> if the context-sensitive help
-// * window is currently being displayed, <code>false</code> otherwise
-// */
-// public static boolean isContextHelpDisplayed() {
-// return PlatformUI.getWorkbench().getHelpSystem().isContextHelpDisplayed();
-// }
-//
-// /**
-// * Sets the given help contexts on the given action.
-// * <p>
-// * Use this method when the list of help contexts is known in advance.
-// * Help contexts can either supplied as a static list, or calculated with a
-// * context computer (but not both).
-// * </p>
-// *
-// * @param action the action on which to register the computer
-// * @param contexts the contexts to use when F1 help is invoked; a mixed-type
-// * array of context ids (type <code>String</code>) and/or help contexts (type
-// * <code>IContext</code>)
-// * @deprecated use setHelp with a single context id parameter
-// */
-// public static void setHelp(IAction action, final Object[] contexts) {
-// WorkbenchHelpSystem.getInstance().setHelp(action, contexts);
-// }
-//
-// /**
-// * Sets the given help context computer on the given action.
-// * <p>
-// * Use this method when the help contexts cannot be computed in advance.
-// * Help contexts can either supplied as a static list, or calculated with a
-// * context computer (but not both).
-// * </p>
-// *
-// * @param action the action on which to register the computer
-// * @param computer the computer to determine the help contexts for the control
-// * when F1 help is invoked
-// * @deprecated context computers are no longer supported, clients should implement
-// * their own help listener
-// */
-// public static void setHelp(IAction action, final IContextComputer computer) {
-// WorkbenchHelpSystem.getInstance().setHelp(action, computer);
-// }
-//
-// /**
-// * Sets the given help contexts on the given control.
-// * <p>
-// * Use this method when the list of help contexts is known in advance.
-// * Help contexts can either supplied as a static list, or calculated with a
-// * context computer (but not both).
-// * </p>
-// *
-// * @param control the control on which to register the contexts
-// * @param contexts the contexts to use when F1 help is invoked; a mixed-type
-// * array of context ids (type <code>String</code>) and/or help contexts (type
-// * <code>IContext</code>)
-// * @deprecated use setHelp with single context id parameter
-// */
-// public static void setHelp(Control control, Object[] contexts) {
-// WorkbenchHelpSystem.getInstance().setHelp(control, contexts);
-// }
-//
-// /**
-// * Sets the given help context computer on the given control.
-// * <p>
-// * Use this method when the help contexts cannot be computed in advance.
-// * Help contexts can either supplied as a static list, or calculated with a
-// * context computer (but not both).
-// * </p>
-// *
-// * @param control the control on which to register the computer
-// * @param computer the computer to determine the help contexts for the control
-// * when F1 help is invoked
-// * @deprecated context computers are no longer supported, clients should implement
-// * their own help listener
-// */
-// public static void setHelp(Control control, IContextComputer computer) {
-// WorkbenchHelpSystem.getInstance().setHelp(control, computer);
-// }
-//
-// /**
-// * Sets the given help contexts on the given menu.
-// * <p>
-// * Use this method when the list of help contexts is known in advance.
-// * Help contexts can either supplied as a static list, or calculated with a
-// * context computer (but not both).
-// * </p>
-// *
-// * @param menu the menu on which to register the context
-// * @param contexts the contexts to use when F1 help is invoked; a mixed-type
-// * array of context ids (type <code>String</code>) and/or help contexts (type
-// * <code>IContext</code>)
-// * @deprecated use setHelp with single context id parameter
-// */
-// public static void setHelp(Menu menu, Object[] contexts) {
-// WorkbenchHelpSystem.getInstance().setHelp(menu, contexts);
-// }
-//
-// /**
-// * Sets the given help context computer on the given menu.
-// * <p>
-// * Use this method when the help contexts cannot be computed in advance.
-// * Help contexts can either supplied as a static list, or calculated with a
-// * context computer (but not both).
-// * </p>
-// *
-// * @param menu the menu on which to register the computer
-// * @param computer the computer to determine the help contexts for the control
-// * when F1 help is invoked
-// * @deprecated context computers are no longer supported, clients should implement
-// * their own help listener
-// */
-// public static void setHelp(Menu menu, IContextComputer computer) {
-// WorkbenchHelpSystem.getInstance().setHelp(menu, computer);
-// }
-//
-// /**
-// * Sets the given help contexts on the given menu item.
-// * <p>
-// * Use this method when the list of help contexts is known in advance.
-// * Help contexts can either supplied as a static list, or calculated with a
-// * context computer (but not both).
-// * </p>
-// *
-// * @param item the menu item on which to register the context
-// * @param contexts the contexts to use when F1 help is invoked; a mixed-type
-// * array of context ids (type <code>String</code>) and/or help contexts (type
-// * <code>IContext</code>)
-// * @deprecated use setHelp with single context id parameter
-// */
-// public static void setHelp(MenuItem item, Object[] contexts) {
-// WorkbenchHelpSystem.getInstance().setHelp(item, contexts);
-// }
-//
-// /**
-// * Sets the given help context computer on the given menu item.
-// * <p>
-// * Use this method when the help contexts cannot be computed in advance.
-// * Help contexts can either supplied as a static list, or calculated with a
-// * context computer (but not both).
-// * </p>
-// *
-// * @param item the menu item on which to register the computer
-// * @param computer the computer to determine the help contexts for the control
-// * when F1 help is invoked
-// * @deprecated context computers are no longer supported, clients should implement
-// * their own help listener
-// */
-// public static void setHelp(MenuItem item, IContextComputer computer) {
-// WorkbenchHelpSystem.getInstance().setHelp(item, computer);
-// }
-//
-// /**
-// * Sets the given help context id on the given action.
-// *
-// * @param action the action on which to register the context id
-// * @param contextId the context id to use when F1 help is invoked
-// * @since 2.0
-// */
-// public static void setHelp(IAction action, final String contextId) {
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(action, contextId);
-// }
-//
-// /**
-// * Sets the given help context id on the given control.
-// *
-// * @param control the control on which to register the context id
-// * @param contextId the context id to use when F1 help is invoked
-// * @since 2.0
-// */
-// public static void setHelp(Control control, String contextId) {
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(control, contextId);
-// }
-//
-// /**
-// * Sets the given help context id on the given menu.
-// *
-// * @param menu the menu on which to register the context id
-// * @param contextId the context id to use when F1 help is invoked
-// * @since 2.0
-// */
-// public static void setHelp(Menu menu, String contextId) {
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(menu, contextId);
-// }
-//
-// /**
-// * Sets the given help context id on the given menu item.
-// *
-// * @param item the menu item on which to register the context id
-// * @param contextId the context id to use when F1 help is invoked
-// * @since 2.0
-// */
-// public static void setHelp(MenuItem item, String contextId) {
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(item, contextId);
-// }
-//}
+/*******************************************************************************
+ * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.help;
+
+import org.eclipse.help.IContext;
+import org.eclipse.help.IHelp;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.swt.events.HelpListener;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommand;
+import org.eclipse.ui.internal.help.WorkbenchHelpSystem;
+
+/**
+ * Provides methods for accessing the help UI.
+ * <p>
+ * The help UI is optional, to allow applications to be configured
+ * without one.
+ * </p>
+ * <p>
+ * The various <code>setHelp</code> methods allow context help to be hooked in
+ * to SWT menus, menu items, and controls, and into JFace actions. This involves
+ * furnishing a help context id. When the user requests help for one of the
+ * established widgets (for instance, by hitting F1), the context id is
+ * retrieved and passed to the help UI using
+ * <code>WorkbenchHelp.displayContext(helpContext, xposition, yposition)</code>.
+ * </p>
+ * <p>
+ * In cases more dynamic situations, clients may hook their own help listener
+ * and call <code>WorkbenchHelp.displayContext</code> with an
+ * <code>IContext</code>.
+ * </p>
+ * <p>
+ * This class provides static methods only; it is not intended to be instantiated
+ * or subclassed.
+ * </p>
+ *
+ * @deprecated clients should use <code>IWorkbenchHelpSystem</code> instead
+ *
+ * @see org.eclipse.help.HelpSystem
+ * @see org.eclipse.ui.help.IWorkbenchHelpSystem
+ * @see org.eclipse.ui.IWorkbench#getHelpSystem()
+ * @noinstantiate This class is not intended to be instantiated by clients.
+ * @noextend This class is not intended to be subclassed by clients.
+ * @since 1.3
+ */
+public class WorkbenchHelp {
+
+ /**
+ * This class is not intented to be instantiated
+ */
+ private WorkbenchHelp() {
+ }
+
+ /**
+ * Displays the entire help bookshelf.
+ * <p>
+ * Ignored if no help UI is available.
+ * </p>
+ */
+ public static void displayHelp() {
+ PlatformUI.getWorkbench().getHelpSystem().displayHelp();
+ }
+
+ /**
+ * Displays context-sensitive help for the given context.
+ * <p>
+ * (x,y) coordinates specify the location where the context sensitive
+ * help UI will be presented. These coordinates are screen-relative
+ * (ie: (0,0) is the top left-most screen corner).
+ * The platform is responsible for calling this method and supplying the
+ * appropriate location.
+ * </p>
+ * <p>
+ * Ignored if no help UI is available.
+ * </p>
+ *
+ * @param context the context to display
+ * @param x horizontal position
+ * @param y verifical position
+ */
+ public static void displayContext(IContext context, int x, int y) {
+ PlatformUI.getWorkbench().getHelpSystem().displayContext(context, x, y);
+ }
+
+ /**
+ * Displays help content for the help resource with the given URL.
+ * <p>
+ * This method is called by the platform to launch the help system UI, displaying
+ * the documentation identified by the <code>href</code> parameter.
+ * </p>
+ * <p>
+ * The help system makes no guarantee that all the help resources can be displayed or how they are displayed.
+ * </p>
+ * <p>
+ * Ignored if no help UI is available.
+ * </p>
+ *
+ * @param href the URL of the help resource.
+ * <p>Valid href are as described in
+ * {@link org.eclipse.help.IHelpResource#getHref() IHelpResource.getHref()}
+ * </p>
+ */
+ public static void displayHelpResource(String href) {
+ PlatformUI.getWorkbench().getHelpSystem().displayHelpResource(href);
+ }
+
+ /**
+ * Creates a new help listener for the given command. This retrieves the
+ * help context ID from the command, and creates an appropriate listener
+ * based on this.
+ *
+ * @param command
+ * The command for which the listener should be created; must
+ * not be <code>null</code>.
+ * @return A help listener; never <code>null</code>.
+ */
+ public static HelpListener createHelpListener(ICommand command) {
+ return WorkbenchHelpSystem.getInstance().createHelpListener(command);
+ }
+
+ /**
+ * Calls the help support system to display the given help context id.
+ * <p>
+ * May only be called from a UI thread.
+ * <p>
+ *
+ * @param contextId the id of the context to display
+ */
+ public static void displayHelp(String contextId) {
+ PlatformUI.getWorkbench().getHelpSystem().displayHelp(contextId);
+ }
+
+ /**
+ * Displays context-sensitive help for the given context.
+ * <p>
+ * May only be called from a UI thread.
+ * <p>
+ *
+ * @param context the context to display
+ */
+ public static void displayHelp(IContext context) {
+ PlatformUI.getWorkbench().getHelpSystem().displayHelp(context);
+ }
+
+ /**
+ * Returns the help contexts on the given control.
+ * <p>
+ * Instances of <code>IContextComputer</code> may use this method
+ * to obtain the previously registered help contexts of a control.
+ * </p>
+ *
+ * @param control the control on which the contexts are registered
+ * @return contexts the contexts to use when F1 help is invoked; a mixed-type
+ * array of context ids (type <code>String</code>) and/or help contexts (type
+ * <code>IContext</code>) or an <code>IContextComputer</code> or
+ * <code>null</code> if no contexts have been set.
+ * @deprecated as context computers are no longer supported
+ */
+ public static Object getHelp(Control control) {
+ return control.getData(WorkbenchHelpSystem.HELP_KEY);
+ }
+
+ /**
+ * Returns the help contexts on the given menu.
+ * <p>
+ * Instances of <code>IContextComputer</code> may use this method
+ * to obtain the previously registered help contexts of a menu.
+ * </p>
+ *
+ * @param menu the menu on which the contexts are registered
+ * @return contexts the contexts to use when F1 help is invoked; a mixed-type
+ * array of context ids (type <code>String</code>) and/or help contexts (type
+ * <code>IContext</code>) or an <code>IContextComputer</code> or
+ * <code>null</code> if no contexts have been set.
+ * @deprecated as context computers are no longer supported
+ */
+ public static Object getHelp(Menu menu) {
+ return menu.getData(WorkbenchHelpSystem.HELP_KEY);
+ }
+
+ /**
+ * Returns the help contexts on the given menu item.
+ * <p>
+ * Instances of <code>IContextComputer</code> may use this method
+ * to obtain the previously registered help contexts of a menu.
+ * </p>
+ *
+ * @param menuItem the menu item on which the contexts are registered
+ * @return contexts the contexts to use when F1 help is invoked; a mixed-type
+ * array of context ids (type <code>String</code>) and/or help contexts (type
+ * <code>IContext</code>) or an <code>IContextComputer</code> or
+ * <code>null</code> if no contexts have been set.
+ * @deprecated as context computers are no longer supported
+ */
+ public static Object getHelp(MenuItem menuItem) {
+ return menuItem.getData(WorkbenchHelpSystem.HELP_KEY);
+ }
+
+ /**
+ * Returns the help support system for the platform, if available.
+ *
+ * @return the help support system, or <code>null</code> if none
+ * @deprecated Use the static methods on this class and on
+ * {@link org.eclipse.help.HelpSystem HelpSystem} instead of the IHelp methods
+ * on the object returned by this method.
+ */
+ public static IHelp getHelpSupport() {
+ return WorkbenchHelpSystem.getInstance().getHelpSupport();
+ }
+
+
+ /**
+ * Returns whether the context-sensitive help window is currently being
+ * displayed. Returns <code>false</code> if the help UI has not been
+ * activated yet.
+ *
+ * @return <code>true</code> if the context-sensitive help
+ * window is currently being displayed, <code>false</code> otherwise
+ */
+ public static boolean isContextHelpDisplayed() {
+ return PlatformUI.getWorkbench().getHelpSystem().isContextHelpDisplayed();
+ }
+
+ /**
+ * Sets the given help contexts on the given action.
+ * <p>
+ * Use this method when the list of help contexts is known in advance.
+ * Help contexts can either supplied as a static list, or calculated with a
+ * context computer (but not both).
+ * </p>
+ *
+ * @param action the action on which to register the computer
+ * @param contexts the contexts to use when F1 help is invoked; a mixed-type
+ * array of context ids (type <code>String</code>) and/or help contexts (type
+ * <code>IContext</code>)
+ * @deprecated use setHelp with a single context id parameter
+ */
+ public static void setHelp(IAction action, final Object[] contexts) {
+ WorkbenchHelpSystem.getInstance().setHelp(action, contexts);
+ }
+
+ /**
+ * Sets the given help context computer on the given action.
+ * <p>
+ * Use this method when the help contexts cannot be computed in advance.
+ * Help contexts can either supplied as a static list, or calculated with a
+ * context computer (but not both).
+ * </p>
+ *
+ * @param action the action on which to register the computer
+ * @param computer the computer to determine the help contexts for the control
+ * when F1 help is invoked
+ * @deprecated context computers are no longer supported, clients should implement
+ * their own help listener
+ */
+ public static void setHelp(IAction action, final IContextComputer computer) {
+ WorkbenchHelpSystem.getInstance().setHelp(action, computer);
+ }
+
+ /**
+ * Sets the given help contexts on the given control.
+ * <p>
+ * Use this method when the list of help contexts is known in advance.
+ * Help contexts can either supplied as a static list, or calculated with a
+ * context computer (but not both).
+ * </p>
+ *
+ * @param control the control on which to register the contexts
+ * @param contexts the contexts to use when F1 help is invoked; a mixed-type
+ * array of context ids (type <code>String</code>) and/or help contexts (type
+ * <code>IContext</code>)
+ * @deprecated use setHelp with single context id parameter
+ */
+ public static void setHelp(Control control, Object[] contexts) {
+ WorkbenchHelpSystem.getInstance().setHelp(control, contexts);
+ }
+
+ /**
+ * Sets the given help context computer on the given control.
+ * <p>
+ * Use this method when the help contexts cannot be computed in advance.
+ * Help contexts can either supplied as a static list, or calculated with a
+ * context computer (but not both).
+ * </p>
+ *
+ * @param control the control on which to register the computer
+ * @param computer the computer to determine the help contexts for the control
+ * when F1 help is invoked
+ * @deprecated context computers are no longer supported, clients should implement
+ * their own help listener
+ */
+ public static void setHelp(Control control, IContextComputer computer) {
+ WorkbenchHelpSystem.getInstance().setHelp(control, computer);
+ }
+
+ /**
+ * Sets the given help contexts on the given menu.
+ * <p>
+ * Use this method when the list of help contexts is known in advance.
+ * Help contexts can either supplied as a static list, or calculated with a
+ * context computer (but not both).
+ * </p>
+ *
+ * @param menu the menu on which to register the context
+ * @param contexts the contexts to use when F1 help is invoked; a mixed-type
+ * array of context ids (type <code>String</code>) and/or help contexts (type
+ * <code>IContext</code>)
+ * @deprecated use setHelp with single context id parameter
+ */
+ public static void setHelp(Menu menu, Object[] contexts) {
+ WorkbenchHelpSystem.getInstance().setHelp(menu, contexts);
+ }
+
+ /**
+ * Sets the given help context computer on the given menu.
+ * <p>
+ * Use this method when the help contexts cannot be computed in advance.
+ * Help contexts can either supplied as a static list, or calculated with a
+ * context computer (but not both).
+ * </p>
+ *
+ * @param menu the menu on which to register the computer
+ * @param computer the computer to determine the help contexts for the control
+ * when F1 help is invoked
+ * @deprecated context computers are no longer supported, clients should implement
+ * their own help listener
+ */
+ public static void setHelp(Menu menu, IContextComputer computer) {
+ WorkbenchHelpSystem.getInstance().setHelp(menu, computer);
+ }
+
+ /**
+ * Sets the given help contexts on the given menu item.
+ * <p>
+ * Use this method when the list of help contexts is known in advance.
+ * Help contexts can either supplied as a static list, or calculated with a
+ * context computer (but not both).
+ * </p>
+ *
+ * @param item the menu item on which to register the context
+ * @param contexts the contexts to use when F1 help is invoked; a mixed-type
+ * array of context ids (type <code>String</code>) and/or help contexts (type
+ * <code>IContext</code>)
+ * @deprecated use setHelp with single context id parameter
+ */
+ public static void setHelp(MenuItem item, Object[] contexts) {
+ WorkbenchHelpSystem.getInstance().setHelp(item, contexts);
+ }
+
+ /**
+ * Sets the given help context computer on the given menu item.
+ * <p>
+ * Use this method when the help contexts cannot be computed in advance.
+ * Help contexts can either supplied as a static list, or calculated with a
+ * context computer (but not both).
+ * </p>
+ *
+ * @param item the menu item on which to register the computer
+ * @param computer the computer to determine the help contexts for the control
+ * when F1 help is invoked
+ * @deprecated context computers are no longer supported, clients should implement
+ * their own help listener
+ */
+ public static void setHelp(MenuItem item, IContextComputer computer) {
+ WorkbenchHelpSystem.getInstance().setHelp(item, computer);
+ }
+
+ /**
+ * Sets the given help context id on the given action.
+ *
+ * @param action the action on which to register the context id
+ * @param contextId the context id to use when F1 help is invoked
+ */
+ public static void setHelp(IAction action, final String contextId) {
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(action, contextId);
+ }
+
+ /**
+ * Sets the given help context id on the given control.
+ *
+ * @param control the control on which to register the context id
+ * @param contextId the context id to use when F1 help is invoked
+ */
+ public static void setHelp(Control control, String contextId) {
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(control, contextId);
+ }
+
+ /**
+ * Sets the given help context id on the given menu.
+ *
+ * @param menu the menu on which to register the context id
+ * @param contextId the context id to use when F1 help is invoked
+ */
+ public static void setHelp(Menu menu, String contextId) {
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(menu, contextId);
+ }
+
+ /**
+ * Sets the given help context id on the given menu item.
+ *
+ * @param item the menu item on which to register the context id
+ * @param contextId the context id to use when F1 help is invoked
+ */
+ public static void setHelp(MenuItem item, String contextId) {
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(item, contextId);
+ }
+}
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ActionDescriptor.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ActionDescriptor.java
index cb77f1dda4..0c5cd1af84 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ActionDescriptor.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ActionDescriptor.java
@@ -19,7 +19,7 @@ import org.eclipse.ui.IPluginContribution;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.IWorkbenchWindow;
-//import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.internal.registry.IWorkbenchRegistryConstants;
import org.eclipse.ui.plugin.AbstractUIPlugin;
@@ -118,8 +118,7 @@ public class ActionDescriptor implements IPluginContribution {
pluginId = actionElement.getNamespace();
String label = actionElement.getAttribute(IWorkbenchRegistryConstants.ATT_LABEL);
String tooltip = actionElement.getAttribute(IWorkbenchRegistryConstants.ATT_TOOLTIP);
-// RAP [rh] Workbench#getHelpSystem() missing
-// String helpContextId = actionElement.getAttribute(IWorkbenchRegistryConstants.ATT_HELP_CONTEXT_ID);
+ String helpContextId = actionElement.getAttribute(IWorkbenchRegistryConstants.ATT_HELP_CONTEXT_ID);
String mpath = actionElement.getAttribute(IWorkbenchRegistryConstants.ATT_MENUBAR_PATH);
String tpath = actionElement.getAttribute(IWorkbenchRegistryConstants.ATT_TOOLBAR_PATH);
String style = actionElement.getAttribute(IWorkbenchRegistryConstants.ATT_STYLE);
@@ -181,17 +180,16 @@ public class ActionDescriptor implements IPluginContribution {
if (action.getToolTipText() == null && tooltip != null) {
action.setToolTipText(tooltip);
}
-// RAP [rh] Workbench#getHelpSystem() missing
-// if (helpContextId != null) {
-// String fullID = helpContextId;
-// if (helpContextId.indexOf(".") == -1) { //$NON-NLS-1$
-// // For backward compatibility we auto qualify the id if it is not
-// // qualified)
-// fullID = actionElement.getNamespace()
-// + "." + helpContextId;//$NON-NLS-1$
-// }
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(action, fullID);
-// }
+ if (helpContextId != null) {
+ String fullID = helpContextId;
+ if (helpContextId.indexOf(".") == -1) { //$NON-NLS-1$
+ // For backward compatibility we auto qualify the id if it is not
+ // qualified)
+ fullID = actionElement.getNamespace()
+ + "." + helpContextId;//$NON-NLS-1$
+ }
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(action, fullID);
+ }
if (description != null) {
action.setDescription(description);
}
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CloseAllSavedAction.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CloseAllSavedAction.java
index 9604c6af2e..740dbb27f9 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CloseAllSavedAction.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CloseAllSavedAction.java
@@ -43,9 +43,8 @@ public class CloseAllSavedAction extends PageEventAction implements
// @issue Should create a ID in IWorkbenchActionConstants when it becames API?
setId("closeAllSaved"); //$NON-NLS-1$
updateState();
-// RAP [rh] DynamicHelpAction: help support left aside for now
-// window.getWorkbench().getHelpSystem().setHelp(this,
-// IWorkbenchHelpContextIds.CLOSE_ALL_SAVED_ACTION);
+ window.getWorkbench().getHelpSystem().setHelp(this,
+ IWorkbenchHelpContextIds.CLOSE_ALL_SAVED_ACTION);
setActionDefinitionId("org.eclipse.ui.file.closeAllSaved"); //$NON-NLS-1$
}
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IntroAction.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IntroAction.java
index 0252e4dd94..100e107cce 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IntroAction.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IntroAction.java
@@ -55,9 +55,8 @@ public class IntroAction extends Action implements
throw new IllegalArgumentException();
}
this.workbenchWindow = window;
- // RAP [bm]: helpsystem
-// window.getWorkbench().getHelpSystem().setHelp(this,
-// IWorkbenchHelpContextIds.INTRO_ACTION);
+ window.getWorkbench().getHelpSystem().setHelp(this,
+ IWorkbenchHelpContextIds.INTRO_ACTION);
IntroDescriptor introDescriptor = ((Workbench) workbenchWindow
.getWorkbench()).getIntroDescriptor();
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/LockToolBarAction.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/LockToolBarAction.java
index a11aec832e..ac3232d522 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/LockToolBarAction.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/LockToolBarAction.java
@@ -52,9 +52,8 @@ public class LockToolBarAction extends Action implements
}
}
});
-// RAP [rh] DynamicHelpAction: help support left aside for now
-// window.getWorkbench().getHelpSystem().setHelp(this,
-// IWorkbenchHelpContextIds.LOCK_TOOLBAR_ACTION);
+ window.getWorkbench().getHelpSystem().setHelp(this,
+ IWorkbenchHelpContextIds.LOCK_TOOLBAR_ACTION);
}
/* (non-Javadoc)
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/NavigationHistoryAction.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/NavigationHistoryAction.java
index 77add4b6a2..e1f441f61b 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/NavigationHistoryAction.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/NavigationHistoryAction.java
@@ -112,9 +112,8 @@ public class NavigationHistoryAction extends PageEventAction {
setText(WorkbenchMessages.get().NavigationHistoryAction_forward_text);
setToolTipText(WorkbenchMessages.get().NavigationHistoryAction_forward_toolTip);
// @issue missing action id
-// RAP [rh] DynamicHelpAction: help support left aside for now
-// window.getWorkbench().getHelpSystem().setHelp(this,
-// IWorkbenchHelpContextIds.NAVIGATION_HISTORY_FORWARD);
+ window.getWorkbench().getHelpSystem().setHelp(this,
+ IWorkbenchHelpContextIds.NAVIGATION_HISTORY_FORWARD);
setImageDescriptor(sharedImages
.getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD));
setDisabledImageDescriptor(sharedImages
@@ -124,9 +123,8 @@ public class NavigationHistoryAction extends PageEventAction {
setText(WorkbenchMessages.get().NavigationHistoryAction_backward_text);
setToolTipText(WorkbenchMessages.get().NavigationHistoryAction_backward_toolTip);
// @issue missing action id
-// RAP [rh] DynamicHelpAction: help support left aside for now
-// window.getWorkbench().getHelpSystem().setHelp(this,
-// IWorkbenchHelpContextIds.NAVIGATION_HISTORY_BACKWARD);
+ window.getWorkbench().getHelpSystem().setHelp(this,
+ IWorkbenchHelpContextIds.NAVIGATION_HISTORY_BACKWARD);
setImageDescriptor(sharedImages
.getImageDescriptor(ISharedImages.IMG_TOOL_BACK));
setDisabledImageDescriptor(sharedImages
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/OpenPreferencesAction.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/OpenPreferencesAction.java
index 8fdeec3036..4fcfbfe7d5 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/OpenPreferencesAction.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/OpenPreferencesAction.java
@@ -49,9 +49,8 @@ public class OpenPreferencesAction extends Action implements ActionFactory.IWork
this.workbenchWindow = window;
// @issue action id not set
setToolTipText(WorkbenchMessages.get().OpenPreferences_toolTip);
-// RAP [rh] DynamicHelpAction: help support left aside for now
-// window.getWorkbench().getHelpSystem().setHelp(this,
-// IWorkbenchHelpContextIds.OPEN_PREFERENCES_ACTION);
+ window.getWorkbench().getHelpSystem().setHelp(this,
+ IWorkbenchHelpContextIds.OPEN_PREFERENCES_ACTION);
}
/* (non-Javadoc)
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ResetPerspectiveAction.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ResetPerspectiveAction.java
index 8864b8e25f..eb46f3cedd 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ResetPerspectiveAction.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ResetPerspectiveAction.java
@@ -40,9 +40,8 @@ public class ResetPerspectiveAction extends PerspectiveAction {
setActionDefinitionId("org.eclipse.ui.window.resetPerspective"); //$NON-NLS-1$
// @issue missing action id
setToolTipText(WorkbenchMessages.get().ResetPerspective_toolTip);
-// RAP [rh] WorkbenchHelpSystem: help support left aside for now
-// window.getWorkbench().getHelpSystem().setHelp(this,
-// IWorkbenchHelpContextIds.RESET_PERSPECTIVE_ACTION);
+ window.getWorkbench().getHelpSystem().setHelp(this,
+ IWorkbenchHelpContextIds.RESET_PERSPECTIVE_ACTION);
}
/* (non-Javadoc)
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveAction.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveAction.java
index 9f25575e7c..00b8a43b0d 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveAction.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveAction.java
@@ -32,9 +32,8 @@ public class SaveAction extends BaseSaveAction implements IBackgroundSaveListene
setText(WorkbenchMessages.get().SaveAction_text);
setToolTipText(WorkbenchMessages.get().SaveAction_toolTip);
setId("save"); //$NON-NLS-1$
-// RAP [rh] DynamicHelpAction: help support left aside for now
-// window.getWorkbench().getHelpSystem().setHelp(this,
-// IWorkbenchHelpContextIds.SAVE_ACTION);
+ window.getWorkbench().getHelpSystem().setHelp(this,
+ IWorkbenchHelpContextIds.SAVE_ACTION);
setImageDescriptor(WorkbenchImages
.getImageDescriptor(ISharedImages.IMG_ETOOL_SAVE_EDIT));
setDisabledImageDescriptor(WorkbenchImages
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveAllAction.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveAllAction.java
index b09b554e5c..fc1186bf85 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveAllAction.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveAllAction.java
@@ -54,9 +54,8 @@ public class SaveAllAction extends PageEventAction implements IPropertyListener
setToolTipText(WorkbenchMessages.get().SaveAll_toolTip);
setId("saveAll"); //$NON-NLS-1$
setEnabled(false);
-// RAP [rh] DynamicHelpAction: help support left aside for now
-// window.getWorkbench().getHelpSystem().setHelp(this,
-// IWorkbenchHelpContextIds.SAVE_ALL_ACTION);
+ window.getWorkbench().getHelpSystem().setHelp(this,
+ IWorkbenchHelpContextIds.SAVE_ALL_ACTION);
setImageDescriptor(WorkbenchImages
.getImageDescriptor(ISharedImages.IMG_ETOOL_SAVEALL_EDIT));
setDisabledImageDescriptor(WorkbenchImages
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveAsAction.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveAsAction.java
index 658c793c2e..8def02a682 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveAsAction.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveAsAction.java
@@ -31,9 +31,8 @@ public class SaveAsAction extends BaseSaveAction {
setText(WorkbenchMessages.get().SaveAs_text);
setToolTipText(WorkbenchMessages.get().SaveAs_toolTip);
setId("saveAs"); //$NON-NLS-1$
-// RAP [rh] DynamicHelpAction: help support left aside for now
-// window.getWorkbench().getHelpSystem().setHelp(this,
-// IWorkbenchHelpContextIds.SAVE_AS_ACTION);
+ window.getWorkbench().getHelpSystem().setHelp(this,
+ IWorkbenchHelpContextIds.SAVE_AS_ACTION);
setImageDescriptor(WorkbenchImages
.getImageDescriptor(ISharedImages.IMG_ETOOL_SAVEAS_EDIT));
setDisabledImageDescriptor(WorkbenchImages
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SavePerspectiveAction.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SavePerspectiveAction.java
index 1d0cf97b0e..41d3bf9126 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SavePerspectiveAction.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SavePerspectiveAction.java
@@ -35,9 +35,8 @@ public class SavePerspectiveAction extends PerspectiveAction {
setActionDefinitionId("org.eclipse.ui.window.savePerspective"); //$NON-NLS-1$
// @issue missing action id
setToolTipText(WorkbenchMessages.get().SavePerspective_toolTip);
-// RAP [rh] DynamicHelpAction: help support left aside for now
-// window.getWorkbench().getHelpSystem().setHelp(this,
-// IWorkbenchHelpContextIds.SAVE_PERSPECTIVE_ACTION);
+ window.getWorkbench().getHelpSystem().setHelp(this,
+ IWorkbenchHelpContextIds.SAVE_PERSPECTIVE_ACTION);
}
/* (non-Javadoc)
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowInAction.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowInAction.java
index 0eec5b33cc..97d70fa2ec 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowInAction.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowInAction.java
@@ -40,9 +40,8 @@ public class ShowInAction extends Action {
protected ShowInAction(IWorkbenchWindow window, IViewDescriptor desc) {
super(desc.getLabel());
setImageDescriptor(desc.getImageDescriptor());
-// RAP [rh] IWorkbench#getHelpSystem missing
-// window.getWorkbench().getHelpSystem().setHelp(this,
-// IWorkbenchHelpContextIds.SHOW_IN_ACTION);
+ window.getWorkbench().getHelpSystem().setHelp(this,
+ IWorkbenchHelpContextIds.SHOW_IN_ACTION);
this.window = window;
this.desc = desc;
}
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowViewAction.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowViewAction.java
index 2329af50a3..e32b17daa2 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowViewAction.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowViewAction.java
@@ -44,9 +44,8 @@ public class ShowViewAction extends Action implements IPluginContribution {
setText(accel == null ? label : label + "@" + accel); //$NON-NLS-1$
setImageDescriptor(desc.getImageDescriptor());
setToolTipText(label);
-// RAP [rh] Workbench#getHelpSystem() missing
-// window.getWorkbench().getHelpSystem().setHelp(this,
-// IWorkbenchHelpContextIds.SHOW_VIEW_ACTION);
+ window.getWorkbench().getHelpSystem().setHelp(this,
+ IWorkbenchHelpContextIds.SHOW_VIEW_ACTION);
this.window = window;
this.desc = desc;
this.makeFast = makeFast;
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowViewMenu.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowViewMenu.java
index f12b97e38d..711df82df6 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowViewMenu.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowViewMenu.java
@@ -143,9 +143,8 @@ public class ShowViewMenu extends ContributionItem {
}
};
- // RAP [bm]:
-// window.getWorkbench().getHelpSystem().setHelp(showDlgAction,
-// IWorkbenchHelpContextIds.SHOW_VIEW_OTHER_ACTION);
+ window.getWorkbench().getHelpSystem().setHelp(showDlgAction,
+ IWorkbenchHelpContextIds.SHOW_VIEW_OTHER_ACTION);
// indicate that a show views submenu has been created
((WorkbenchWindow) window)
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ToggleEditorsVisibilityAction.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ToggleEditorsVisibilityAction.java
index f9d7f2bd43..0a7482be94 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ToggleEditorsVisibilityAction.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ToggleEditorsVisibilityAction.java
@@ -61,9 +61,8 @@ public class ToggleEditorsVisibilityAction extends PerspectiveAction implements
setActionDefinitionId("org.eclipse.ui.window.hideShowEditors"); //$NON-NLS-1$
// @issue missing action id
setToolTipText(WorkbenchMessages.get().ToggleEditor_toolTip);
-// RAP [rh] IWorkbench#getHelpSystem() missing
-// window.getWorkbench().getHelpSystem().setHelp(this,
-// IWorkbenchHelpContextIds.TOGGLE_EDITORS_VISIBILITY_ACTION);
+ window.getWorkbench().getHelpSystem().setHelp(this,
+ IWorkbenchHelpContextIds.TOGGLE_EDITORS_VISIBILITY_ACTION);
window.addPerspectiveListener(this);
}
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java
index 1ba0c8d103..50132614a2 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java
@@ -56,6 +56,7 @@ import org.eclipse.ui.commands.ICommandService;
import org.eclipse.ui.contexts.IContextService;
import org.eclipse.ui.contexts.IWorkbenchContextSupport;
import org.eclipse.ui.handlers.IHandlerService;
+import org.eclipse.ui.help.IWorkbenchHelpSystem;
import org.eclipse.ui.internal.StartupThreading.StartupRunnable;
import org.eclipse.ui.internal.actions.CommandAction;
import org.eclipse.ui.internal.activities.ws.WorkbenchActivitySupport;
@@ -63,6 +64,7 @@ import org.eclipse.ui.internal.browser.WorkbenchBrowserSupport;
import org.eclipse.ui.internal.commands.*;
import org.eclipse.ui.internal.contexts.*;
import org.eclipse.ui.internal.dialogs.PropertyPageContributorManager;
+import org.eclipse.ui.internal.help.WorkbenchHelpSystem;
import org.eclipse.ui.internal.intro.IIntroRegistry;
import org.eclipse.ui.internal.intro.IntroDescriptor;
import org.eclipse.ui.internal.keys.BindingService;
@@ -2754,8 +2756,7 @@ public final class Workbench extends SessionSingletonEventManager implements IWo
serviceLocator.dispose();
workbenchActivitySupport.dispose();
-// RAP [rh] WorkbenchHelpSystem disabled
-// WorkbenchHelpSystem.disposeIfNecessary();
+ WorkbenchHelpSystem.disposeIfNecessary();
// shutdown the rest of the workbench
WorkbenchColors.shutdown();
@@ -3262,11 +3263,9 @@ public final class Workbench extends SessionSingletonEventManager implements IWo
*
* @see org.eclipse.ui.IWorkbench#getHelpSystem()
*/
- // RAP [bm]:
-// public IWorkbenchHelpSystem getHelpSystem() {
-// return WorkbenchHelpSystem.getInstance();
-// }
- // RAPEND: [bm]
+ public IWorkbenchHelpSystem getHelpSystem() {
+ return WorkbenchHelpSystem.getInstance();
+ }
/*
* (non-Javadoc)
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java
index c11ed5f271..176d5c2476 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java
@@ -909,10 +909,9 @@ public class WorkbenchWindow extends ApplicationWindow implements
shell.setText(TextProcessor.process(title, TEXT_DELIMITERS));
}
-// RAP [rh] IWorkbench#getHelpSystem() not implemented
-// final IWorkbench workbench = getWorkbench();
-// workbench.getHelpSystem().setHelp(shell,
-// IWorkbenchHelpContextIds.WORKBENCH_WINDOW);
+ final IWorkbench workbench = getWorkbench();
+ workbench.getHelpSystem().setHelp(shell,
+ IWorkbenchHelpContextIds.WORKBENCH_WINDOW);
// initializeDefaultServices();
final IContextService contextService = (IContextService) getWorkbench().getService(IContextService.class);
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/ClearWorkingSetAction.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/ClearWorkingSetAction.java
index 9dc3decaf6..f468f334cd 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/ClearWorkingSetAction.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/ClearWorkingSetAction.java
@@ -13,7 +13,9 @@ package org.eclipse.ui.internal.actions;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.action.Action;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.WorkingSetFilterActionGroup;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.WorkbenchMessages;
/**
@@ -32,10 +34,8 @@ public class ClearWorkingSetAction extends Action {
Assert.isNotNull(actionGroup);
setToolTipText(WorkbenchMessages.get().ClearWorkingSetAction_toolTip);
setEnabled(actionGroup.getWorkingSet() != null);
- // RAP [bm]: HelpSystem
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(this,
-// IWorkbenchHelpContextIds.CLEAR_WORKING_SET_ACTION);
- // RAPEND: [bm]
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(this,
+ IWorkbenchHelpContextIds.CLEAR_WORKING_SET_ACTION);
this.actionGroup = actionGroup;
}
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/DynamicHelpAction.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/DynamicHelpAction.java
index b6d6eedc92..cc6fe5900b 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/DynamicHelpAction.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/DynamicHelpAction.java
@@ -1,104 +1,104 @@
-// RAP [rh] DynamicHelpAction: help support left aside for now
-///*******************************************************************************
-// * Copyright (c) 2005 IBM Corporation and others.
-// * All rights reserved. This program and the accompanying materials
-// * are made available under the terms of the Eclipse Public License v1.0
-// * which accompanies this distribution, and is available at
-// * http://www.eclipse.org/legal/epl-v10.html
-// *
-// * Contributors:
-// * IBM Corporation - initial API and implementation
-// *******************************************************************************/
-//package org.eclipse.ui.internal.actions;
-//
-//import org.eclipse.jface.action.Action;
-//import org.eclipse.swt.custom.BusyIndicator;
-//import org.eclipse.ui.IWorkbenchPreferenceConstants;
-//import org.eclipse.ui.IWorkbenchWindow;
-//import org.eclipse.ui.PlatformUI;
-//import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
-//import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
-//import org.eclipse.ui.internal.WorkbenchMessages;
-//import org.eclipse.ui.internal.util.PrefUtil;
-//
-///**
-// * Action to open the dynamic help.
-// */
-//public class DynamicHelpAction extends Action implements IWorkbenchAction {
-// /**
-// * The workbench window; or <code>null</code> if this action has been
-// * <code>dispose</code>d.
-// */
-// private IWorkbenchWindow workbenchWindow;
-//
-// /**
-// * Zero-arg constructor to allow cheat sheets to reuse this action.
-// */
-// public DynamicHelpAction() {
-// this(PlatformUI.getWorkbench().getActiveWorkbenchWindow());
-// }
-//
-// /**
-// * Constructor for use by ActionFactory.
-// *
-// * @param window
-// * the window
-// */
-// public DynamicHelpAction(IWorkbenchWindow window) {
-// if (window == null) {
-// throw new IllegalArgumentException();
-// }
-// this.workbenchWindow = window;
-// setActionDefinitionId("org.eclipse.ui.help.dynamicHelp"); //$NON-NLS-1$
-//
-// // support for allowing a product to override the text for the action
-// String overrideText = PrefUtil.getAPIPreferenceStore().getString(
-// IWorkbenchPreferenceConstants.DYNAMIC_HELP_ACTION_TEXT);
-// if ("".equals(overrideText)) { //$NON-NLS-1$
-// setText(appendAccelerator(WorkbenchMessages.DynamicHelpAction_text));
-// setToolTipText(WorkbenchMessages.DynamicHelpAction_toolTip);
-// } else {
-// setText(appendAccelerator(overrideText));
-// setToolTipText(Action.removeMnemonics(overrideText));
-// }
-// window.getWorkbench().getHelpSystem().setHelp(this,
-// IWorkbenchHelpContextIds.DYNAMIC_HELP_ACTION);
-// }
-//
-// private String appendAccelerator(String text) {
-// // We know that on Windows context help key is F1
-// // and cannot be changed by the user.
-// //
-// // Commented out due to the problem described in
-// // Bugzilla bug #95057
-//
-// //if (Platform.getWS().equals(Platform.WS_WIN32))
-// // return text + "\t" + KeyStroke.getInstance(SWT.F1).format(); //$NON-NLS-1$
-// return text;
-// }
-//
-// /*
-// * (non-Javadoc) Method declared on IAction.
-// */
-// public void run() {
-// if (workbenchWindow == null) {
-// // action has been disposed
-// return;
-// }
-// // This may take a while, so use the busy indicator
-// BusyIndicator.showWhile(null, new Runnable() {
-// public void run() {
-// workbenchWindow.getWorkbench().getHelpSystem()
-// .displayDynamicHelp();
-// }
-// });
-// }
-//
-// /*
-// * (non-Javadoc) Method declared on ActionFactory.IWorkbenchAction.
-// */
-// public void dispose() {
-// workbenchWindow = null;
-// }
-//
-//}
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.actions;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.ui.IWorkbenchPreferenceConstants;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.internal.WorkbenchMessages;
+import org.eclipse.ui.internal.util.PrefUtil;
+
+/**
+ * Action to open the dynamic help.
+ * @since 1.3
+ */
+public class DynamicHelpAction extends Action implements IWorkbenchAction {
+ /**
+ * The workbench window; or <code>null</code> if this action has been
+ * <code>dispose</code>d.
+ */
+ private IWorkbenchWindow workbenchWindow;
+
+ /**
+ * Zero-arg constructor to allow cheat sheets to reuse this action.
+ */
+ public DynamicHelpAction() {
+ this(PlatformUI.getWorkbench().getActiveWorkbenchWindow());
+ }
+
+ /**
+ * Constructor for use by ActionFactory.
+ *
+ * @param window
+ * the window
+ */
+ public DynamicHelpAction(IWorkbenchWindow window) {
+ if (window == null) {
+ throw new IllegalArgumentException();
+ }
+ this.workbenchWindow = window;
+ setActionDefinitionId("org.eclipse.ui.help.dynamicHelp"); //$NON-NLS-1$
+
+ // support for allowing a product to override the text for the action
+ String overrideText = PrefUtil.getAPIPreferenceStore().getString(
+ IWorkbenchPreferenceConstants.DYNAMIC_HELP_ACTION_TEXT);
+ if ("".equals(overrideText)) { //$NON-NLS-1$
+ setText(appendAccelerator(WorkbenchMessages.get().DynamicHelpAction_text));
+ setToolTipText(WorkbenchMessages.get().DynamicHelpAction_toolTip);
+ } else {
+ setText(appendAccelerator(overrideText));
+ setToolTipText(Action.removeMnemonics(overrideText));
+ }
+ window.getWorkbench().getHelpSystem().setHelp(this,
+ IWorkbenchHelpContextIds.DYNAMIC_HELP_ACTION);
+ }
+
+ private String appendAccelerator(String text) {
+ // We know that on Windows context help key is F1
+ // and cannot be changed by the user.
+ //
+ // Commented out due to the problem described in
+ // Bugzilla bug #95057
+
+ //if (Platform.getWS().equals(Platform.WS_WIN32))
+ // return text + "\t" + KeyStroke.getInstance(SWT.F1).format(); //$NON-NLS-1$
+ return text;
+ }
+
+ /*
+ * (non-Javadoc) Method declared on IAction.
+ */
+ public void run() {
+ if (workbenchWindow == null) {
+ // action has been disposed
+ return;
+ }
+ // This may take a while, so use the busy indicator
+ BusyIndicator.showWhile(null, new Runnable() {
+ public void run() {
+ workbenchWindow.getWorkbench().getHelpSystem()
+ .displayDynamicHelp();
+ }
+ });
+ }
+
+ /*
+ * (non-Javadoc) Method declared on ActionFactory.IWorkbenchAction.
+ */
+ public void dispose() {
+ workbenchWindow = null;
+ }
+
+}
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/EditWorkingSetAction.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/EditWorkingSetAction.java
index 7d60bfce5d..9f125ef275 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/EditWorkingSetAction.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/EditWorkingSetAction.java
@@ -22,6 +22,7 @@ import org.eclipse.ui.IWorkingSetManager;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.WorkingSetFilterActionGroup;
import org.eclipse.ui.dialogs.IWorkingSetEditWizard;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.WorkbenchMessages;
/**
@@ -46,11 +47,8 @@ public class EditWorkingSetAction extends Action {
this.shell = shell;
this.actionGroup = actionGroup;
- // RAP [bm]: HelpSystem
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(this,
-// IWorkbenchHelpContextIds.EDIT_WORKING_SET_ACTION);
- // RAPEND: [bm]
-
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(this,
+ IWorkbenchHelpContextIds.EDIT_WORKING_SET_ACTION);
}
/**
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/HelpContentsAction.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/HelpContentsAction.java
index e5fa51b2b8..504b921bac 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/HelpContentsAction.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/HelpContentsAction.java
@@ -1,94 +1,93 @@
-// RAP [rh] HelpContentsAction: help support left aside for now
-///*******************************************************************************
-// * Copyright (c) 2004, 2005 IBM Corporation and others.
-// * All rights reserved. This program and the accompanying materials
-// * are made available under the terms of the Eclipse Public License v1.0
-// * which accompanies this distribution, and is available at
-// * http://www.eclipse.org/legal/epl-v10.html
-// *
-// * Contributors:
-// * IBM Corporation - initial API and implementation
-// *******************************************************************************/
-//package org.eclipse.ui.internal.actions;
-//
-//import org.eclipse.jface.action.Action;
-//import org.eclipse.swt.custom.BusyIndicator;
-//import org.eclipse.ui.IWorkbenchPreferenceConstants;
-//import org.eclipse.ui.IWorkbenchWindow;
-//import org.eclipse.ui.PlatformUI;
-//import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
-//import org.eclipse.ui.internal.IWorkbenchGraphicConstants;
-//import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
-//import org.eclipse.ui.internal.WorkbenchImages;
-//import org.eclipse.ui.internal.WorkbenchMessages;
-//import org.eclipse.ui.internal.util.PrefUtil;
-//
-///**
-// * Action to open the help contents.
-// */
-//public class HelpContentsAction extends Action implements IWorkbenchAction {
-// /**
-// * The workbench window; or <code>null</code> if this
-// * action has been <code>dispose</code>d.
-// */
-// private IWorkbenchWindow workbenchWindow;
-//
-// /**
-// * Zero-arg constructor to allow cheat sheets to reuse this action.
-// */
-// public HelpContentsAction() {
-// this(PlatformUI.getWorkbench().getActiveWorkbenchWindow());
-// }
-//
-// /**
-// * Constructor for use by ActionFactory.
-// *
-// * @param window the window
-// */
-// public HelpContentsAction(IWorkbenchWindow window) {
-// if (window == null) {
-// throw new IllegalArgumentException();
-// }
-// this.workbenchWindow = window;
-// setActionDefinitionId("org.eclipse.ui.help.helpContents"); //$NON-NLS-1$
-//
-// // support for allowing a product to override the text for the action
-// String overrideText = PrefUtil.getAPIPreferenceStore().getString(
-// IWorkbenchPreferenceConstants.HELP_CONTENTS_ACTION_TEXT);
-// if ("".equals(overrideText)) { //$NON-NLS-1$
-// setText(WorkbenchMessages.HelpContentsAction_text);
-// setToolTipText(WorkbenchMessages.HelpContentsAction_toolTip);
-// } else {
-// setText(overrideText);
-// setToolTipText(Action.removeMnemonics(overrideText));
-// }
-// setImageDescriptor(WorkbenchImages
-// .getImageDescriptor(IWorkbenchGraphicConstants.IMG_ETOOL_HELP_CONTENTS));
-// window.getWorkbench().getHelpSystem().setHelp(this,
-// IWorkbenchHelpContextIds.HELP_CONTENTS_ACTION);
-// }
-//
-// /* (non-Javadoc)
-// * Method declared on IAction.
-// */
-// public void run() {
-// if (workbenchWindow == null) {
-// // action has been disposed
-// return;
-// }
-// //This may take a while, so use the busy indicator
-// BusyIndicator.showWhile(null, new Runnable() {
-// public void run() {
-// workbenchWindow.getWorkbench().getHelpSystem().displayHelp();
-// }
-// });
-// }
-//
-// /* (non-Javadoc)
-// * Method declared on ActionFactory.IWorkbenchAction.
-// */
-// public void dispose() {
-// workbenchWindow = null;
-// }
-//
-//}
+/*******************************************************************************
+ * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.actions;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.ui.IWorkbenchPreferenceConstants;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
+import org.eclipse.ui.internal.IWorkbenchGraphicConstants;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.internal.WorkbenchImages;
+import org.eclipse.ui.internal.WorkbenchMessages;
+import org.eclipse.ui.internal.util.PrefUtil;
+
+/**
+ * Action to open the help contents.
+ */
+public class HelpContentsAction extends Action implements IWorkbenchAction {
+ /**
+ * The workbench window; or <code>null</code> if this
+ * action has been <code>dispose</code>d.
+ */
+ private IWorkbenchWindow workbenchWindow;
+
+ /**
+ * Zero-arg constructor to allow cheat sheets to reuse this action.
+ */
+ public HelpContentsAction() {
+ this(PlatformUI.getWorkbench().getActiveWorkbenchWindow());
+ }
+
+ /**
+ * Constructor for use by ActionFactory.
+ *
+ * @param window the window
+ */
+ public HelpContentsAction(IWorkbenchWindow window) {
+ if (window == null) {
+ throw new IllegalArgumentException();
+ }
+ this.workbenchWindow = window;
+ setActionDefinitionId("org.eclipse.ui.help.helpContents"); //$NON-NLS-1$
+
+ // support for allowing a product to override the text for the action
+ String overrideText = PrefUtil.getAPIPreferenceStore().getString(
+ IWorkbenchPreferenceConstants.HELP_CONTENTS_ACTION_TEXT);
+ if ("".equals(overrideText)) { //$NON-NLS-1$
+ setText(WorkbenchMessages.get().HelpContentsAction_text);
+ setToolTipText(WorkbenchMessages.get().HelpContentsAction_toolTip);
+ } else {
+ setText(overrideText);
+ setToolTipText(Action.removeMnemonics(overrideText));
+ }
+ setImageDescriptor(WorkbenchImages
+ .getImageDescriptor(IWorkbenchGraphicConstants.IMG_ETOOL_HELP_CONTENTS));
+ window.getWorkbench().getHelpSystem().setHelp(this,
+ IWorkbenchHelpContextIds.HELP_CONTENTS_ACTION);
+ }
+
+ /* (non-Javadoc)
+ * Method declared on IAction.
+ */
+ public void run() {
+ if (workbenchWindow == null) {
+ // action has been disposed
+ return;
+ }
+ //This may take a while, so use the busy indicator
+ BusyIndicator.showWhile(null, new Runnable() {
+ public void run() {
+ workbenchWindow.getWorkbench().getHelpSystem().displayHelp();
+ }
+ });
+ }
+
+ /* (non-Javadoc)
+ * Method declared on ActionFactory.IWorkbenchAction.
+ */
+ public void dispose() {
+ workbenchWindow = null;
+ }
+
+}
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/HelpSearchAction.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/HelpSearchAction.java
index 870cc5308c..7ce17cf790 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/HelpSearchAction.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/HelpSearchAction.java
@@ -1,94 +1,93 @@
-// RAP [rh] HelpSearchAction: help support left aside for now
-///*******************************************************************************
-// * Copyright (c) 2004, 2005 IBM Corporation and others.
-// * All rights reserved. This program and the accompanying materials
-// * are made available under the terms of the Eclipse Public License v1.0
-// * which accompanies this distribution, and is available at
-// * http://www.eclipse.org/legal/epl-v10.html
-// *
-// * Contributors:
-// * IBM Corporation - initial API and implementation
-// *******************************************************************************/
-//package org.eclipse.ui.internal.actions;
-//
-//import org.eclipse.jface.action.Action;
-//import org.eclipse.swt.custom.BusyIndicator;
-//import org.eclipse.ui.IWorkbenchPreferenceConstants;
-//import org.eclipse.ui.IWorkbenchWindow;
-//import org.eclipse.ui.PlatformUI;
-//import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
-//import org.eclipse.ui.internal.IWorkbenchGraphicConstants;
-//import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
-//import org.eclipse.ui.internal.WorkbenchImages;
-//import org.eclipse.ui.internal.WorkbenchMessages;
-//import org.eclipse.ui.internal.util.PrefUtil;
-//
-///**
-// * Action to open the help search.
-// */
-//public class HelpSearchAction extends Action implements IWorkbenchAction {
-// /**
-// * The workbench window; or <code>null</code> if this
-// * action has been <code>dispose</code>d.
-// */
-// private IWorkbenchWindow workbenchWindow;
-//
-// /**
-// * Zero-arg constructor to allow cheat sheets to reuse this action.
-// */
-// public HelpSearchAction() {
-// this(PlatformUI.getWorkbench().getActiveWorkbenchWindow());
-// }
-//
-// /**
-// * Constructor for use by ActionFactory.
-// *
-// * @param window the window
-// */
-// public HelpSearchAction(IWorkbenchWindow window) {
-// if (window == null) {
-// throw new IllegalArgumentException();
-// }
-// this.workbenchWindow = window;
-// setActionDefinitionId("org.eclipse.ui.help.helpSearch"); //$NON-NLS-1$
-//
-// // support for allowing a product to override the text for the action
-// String overrideText = PrefUtil.getAPIPreferenceStore().getString(
-// IWorkbenchPreferenceConstants.HELP_SEARCH_ACTION_TEXT);
-// if ("".equals(overrideText)) { //$NON-NLS-1$
-// setText(WorkbenchMessages.HelpSearchAction_text);
-// setToolTipText(WorkbenchMessages.HelpSearchAction_toolTip);
-// } else {
-// setText(overrideText);
-// setToolTipText(Action.removeMnemonics(overrideText));
-// }
-// setImageDescriptor(WorkbenchImages
-// .getImageDescriptor(IWorkbenchGraphicConstants.IMG_ETOOL_HELP_SEARCH));
-// window.getWorkbench().getHelpSystem().setHelp(this,
-// IWorkbenchHelpContextIds.HELP_SEARCH_ACTION);
-// }
-//
-// /* (non-Javadoc)
-// * Method declared on IAction.
-// */
-// public void run() {
-// if (workbenchWindow == null) {
-// // action has been disposed
-// return;
-// }
-// //This may take a while, so use the busy indicator
-// BusyIndicator.showWhile(null, new Runnable() {
-// public void run() {
-// workbenchWindow.getWorkbench().getHelpSystem().displaySearch();
-// }
-// });
-// }
-//
-// /* (non-Javadoc)
-// * Method declared on ActionFactory.IWorkbenchAction.
-// */
-// public void dispose() {
-// workbenchWindow = null;
-// }
-//
-//}
+/*******************************************************************************
+ * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.actions;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.ui.IWorkbenchPreferenceConstants;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
+import org.eclipse.ui.internal.IWorkbenchGraphicConstants;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.internal.WorkbenchImages;
+import org.eclipse.ui.internal.WorkbenchMessages;
+import org.eclipse.ui.internal.util.PrefUtil;
+
+/**
+ * Action to open the help search.
+ */
+public class HelpSearchAction extends Action implements IWorkbenchAction {
+ /**
+ * The workbench window; or <code>null</code> if this
+ * action has been <code>dispose</code>d.
+ */
+ private IWorkbenchWindow workbenchWindow;
+
+ /**
+ * Zero-arg constructor to allow cheat sheets to reuse this action.
+ */
+ public HelpSearchAction() {
+ this(PlatformUI.getWorkbench().getActiveWorkbenchWindow());
+ }
+
+ /**
+ * Constructor for use by ActionFactory.
+ *
+ * @param window the window
+ */
+ public HelpSearchAction(IWorkbenchWindow window) {
+ if (window == null) {
+ throw new IllegalArgumentException();
+ }
+ this.workbenchWindow = window;
+ setActionDefinitionId("org.eclipse.ui.help.helpSearch"); //$NON-NLS-1$
+
+ // support for allowing a product to override the text for the action
+ String overrideText = PrefUtil.getAPIPreferenceStore().getString(
+ IWorkbenchPreferenceConstants.HELP_SEARCH_ACTION_TEXT);
+ if ("".equals(overrideText)) { //$NON-NLS-1$
+ setText(WorkbenchMessages.get().HelpSearchAction_text);
+ setToolTipText(WorkbenchMessages.get().HelpSearchAction_toolTip);
+ } else {
+ setText(overrideText);
+ setToolTipText(Action.removeMnemonics(overrideText));
+ }
+ setImageDescriptor(WorkbenchImages
+ .getImageDescriptor(IWorkbenchGraphicConstants.IMG_ETOOL_HELP_SEARCH));
+ window.getWorkbench().getHelpSystem().setHelp(this,
+ IWorkbenchHelpContextIds.HELP_SEARCH_ACTION);
+ }
+
+ /* (non-Javadoc)
+ * Method declared on IAction.
+ */
+ public void run() {
+ if (workbenchWindow == null) {
+ // action has been disposed
+ return;
+ }
+ //This may take a while, so use the busy indicator
+ BusyIndicator.showWhile(null, new Runnable() {
+ public void run() {
+ workbenchWindow.getWorkbench().getHelpSystem().displaySearch();
+ }
+ });
+ }
+
+ /* (non-Javadoc)
+ * Method declared on ActionFactory.IWorkbenchAction.
+ */
+ public void dispose() {
+ workbenchWindow = null;
+ }
+
+}
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/HelpSearchContributionItem.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/HelpSearchContributionItem.java
index 50a1c72b2f..2e481d8ea5 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/HelpSearchContributionItem.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/HelpSearchContributionItem.java
@@ -1,76 +1,76 @@
-// RAP [rh] HelpSearchContributionItem: help support left aside for now
-///*******************************************************************************
-// * Copyright (c) 2005, 2006 IBM Corporation and others.
-// * All rights reserved. This program and the accompanying materials
-// * are made available under the terms of the Eclipse Public License v1.0
-// * which accompanies this distribution, and is available at
-// * http://www.eclipse.org/legal/epl-v10.html
-// *
-// * Contributors:
-// * IBM Corporation - initial API and implementation
-// *******************************************************************************/
-//package org.eclipse.ui.internal.actions;
-//
-//import org.eclipse.core.runtime.Assert;
-//import org.eclipse.jface.action.ControlContribution;
-//import org.eclipse.swt.SWT;
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.actions;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.action.ControlContribution;
+import org.eclipse.swt.SWT;
//import org.eclipse.swt.events.KeyAdapter;
//import org.eclipse.swt.events.KeyEvent;
-//import org.eclipse.swt.events.SelectionAdapter;
-//import org.eclipse.swt.events.SelectionEvent;
-//import org.eclipse.swt.widgets.Combo;
-//import org.eclipse.swt.widgets.Composite;
-//import org.eclipse.swt.widgets.Control;
-//import org.eclipse.ui.IWorkbenchWindow;
-//import org.eclipse.ui.internal.WorkbenchMessages;
-//import org.eclipse.ui.internal.WorkbenchPlugin;
-//
-///**
-// * This is the contribution item that is used to add a help search field to
-// * the cool bar.
-// */
-//public class HelpSearchContributionItem extends ControlContribution {
-// private static final String ID = "org.eclipse.ui.helpSearch"; //$NON-NLS-1$
-//
-// private IWorkbenchWindow window;
-//
-// private Combo combo;
-//
-// private int MAX_ITEM_COUNT = 10;
-//
-// /**
-// * Creates the contribution item.
-// *
-// * @param window the window
-// */
-// public HelpSearchContributionItem(IWorkbenchWindow window) {
-// this(window, ID);
-// }
-//
-// /**
-// * Creates the contribution item.
-// *
-// * @param window the window
-// * @param id the contribution item id
-// */
-// public HelpSearchContributionItem(IWorkbenchWindow window, String id) {
-// super(id);
-// Assert.isNotNull(window);
-// this.window = window;
-// }
-//
-// /* (non-Javadoc)
-// * @see org.eclipse.jface.action.ControlContribution#createControl(org.eclipse.swt.widgets.Composite)
-// */
-// protected Control createControl(Composite parent) {
-// combo = new Combo(parent, SWT.NONE);
-// combo.setToolTipText(WorkbenchMessages.WorkbenchWindow_searchCombo_toolTip);
-// String[] items = WorkbenchPlugin.getDefault().getDialogSettings()
-// .getArray(ID);
-// if (items != null) {
-// combo.setItems(items);
-// }
-// combo.setText(WorkbenchMessages.WorkbenchWindow_searchCombo_text);
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.internal.WorkbenchMessages;
+import org.eclipse.ui.internal.WorkbenchPlugin;
+
+/**
+ * This is the contribution item that is used to add a help search field to
+ * the cool bar.
+ */
+public class HelpSearchContributionItem extends ControlContribution {
+ private static final String ID = "org.eclipse.ui.helpSearch"; //$NON-NLS-1$
+
+ private IWorkbenchWindow window;
+
+ private Combo combo;
+
+ private int MAX_ITEM_COUNT = 10;
+
+ /**
+ * Creates the contribution item.
+ *
+ * @param window the window
+ */
+ public HelpSearchContributionItem(IWorkbenchWindow window) {
+ this(window, ID);
+ }
+
+ /**
+ * Creates the contribution item.
+ *
+ * @param window the window
+ * @param id the contribution item id
+ */
+ public HelpSearchContributionItem(IWorkbenchWindow window, String id) {
+ super(id);
+ Assert.isNotNull(window);
+ this.window = window;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.ControlContribution#createControl(org.eclipse.swt.widgets.Composite)
+ */
+ protected Control createControl(Composite parent) {
+ combo = new Combo(parent, SWT.NONE);
+ combo.setToolTipText(WorkbenchMessages.get().WorkbenchWindow_searchCombo_toolTip);
+ String[] items = WorkbenchPlugin.getDefault().getDialogSettings()
+ .getArray(ID);
+ if (items != null) {
+ combo.setItems(items);
+ }
+ combo.setText(WorkbenchMessages.get().WorkbenchWindow_searchCombo_text);
+ // RAP [bm]: replaced keylistener with defaultSelected event
// combo.addKeyListener(new KeyAdapter() {
// public void keyReleased(KeyEvent e) {
// if (e.character == SWT.CR) {
@@ -78,47 +78,53 @@
// }
// }
// });
-// combo.addSelectionListener(new SelectionAdapter() {
-// public void widgetSelected(SelectionEvent e) {
-// int index = combo.getSelectionIndex();
-// if (index != -1) {
-// doSearch(combo.getItem(index), false);
-// }
-// }
-// });
-// return combo;
-// }
-//
-// /* (non-Javadoc)
-// * @see org.eclipse.jface.action.ControlContribution#computeWidth(org.eclipse.swt.widgets.Control)
-// */
-// protected int computeWidth(Control control) {
-// return control.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x;
-// }
-//
-// private void doSearch(String phrase, boolean updateList) {
-// if (phrase.length() == 0) {
-// window.getWorkbench().getHelpSystem().displaySearch();
-// return;
-// }
-// if (updateList) {
-// boolean exists = false;
-// for (int i = 0; i < combo.getItemCount(); i++) {
-// String item = combo.getItem(i);
-// if (item.equalsIgnoreCase(phrase)) {
-// exists = true;
-// break;
-// }
-// }
-// if (!exists) {
-// combo.add(phrase, 0);
-// if (combo.getItemCount() > MAX_ITEM_COUNT) {
-// combo.remove(combo.getItemCount() - 1);
-// }
-// WorkbenchPlugin.getDefault().getDialogSettings().put(ID,
-// combo.getItems());
-// }
-// }
-// window.getWorkbench().getHelpSystem().search(phrase);
-// }
-//}
+ // RAPEND: [bm]
+ combo.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ int index = combo.getSelectionIndex();
+ if (index != -1) {
+ doSearch(combo.getItem(index), false);
+ }
+ }
+ // RAP [bm]: replacement for key listener
+ public void widgetDefaultSelected(SelectionEvent e) {
+ doSearch(combo.getText(), true);
+ }
+ // RAPEND: [bm]
+ });
+ return combo;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.ControlContribution#computeWidth(org.eclipse.swt.widgets.Control)
+ */
+ protected int computeWidth(Control control) {
+ return control.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x;
+ }
+
+ private void doSearch(String phrase, boolean updateList) {
+ if (phrase.length() == 0) {
+ window.getWorkbench().getHelpSystem().displaySearch();
+ return;
+ }
+ if (updateList) {
+ boolean exists = false;
+ for (int i = 0; i < combo.getItemCount(); i++) {
+ String item = combo.getItem(i);
+ if (item.equalsIgnoreCase(phrase)) {
+ exists = true;
+ break;
+ }
+ }
+ if (!exists) {
+ combo.add(phrase, 0);
+ if (combo.getItemCount() > MAX_ITEM_COUNT) {
+ combo.remove(combo.getItemCount() - 1);
+ }
+ WorkbenchPlugin.getDefault().getDialogSettings().put(ID,
+ combo.getItems());
+ }
+ }
+ window.getWorkbench().getHelpSystem().search(phrase);
+ }
+}
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/ModifyWorkingSetDelegate.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/ModifyWorkingSetDelegate.java
index 38182fd23d..c7b8bf2c81 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/ModifyWorkingSetDelegate.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/ModifyWorkingSetDelegate.java
@@ -43,6 +43,7 @@ import org.eclipse.ui.IWorkingSetManager;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.QuickMenuCreator;
import org.eclipse.ui.dialogs.IWorkingSetNewWizard;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.WorkbenchMessages;
import org.eclipse.ui.internal.WorkbenchPlugin;
@@ -72,10 +73,8 @@ public class ModifyWorkingSetDelegate extends
.getDisplay().getActiveShell(), wizard);
dialog.create();
- // RAP [bm]: HelpSystem
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(),
-// IWorkbenchHelpContextIds.WORKING_SET_NEW_WIZARD);
- // RAPEND: [bm]
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(),
+ IWorkbenchHelpContextIds.WORKING_SET_NEW_WIZARD);
if (dialog.open() == Window.OK) {
IWorkingSet workingSet = wizard.getSelection();
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/NewWizardShortcutAction.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/NewWizardShortcutAction.java
index fb64d4046b..28c2ae0f89 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/NewWizardShortcutAction.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/NewWizardShortcutAction.java
@@ -26,6 +26,7 @@ import org.eclipse.ui.IPluginContribution;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.actions.ActionFactory;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.LegacyResourceSupport;
import org.eclipse.ui.internal.WorkbenchMessages;
import org.eclipse.ui.internal.util.Util;
@@ -123,10 +124,8 @@ public class NewWizardShortcutAction extends Action implements
dialog.getShell().setSize(
Math.max(SIZING_WIZARD_WIDTH, defaultSize.x),
Math.max(SIZING_WIZARD_HEIGHT, defaultSize.y));
- // RAP [bm]:
-// window.getWorkbench().getHelpSystem().setHelp(dialog.getShell(),
-// IWorkbenchHelpContextIds.NEW_WIZARD_SHORTCUT);
- // RAPEND: [bm]
+ window.getWorkbench().getHelpSystem().setHelp(dialog.getShell(),
+ IWorkbenchHelpContextIds.NEW_WIZARD_SHORTCUT);
// if the wizard can finish early and doesn't have any pages, just finish it.
if (wizardElement.canFinishEarly() && !wizardElement.hasPages()) {
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/SelectWorkingSetAction.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/SelectWorkingSetAction.java
index c2fff4ff3c..2a9f1bb905 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/SelectWorkingSetAction.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/SelectWorkingSetAction.java
@@ -20,6 +20,7 @@ import org.eclipse.ui.IWorkingSetManager;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.WorkingSetFilterActionGroup;
import org.eclipse.ui.dialogs.IWorkingSetSelectionDialog;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.WorkbenchMessages;
/**
@@ -45,10 +46,8 @@ public class SelectWorkingSetAction extends Action {
this.shell = shell;
this.actionGroup = actionGroup;
- // RAP [bm]: HelpSystem
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(this,
-// IWorkbenchHelpContextIds.SELECT_WORKING_SET_ACTION);
- // RAPEND: [bm]
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(this,
+ IWorkbenchHelpContextIds.SELECT_WORKING_SET_ACTION);
}
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/SlaveCommandService.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/SlaveCommandService.java
index 19ac8a492f..6888020970 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/SlaveCommandService.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/SlaveCommandService.java
@@ -20,6 +20,7 @@ import java.util.Set;
import org.eclipse.core.commands.Category;
import org.eclipse.core.commands.Command;
import org.eclipse.core.commands.IExecutionListener;
+import org.eclipse.core.commands.IHandler;
import org.eclipse.core.commands.ParameterType;
import org.eclipse.core.commands.ParameterizedCommand;
import org.eclipse.core.commands.SerializationException;
@@ -247,11 +248,10 @@ public class SlaveCommandService implements ICommandService {
fParentService.removeExecutionListener(listener);
}
- // RAP [bm]: Help
-// public final void setHelpContextId(final IHandler handler,
-// final String helpContextId) {
-// fParentService.setHelpContextId(handler, helpContextId);
-// }
+ public final void setHelpContextId(final IHandler handler,
+ final String helpContextId) {
+ fParentService.setHelpContextId(handler, helpContextId);
+ }
/*
* (non-Javadoc)
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/AbstractWorkingSetDialog.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/AbstractWorkingSetDialog.java
index a1f07e4e20..66a107f056 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/AbstractWorkingSetDialog.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/AbstractWorkingSetDialog.java
@@ -38,7 +38,7 @@ import org.eclipse.ui.dialogs.IWorkingSetEditWizard;
import org.eclipse.ui.dialogs.IWorkingSetNewWizard;
import org.eclipse.ui.dialogs.IWorkingSetSelectionDialog;
import org.eclipse.ui.dialogs.SelectionDialog;
-//import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.WorkbenchMessages;
import org.eclipse.ui.internal.WorkbenchPlugin;
import org.eclipse.ui.internal.WorkingSet;
@@ -228,9 +228,8 @@ public abstract class AbstractWorkingSetDialog extends SelectionDialog
editedWorkingSets.remove(editWorkingSet);
}
dialog.create();
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(),
-// IWorkbenchHelpContextIds.WORKING_SET_EDIT_WIZARD);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(),
+ IWorkbenchHelpContextIds.WORKING_SET_EDIT_WIZARD);
if (dialog.open() == Window.OK) {
editWorkingSet = wizard.getSelection();
availableWorkingSetsChanged();
@@ -259,9 +258,8 @@ public abstract class AbstractWorkingSetDialog extends SelectionDialog
WizardDialog dialog = new WizardDialog(getShell(), wizard);
dialog.create();
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(),
-// IWorkbenchHelpContextIds.WORKING_SET_NEW_WIZARD);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(),
+ IWorkbenchHelpContextIds.WORKING_SET_NEW_WIZARD);
if (dialog.open() == Window.OK) {
IWorkingSet workingSet = wizard.getSelection();
manager.addWorkingSet(workingSet);
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/CustomizePerspectiveDialog.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/CustomizePerspectiveDialog.java
index 7cc51a1970..55ef3b4ad8 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/CustomizePerspectiveDialog.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/CustomizePerspectiveDialog.java
@@ -86,7 +86,7 @@ import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
import org.eclipse.ui.internal.ActionSetActionBars;
import org.eclipse.ui.internal.ActionSetContributionItem;
import org.eclipse.ui.internal.ActionSetMenuManager;
-//import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.Perspective;
import org.eclipse.ui.internal.PluginActionContributionItem;
import org.eclipse.ui.internal.PluginActionCoolBarContributionItem;
@@ -1032,9 +1032,8 @@ public class CustomizePerspectiveDialog extends TrayDialog {
title = NLS.bind(WorkbenchMessages.get().ActionSetSelection_customize,title);
shell.setText(title);
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// window.getWorkbench().getHelpSystem().setHelp(shell,
-// IWorkbenchHelpContextIds.ACTION_SET_SELECTION_DIALOG);
+ window.getWorkbench().getHelpSystem().setHelp(shell,
+ IWorkbenchHelpContextIds.ACTION_SET_SELECTION_DIALOG);
}
boolean containsActionSet(MenuManager mgr, String actionSetId) {
@@ -1174,7 +1173,7 @@ public class CustomizePerspectiveDialog extends TrayDialog {
sashComposite.setWeights(new int[] { 30, 70 });
// Use F2... label
- // RAP [bm]:
+ // RAP [bm]: text reads "Use F2 to display the description for a selected command item."
// label = new Label(actionSetsComposite, SWT.WRAP);
// label.setText(WorkbenchMessages.get().ActionSetSelection_selectActionSetsHelp);
// label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/DecoratorsPreferencePage.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/DecoratorsPreferencePage.java
index a26f7ceee7..c66dfa2c68 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/DecoratorsPreferencePage.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/DecoratorsPreferencePage.java
@@ -37,8 +37,8 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
-//import org.eclipse.ui.PlatformUI;
-//import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.WorkbenchMessages;
import org.eclipse.ui.internal.WorkbenchPlugin;
import org.eclipse.ui.internal.decorators.DecoratorDefinition;
@@ -62,9 +62,8 @@ public class DecoratorsPreferencePage extends PreferencePage implements
Font font = parent.getFont();
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
-// IWorkbenchHelpContextIds.DECORATORS_PREFERENCE_PAGE);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
+ IWorkbenchHelpContextIds.DECORATORS_PREFERENCE_PAGE);
Composite mainComposite = new Composite(parent, SWT.NONE);
mainComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/EditorsPreferencePage.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/EditorsPreferencePage.java
index 07fac80532..95c72520b8 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/EditorsPreferencePage.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/EditorsPreferencePage.java
@@ -32,10 +32,10 @@ import org.eclipse.swt.widgets.Group;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferenceConstants;
import org.eclipse.ui.IWorkbenchPreferencePage;
-//import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.internal.EditorHistory;
import org.eclipse.ui.internal.IPreferenceConstants;
-//import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.WorkbenchMessages;
import org.eclipse.ui.internal.WorkbenchPlugin;
import org.eclipse.ui.internal.tweaklets.TabBehaviour;
@@ -107,9 +107,8 @@ public class EditorsPreferencePage extends PreferencePage implements
protected void setHelpContext(Composite parent) {
// @issue the IDE subclasses this, but should provide its own help
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
-// IWorkbenchHelpContextIds.WORKBENCH_EDITOR_PREFERENCE_PAGE);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
+ IWorkbenchHelpContextIds.WORKBENCH_EDITOR_PREFERENCE_PAGE);
}
protected void createSpace(Composite parent) {
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ExportPage.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ExportPage.java
index 37b26de36a..9d4c4ed332 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ExportPage.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ExportPage.java
@@ -18,7 +18,7 @@ import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.activities.ITriggerPoint;
-//import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.WorkbenchMessages;
import org.eclipse.ui.internal.WorkbenchPlugin;
import org.eclipse.ui.internal.activities.ws.WorkbenchTriggerPoints;
@@ -49,9 +49,8 @@ public class ExportPage extends ImportExportPage {
}
protected void initialize() {
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// workbench.getHelpSystem().setHelp(getControl(),
-// IWorkbenchHelpContextIds.EXPORT_WIZARD_SELECTION_WIZARD_PAGE);
+ workbench.getHelpSystem().setHelp(getControl(),
+ IWorkbenchHelpContextIds.EXPORT_WIZARD_SELECTION_WIZARD_PAGE);
}
protected Composite createTreeViewer(Composite parent) {
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ExportWizard.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ExportWizard.java
index b7bbfc9366..bfd1bea7d4 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ExportWizard.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ExportWizard.java
@@ -19,7 +19,7 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchWizard;
import org.eclipse.ui.internal.IWorkbenchGraphicConstants;
-//import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.WorkbenchImages;
import org.eclipse.ui.internal.WorkbenchMessages;
import org.eclipse.ui.internal.WorkbenchPlugin;
@@ -46,9 +46,8 @@ public class ExportWizard extends Wizard {
public void createControl(Composite parent) {
super.createControl(parent);
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// workbench.getHelpSystem().setHelp(getControl(),
-// IWorkbenchHelpContextIds.EXPORT_WIZARD_SELECTION_WIZARD_PAGE);
+ workbench.getHelpSystem().setHelp(getControl(),
+ IWorkbenchHelpContextIds.EXPORT_WIZARD_SELECTION_WIZARD_PAGE);
}
protected IWizardNode createWizardNode(WorkbenchWizardElement element) {
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ImportPage.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ImportPage.java
index 7c52cc84c4..71cfc679ef 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ImportPage.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ImportPage.java
@@ -18,7 +18,7 @@ import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.activities.ITriggerPoint;
-//import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.WorkbenchMessages;
import org.eclipse.ui.internal.WorkbenchPlugin;
import org.eclipse.ui.internal.activities.ws.WorkbenchTriggerPoints;
@@ -50,10 +50,9 @@ public class ImportPage extends ImportExportPage {
}
protected void initialize() {
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// workbench.getHelpSystem().setHelp(
-// getControl(),
-// IWorkbenchHelpContextIds.IMPORT_WIZARD_SELECTION_WIZARD_PAGE);
+ workbench.getHelpSystem().setHelp(
+ getControl(),
+ IWorkbenchHelpContextIds.IMPORT_WIZARD_SELECTION_WIZARD_PAGE);
}
protected Composite createTreeViewer(Composite parent) {
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ImportWizard.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ImportWizard.java
index fdb7c25b1e..e685e14527 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ImportWizard.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ImportWizard.java
@@ -19,7 +19,7 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchWizard;
import org.eclipse.ui.internal.IWorkbenchGraphicConstants;
-//import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.WorkbenchImages;
import org.eclipse.ui.internal.WorkbenchMessages;
import org.eclipse.ui.internal.WorkbenchPlugin;
@@ -44,12 +44,11 @@ public class ImportWizard extends Wizard {
public void createControl(Composite parent) {
super.createControl(parent);
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// getWorkbench()
-// .getHelpSystem()
-// .setHelp(
-// getControl(),
-// IWorkbenchHelpContextIds.IMPORT_WIZARD_SELECTION_WIZARD_PAGE);
+ getWorkbench()
+ .getHelpSystem()
+ .setHelp(
+ getControl(),
+ IWorkbenchHelpContextIds.IMPORT_WIZARD_SELECTION_WIZARD_PAGE);
}
public IWizardNode createWizardNode(WorkbenchWizardElement element) {
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/NewWizardSelectionPage.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/NewWizardSelectionPage.java
index 24d40c8682..c5f945f378 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/NewWizardSelectionPage.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/NewWizardSelectionPage.java
@@ -16,7 +16,7 @@ import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.IWorkbench;
-//import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.WorkbenchMessages;
import org.eclipse.ui.internal.activities.ws.WorkbenchTriggerPoints;
import org.eclipse.ui.wizards.IWizardCategory;
@@ -86,9 +86,8 @@ class NewWizardSelectionPage extends WorkbenchWizardSelectionPage {
newResourcePage.setDialogSettings(settings);
Control control = newResourcePage.createControl(parent);
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// getWorkbench().getHelpSystem().setHelp(control,
-// IWorkbenchHelpContextIds.NEW_WIZARD_SELECTION_WIZARD_PAGE);
+ getWorkbench().getHelpSystem().setHelp(control,
+ IWorkbenchHelpContextIds.NEW_WIZARD_SELECTION_WIZARD_PAGE);
setControl(control);
}
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PerspectivesPreferencePage.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PerspectivesPreferencePage.java
index d6aaf5c0ab..0f68c4f23c 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PerspectivesPreferencePage.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PerspectivesPreferencePage.java
@@ -43,9 +43,9 @@ import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPreferenceConstants;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.IWorkbenchWindow;
-//import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.internal.IPreferenceConstants;
-//import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.WorkbenchMessages;
import org.eclipse.ui.internal.WorkbenchPage;
import org.eclipse.ui.internal.WorkbenchPlugin;
@@ -126,9 +126,8 @@ public class PerspectivesPreferencePage extends PreferencePage implements
protected Control createContents(Composite parent) {
// @issue if the product subclasses this page, then it should provide
// the help content
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
-// IWorkbenchHelpContextIds.PERSPECTIVES_PREFERENCE_PAGE);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
+ IWorkbenchHelpContextIds.PERSPECTIVES_PREFERENCE_PAGE);
Composite composite = createComposite(parent);
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PropertyDialog.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PropertyDialog.java
index ca5706bd59..fc3f5adf9a 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PropertyDialog.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PropertyDialog.java
@@ -18,8 +18,8 @@ import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.widgets.Shell;
-//import org.eclipse.ui.PlatformUI;
-//import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.WorkbenchMessages;
import org.eclipse.ui.internal.util.Util;
import org.eclipse.ui.model.IContributionService;
@@ -82,10 +82,9 @@ public class PropertyDialog extends FilteredPreferenceDialog {
propertyDialog.create();
propertyDialog.getShell().setText(title);
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(
-// propertyDialog.getShell(),
-// IWorkbenchHelpContextIds.PROPERTY_DIALOG);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(
+ propertyDialog.getShell(),
+ IWorkbenchHelpContextIds.PROPERTY_DIALOG);
return propertyDialog;
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/SavePerspectiveDialog.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/SavePerspectiveDialog.java
index 21af009ec2..1e7c65b0f2 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/SavePerspectiveDialog.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/SavePerspectiveDialog.java
@@ -31,8 +31,8 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IPerspectiveDescriptor;
-//import org.eclipse.ui.PlatformUI;
-//import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.WorkbenchMessages;
import org.eclipse.ui.internal.activities.ws.ActivityViewerFilter;
import org.eclipse.ui.internal.registry.PerspectiveRegistry;
@@ -85,9 +85,8 @@ public class SavePerspectiveDialog extends org.eclipse.jface.dialogs.Dialog
super.configureShell(shell);
shell
.setText(WorkbenchMessages.get().SavePerspective_shellTitle);
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(shell,
-// IWorkbenchHelpContextIds.SAVE_PERSPECTIVE_DIALOG);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(shell,
+ IWorkbenchHelpContextIds.SAVE_PERSPECTIVE_DIALOG);
}
/**
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/SelectPerspectiveDialog.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/SelectPerspectiveDialog.java
index 595aecbc99..599941adc1 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/SelectPerspectiveDialog.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/SelectPerspectiveDialog.java
@@ -35,7 +35,7 @@ import org.eclipse.ui.IPerspectiveRegistry;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.activities.ITriggerPoint;
import org.eclipse.ui.activities.WorkbenchActivityHelper;
-//import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.WorkbenchMessages;
import org.eclipse.ui.internal.activities.ws.ActivityMessages;
import org.eclipse.ui.internal.activities.ws.ActivityViewerFilter;
@@ -94,9 +94,8 @@ public class SelectPerspectiveDialog extends Dialog implements
protected void configureShell(Shell shell) {
super.configureShell(shell);
shell.setText(WorkbenchMessages.get().SelectPerspective_shellTitle);
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(shell,
-// IWorkbenchHelpContextIds.SELECT_PERSPECTIVE_DIALOG);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(shell,
+ IWorkbenchHelpContextIds.SELECT_PERSPECTIVE_DIALOG);
}
/**
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ShowViewDialog.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ShowViewDialog.java
index e5faedcd20..5b7009bf10 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ShowViewDialog.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ShowViewDialog.java
@@ -36,8 +36,10 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.FilteredTree;
import org.eclipse.ui.dialogs.PatternFilter;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.WorkbenchMessages;
import org.eclipse.ui.internal.WorkbenchPlugin;
import org.eclipse.ui.internal.registry.ViewRegistry;
@@ -113,9 +115,8 @@ public class ShowViewDialog extends Dialog implements
protected void configureShell(Shell shell) {
super.configureShell(shell);
shell.setText(WorkbenchMessages.get().ShowView_shellTitle);
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(shell,
-// IWorkbenchHelpContextIds.SHOW_VIEW_DIALOG);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(shell,
+ IWorkbenchHelpContextIds.SHOW_VIEW_DIALOG);
}
/**
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/StartupPreferencePage.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/StartupPreferencePage.java
index 09668c7fe3..94ece9934c 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/StartupPreferencePage.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/StartupPreferencePage.java
@@ -26,9 +26,9 @@ import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
-//import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.internal.IPreferenceConstants;
-//import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.Workbench;
import org.eclipse.ui.internal.WorkbenchMessages;
import org.eclipse.ui.internal.util.PrefUtil;
@@ -47,9 +47,8 @@ public class StartupPreferencePage extends PreferencePage implements
* @see PreferencePage#createContents(Composite)
*/
protected Control createContents(Composite parent) {
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
-// IWorkbenchHelpContextIds.STARTUP_PREFERENCE_PAGE);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
+ IWorkbenchHelpContextIds.STARTUP_PREFERENCE_PAGE);
Composite composite = createComposite(parent);
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchEditorsDialog.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchEditorsDialog.java
index e9c334f512..c6574f2007 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchEditorsDialog.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchEditorsDialog.java
@@ -52,9 +52,9 @@ import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
-//import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.SelectionDialog;
-//import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.WorkbenchImages;
import org.eclipse.ui.internal.WorkbenchMessages;
import org.eclipse.ui.internal.WorkbenchPage;
@@ -165,9 +165,8 @@ public class WorkbenchEditorsDialog extends SelectionDialog {
*/
protected void configureShell(Shell newShell) {
super.configureShell(newShell);
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(newShell,
-// IWorkbenchHelpContextIds.WORKBENCH_EDITORS_DIALOG);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(newShell,
+ IWorkbenchHelpContextIds.WORKBENCH_EDITORS_DIALOG);
}
/*
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchPreferenceDialog.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchPreferenceDialog.java
index c92214b0f7..03e411a526 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchPreferenceDialog.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchPreferenceDialog.java
@@ -20,7 +20,7 @@ import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.activities.WorkbenchActivityHelper;
-//import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.WorkbenchPlugin;
/**
@@ -104,10 +104,9 @@ public class WorkbenchPreferenceDialog extends FilteredPreferenceDialog {
dialog.setSelectedNode(preferencePageId);
}
dialog.create();
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(
-// dialog.getShell(),
-// IWorkbenchHelpContextIds.PREFERENCE_DIALOG);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(
+ dialog.getShell(),
+ IWorkbenchHelpContextIds.PREFERENCE_DIALOG);
} else {
/*
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchPreferencePage.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchPreferencePage.java
index a6b5ef931e..a0f2741466 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchPreferencePage.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchPreferencePage.java
@@ -28,7 +28,9 @@ import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.internal.IPreferenceConstants;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.WorkbenchMessages;
import org.eclipse.ui.internal.WorkbenchPlugin;
import org.eclipse.ui.internal.util.PrefUtil;
@@ -68,9 +70,8 @@ public class WorkbenchPreferencePage extends PreferencePage implements
// @issue if the product subclasses this page, then it should provide
// the help content
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
-// IWorkbenchHelpContextIds.WORKBENCH_PREFERENCE_PAGE);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
+ IWorkbenchHelpContextIds.WORKBENCH_PREFERENCE_PAGE);
Composite composite = createComposite(parent);
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkingSetSelectionDialog.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkingSetSelectionDialog.java
index b781fced7c..7534167fe4 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkingSetSelectionDialog.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkingSetSelectionDialog.java
@@ -48,7 +48,7 @@ import org.eclipse.ui.IWorkingSetManager;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.IWorkingSetSelectionDialog;
import org.eclipse.ui.internal.AggregateWorkingSet;
-//import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.WorkbenchMessages;
import org.eclipse.ui.internal.WorkbenchPlugin;
import org.eclipse.ui.internal.util.Util;
@@ -141,9 +141,8 @@ public class WorkingSetSelectionDialog extends AbstractWorkingSetDialog {
*/
protected void configureShell(Shell shell) {
super.configureShell(shell);
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(shell,
-// IWorkbenchHelpContextIds.WORKING_SET_SELECTION_DIALOG);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(shell,
+ IWorkbenchHelpContextIds.WORKING_SET_SELECTION_DIALOG);
}
/**
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkingSetTypePage.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkingSetTypePage.java
index fab8b6c0b2..5098ad66b4 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkingSetTypePage.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkingSetTypePage.java
@@ -33,9 +33,9 @@ import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
-//import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.internal.IWorkbenchGraphicConstants;
-//import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.WorkbenchImages;
import org.eclipse.ui.internal.WorkbenchMessages;
import org.eclipse.ui.internal.WorkbenchPlugin;
@@ -93,9 +93,8 @@ public class WorkingSetTypePage extends WizardPage {
composite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
setControl(composite);
-// RAP [rh] IWorkbench#getHelpSystem not implemented
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(composite,
-// IWorkbenchHelpContextIds.WORKING_SET_TYPE_PAGE);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(composite,
+ IWorkbenchHelpContextIds.WORKING_SET_TYPE_PAGE);
Label typesLabel = new Label(composite, SWT.NONE);
typesLabel.setText(WorkbenchMessages.get().WorkingSetTypePage_typesLabel);
GridData data = new GridData(GridData.FILL_HORIZONTAL);
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/DisplayHelpHandler.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/DisplayHelpHandler.java
index af99b80eb7..a98f6c9f44 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/DisplayHelpHandler.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/DisplayHelpHandler.java
@@ -1,43 +1,42 @@
-// RAP [bm]: Help System
-///*******************************************************************************
-// * Copyright (c) 2005, 2006 IBM Corporation and others.
-// * All rights reserved. This program and the accompanying materials
-// * are made available under the terms of the Eclipse Public License v1.0
-// * which accompanies this distribution, and is available at
-// * http://www.eclipse.org/legal/epl-v10.html
-// *
-// * Contributors:
-// * IBM Corporation - initial API and implementation
-// *******************************************************************************/
-//package org.eclipse.ui.internal.handlers;
-//
-//import org.eclipse.core.commands.AbstractHandler;
-//import org.eclipse.core.commands.ExecutionEvent;
-//import org.eclipse.ui.PlatformUI;
-//import org.eclipse.ui.help.IWorkbenchHelpSystem;
-//
-///**
-// * Displays the help resource specified in the <code>href</code> command
-// * parameter or simply displays the help bookshelf if no parameter was passed.
-// */
-//public final class DisplayHelpHandler extends AbstractHandler {
-//
-// /**
-// * The identifier of the command parameter for the URI to oepn.
-// */
-// private static final String PARAM_ID_HREF = "href"; //$NON-NLS-1$
-//
-// public final Object execute(final ExecutionEvent event) {
-// final IWorkbenchHelpSystem helpSystem = PlatformUI.getWorkbench()
-// .getHelpSystem();
-// final String href = event.getParameter(PARAM_ID_HREF);
-//
-// if (href == null) {
-// helpSystem.displayHelp();
-// } else {
-// helpSystem.displayHelpResource(href);
-// }
-//
-// return null;
-// }
-//}
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.help.IWorkbenchHelpSystem;
+
+/**
+ * Displays the help resource specified in the <code>href</code> command
+ * parameter or simply displays the help bookshelf if no parameter was passed.
+ */
+public final class DisplayHelpHandler extends AbstractHandler {
+
+ /**
+ * The identifier of the command parameter for the URI to oepn.
+ */
+ private static final String PARAM_ID_HREF = "href"; //$NON-NLS-1$
+
+ public final Object execute(final ExecutionEvent event) {
+ final IWorkbenchHelpSystem helpSystem = PlatformUI.getWorkbench()
+ .getHelpSystem();
+ final String href = event.getParameter(PARAM_ID_HREF);
+
+ if (href == null) {
+ helpSystem.displayHelp();
+ } else {
+ helpSystem.displayHelpResource(href);
+ }
+
+ return null;
+ }
+}
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HandlerPersistence.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HandlerPersistence.java
index b340e2ebfc..91c05fe324 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HandlerPersistence.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HandlerPersistence.java
@@ -309,11 +309,9 @@ public final class HandlerPersistence extends RegistryPersistence {
proxy, activeWhenExpression));
// Read out the help context identifier.
- // RAP [bm]: Help
-// final String helpContextId = readOptional(configurationElement,
-// ATT_HELP_CONTEXT_ID);
-// handlerService.setHelpContextId(proxy, helpContextId);
- // RAPEND: [bm]
+ final String helpContextId = readOptional(configurationElement,
+ ATT_HELP_CONTEXT_ID);
+ handlerService.setHelpContextId(proxy, helpContextId);
}
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HandlerService.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HandlerService.java
index 4632208426..f4bf7de056 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HandlerService.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HandlerService.java
@@ -188,11 +188,10 @@ public final class HandlerService implements IHandlerService {
// this is a no-op
}
- // RAP [bm]:
-// public final void setHelpContextId(final IHandler handler,
-// final String helpContextId) {
-// commandService.setHelpContextId(handler, helpContextId);
-// }
+ public final void setHelpContextId(final IHandler handler,
+ final String helpContextId) {
+ commandService.setHelpContextId(handler, helpContextId);
+ }
/**
* <p>
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/SlaveHandlerService.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/SlaveHandlerService.java
index a0d172f4aa..1004976453 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/SlaveHandlerService.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/SlaveHandlerService.java
@@ -264,11 +264,10 @@ public class SlaveHandlerService implements IHandlerService {
parent.removeSourceProvider(provider);
}
- // RAP [bm]: Help
-// public final void setHelpContextId(final IHandler handler,
-// final String helpContextId) {
-// parent.setHelpContextId(handler, helpContextId);
-// }
+ public final void setHelpContextId(final IHandler handler,
+ final String helpContextId) {
+ parent.setHelpContextId(handler, helpContextId);
+ }
Expression getDefaultExpression() {
return defaultExpression;
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/WizardHandler.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/WizardHandler.java
index 9b72f64028..ec55dc0629 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/WizardHandler.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/WizardHandler.java
@@ -28,6 +28,7 @@ import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.IWorkbenchWizard;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.LegacyResourceSupport;
import org.eclipse.ui.internal.WorkbenchPlugin;
import org.eclipse.ui.internal.dialogs.ImportExportWizard;
@@ -89,10 +90,8 @@ public abstract class WizardHandler extends AbstractHandler {
dialog.getShell().setSize(
Math.max(SIZING_WIZARD_WIDTH, dialog.getShell()
.getSize().x), SIZING_WIZARD_HEIGHT);
- // RAP [bm]: HelpSystem
-// activeWorkbenchWindow.getWorkbench().getHelpSystem().setHelp(
-// dialog.getShell(), IWorkbenchHelpContextIds.EXPORT_WIZARD);
- // RAPEND: [bm]
+ activeWorkbenchWindow.getWorkbench().getHelpSystem().setHelp(
+ dialog.getShell(), IWorkbenchHelpContextIds.EXPORT_WIZARD);
dialog.open();
}
@@ -140,10 +139,8 @@ public abstract class WizardHandler extends AbstractHandler {
dialog.getShell().setSize(
Math.max(SIZING_WIZARD_WIDTH, dialog.getShell().getSize().x),
SIZING_WIZARD_HEIGHT);
- // RAP [bm]: HelpSystem
-// activeWorkbenchWindow.getWorkbench().getHelpSystem().setHelp(
-// dialog.getShell(), IWorkbenchHelpContextIds.IMPORT_WIZARD);
- // RAPEND: [bm]
+ activeWorkbenchWindow.getWorkbench().getHelpSystem().setHelp(
+ dialog.getShell(), IWorkbenchHelpContextIds.IMPORT_WIZARD);
dialog.open();
}
@@ -250,10 +247,8 @@ public abstract class WizardHandler extends AbstractHandler {
dialog.getShell().setSize(
Math.max(SIZING_WIZARD_WIDTH, dialog.getShell().getSize().x),
SIZING_WIZARD_HEIGHT);
- // RAP [bm]:
-// activeWorkbenchWindow.getWorkbench().getHelpSystem().setHelp(
-// dialog.getShell(), IWorkbenchHelpContextIds.NEW_WIZARD);
- // RAPEND: [bm]
+ activeWorkbenchWindow.getWorkbench().getHelpSystem().setHelp(
+ dialog.getShell(), IWorkbenchHelpContextIds.NEW_WIZARD);
dialog.open();
}
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/help/WorkbenchHelpSystem.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/help/WorkbenchHelpSystem.java
index 18b168853a..e3420174ff 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/help/WorkbenchHelpSystem.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/help/WorkbenchHelpSystem.java
@@ -1,1021 +1,1028 @@
-// RAP [rh] WorkbenchHelpSystem: help support left aside for now
-///*******************************************************************************
-// * Copyright (c) 2004, 2007 IBM Corporation and others.
-// * All rights reserved. This program and the accompanying materials
-// * are made available under the terms of the Eclipse Public License v1.0
-// * which accompanies this distribution, and is available at
-// * http://www.eclipse.org/legal/epl-v10.html
-// *
-// * Contributors:
-// * IBM Corporation - initial API and implementation
-// *******************************************************************************/
-//package org.eclipse.ui.internal.help;
-//
-//import java.net.URL;
-//
-//import org.eclipse.core.runtime.Assert;
-//import org.eclipse.core.runtime.CoreException;
-//import org.eclipse.core.runtime.IConfigurationElement;
-//import org.eclipse.core.runtime.IExtension;
-//import org.eclipse.core.runtime.IExtensionPoint;
-//import org.eclipse.core.runtime.Platform;
-//import org.eclipse.core.runtime.dynamichelpers.IExtensionChangeHandler;
-//import org.eclipse.core.runtime.dynamichelpers.IExtensionTracker;
-//import org.eclipse.help.HelpSystem;
-//import org.eclipse.help.IContext;
-//import org.eclipse.help.IContext2;
-//import org.eclipse.help.IHelp;
-//import org.eclipse.help.IHelpResource;
-//import org.eclipse.help.IToc;
-//import org.eclipse.jface.action.IAction;
-//import org.eclipse.swt.custom.BusyIndicator;
-//import org.eclipse.swt.events.HelpEvent;
-//import org.eclipse.swt.events.HelpListener;
-//import org.eclipse.swt.graphics.Point;
-//import org.eclipse.swt.widgets.Control;
-//import org.eclipse.swt.widgets.Display;
-//import org.eclipse.swt.widgets.Menu;
-//import org.eclipse.swt.widgets.MenuItem;
-//import org.eclipse.ui.PlatformUI;
-//import org.eclipse.ui.commands.ICommand;
-//import org.eclipse.ui.help.AbstractHelpUI;
-//import org.eclipse.ui.help.IContextComputer;
-//import org.eclipse.ui.help.IWorkbenchHelpSystem;
-//import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
-//import org.eclipse.ui.internal.WorkbenchPlugin;
-//import org.eclipse.ui.internal.registry.IWorkbenchRegistryConstants;
-//
-///**
-// * This class represents a refactoring of the functionality previously contained
-// * in <code>WorkbenchHelp</code>.
-// *
-// * @since 3.1
-// */
-//public final class WorkbenchHelpSystem implements IWorkbenchHelpSystem {
-//
-// /**
-// * Key used for stashing help-related data on SWT widgets.
-// *
-// * @see org.eclipse.swt.widgets.Widget#getData(java.lang.String)
-// */
-// public static final String HELP_KEY = "org.eclipse.ui.help";//$NON-NLS-1$
-//
-// /**
-// * Id of extension point where the help UI is contributed.
-// */
-// private static final String HELP_SYSTEM_EXTENSION_ID = PlatformUI.PLUGIN_ID + '.' + IWorkbenchRegistryConstants.PL_HELPSUPPORT;
-//
-// /**
-// * Attribute id for class attribute of help UI extension point.
-// */
-// private static final String HELP_SYSTEM_CLASS_ATTRIBUTE = "class";//$NON-NLS-1$
-//
-// /**
-// * Singleton.
-// */
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.help;
+
+import java.net.URL;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.dynamichelpers.IExtensionChangeHandler;
+import org.eclipse.core.runtime.dynamichelpers.IExtensionTracker;
+import org.eclipse.help.HelpSystem;
+import org.eclipse.help.IContext;
+import org.eclipse.help.IContext2;
+import org.eclipse.help.IHelp;
+import org.eclipse.help.IHelpResource;
+import org.eclipse.help.IToc;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.rwt.SessionSingletonBase;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.events.HelpEvent;
+import org.eclipse.swt.events.HelpListener;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommand;
+import org.eclipse.ui.help.AbstractHelpUI;
+import org.eclipse.ui.help.IContextComputer;
+import org.eclipse.ui.help.IWorkbenchHelpSystem;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.internal.WorkbenchPlugin;
+import org.eclipse.ui.internal.registry.IWorkbenchRegistryConstants;
+
+/**
+ * This class represents a refactoring of the functionality previously contained
+ * in <code>WorkbenchHelp</code>.
+ *
+ * @since 3.1
+ */
+public final class WorkbenchHelpSystem implements IWorkbenchHelpSystem {
+
+ /**
+ * Key used for stashing help-related data on SWT widgets.
+ *
+ * @see org.eclipse.swt.widgets.Widget#getData(java.lang.String)
+ */
+ public static final String HELP_KEY = "org.eclipse.ui.help";//$NON-NLS-1$
+
+ /**
+ * Id of extension point where the help UI is contributed.
+ */
+ private static final String HELP_SYSTEM_EXTENSION_ID = PlatformUI.PLUGIN_EXTENSION_NAME_SPACE + '.' + IWorkbenchRegistryConstants.PL_HELPSUPPORT;
+
+ /**
+ * Attribute id for class attribute of help UI extension point.
+ */
+ private static final String HELP_SYSTEM_CLASS_ATTRIBUTE = "class";//$NON-NLS-1$
+
+ /**
+ * Singleton.
+ */
+ // RAP [bm]: replaced with Session Singleton (see getInstance)
// private static WorkbenchHelpSystem instance;
-//
-// /**
-// * The help listener.
-// */
-// private static class WorkbenchHelpListener implements HelpListener {
-// public void helpRequested(HelpEvent event) {
-//
-// if (getInstance().getHelpUI() == null) {
-// return;
-// }
-//
-// // get the help context from the widget
-// Object object = event.widget.getData(HELP_KEY);
-//
-// // Since 2.0 we can expect that object is a String, however
-// // for backward compatability we handle context computers and
-// // arrays.
-// IContext context = null;
-// if (object instanceof String) {
-// // context id - this is the norm
-// context = HelpSystem.getContext((String) object);
-// } else if (object instanceof IContext) {
-// // already resolved context (pre 2.0)
-// context = (IContext) object;
-// } else if (object instanceof IContextComputer) {
-// // a computed context (pre 2.0) - compute it now
-// Object[] helpContexts = ((IContextComputer) object)
-// .computeContexts(event);
-// // extract the first entry
-// if (helpContexts != null && helpContexts.length > 0) {
-// Object primaryEntry = helpContexts[0];
-// if (primaryEntry instanceof String) {
-// context = HelpSystem.getContext((String) primaryEntry);
-// } else if (primaryEntry instanceof IContext) {
-// context = (IContext) primaryEntry;
-// }
-// }
-// } else if (object instanceof Object[]) {
-// // mixed array of String or IContext (pre 2.0) - extract the
-// // first entry
-// Object[] helpContexts = (Object[]) object;
-// // extract the first entry
-// if (helpContexts.length > 0) {
-// Object primaryEntry = helpContexts[0];
-// if (primaryEntry instanceof String) {
-// context = HelpSystem.getContext((String) primaryEntry);
-// } else if (primaryEntry instanceof IContext) {
-// context = (IContext) primaryEntry;
-// }
-// }
-// }
-//
-// /*
-// * If can't find it, show the "context is missing" context.
-// */
-// if (context == null) {
-// context = HelpSystem.getContext(IWorkbenchHelpContextIds.MISSING);
-// }
-//
-// if (context != null) {
-// // determine a location in the upper right corner of the
-// // widget
-// Point point = computePopUpLocation(event.widget.getDisplay());
-// // display the help
-// getInstance().displayContext(context, point.x, point.y);
-// }
-// }
-// }
-//
-// /**
-// * Whether the help system has been initialized.
-// */
-// private boolean isInitialized;
-//
-// /**
-// * Pluggable help UI, or <code>null</code> if none (or unknown).
-// */
-// private AbstractHelpUI pluggableHelpUI = null;
-//
-// /**
-// * The id of the help extension that should be used. This is used only for
-// * debugging purposes.
-// */
-// private String desiredHelpSystemId;
-//
-// /**
-// * Handles dynamic removal of the help system.
-// *
-// * @since 3.1
-// */
-// /**
-// * Handles dynamic removal of the help system.
-// *
-// * @since 3.1
-// */
-// private IExtensionChangeHandler handler = new IExtensionChangeHandler() {
-//
-// /* (non-Javadoc)
-// * @see org.eclipse.core.runtime.dynamicHelpers.IExtensionChangeHandler#addExtension(org.eclipse.core.runtime.dynamicHelpers.IExtensionTracker, org.eclipse.core.runtime.IExtension)
-// */
-// public void addExtension(IExtensionTracker tracker,IExtension extension) {
-// //Do nothing
-// }
-//
-// /* (non-Javadoc)
-// * @see org.eclipse.core.runtime.dynamicHelpers.IExtensionChangeHandler#removeExtension(org.eclipse.core.runtime.IExtension, java.lang.Object[])
-// */
-// public void removeExtension(IExtension source, Object[] objects) {
-// for (int i = 0; i < objects.length; i++) {
-// if (objects[i] == pluggableHelpUI) {
-// isInitialized = false;
-// pluggableHelpUI = null;
-// helpCompatibilityWrapper = null;
-// // remove ourselves - we'll be added again in initalize if
-// // needed
-// PlatformUI.getWorkbench().getExtensionTracker()
-// .unregisterHandler(handler);
-// }
-// }
-// }
-// };
-//
-// /**
-// * Compatibility implementation of old IHelp interface.
-// * WorkbenchHelp.getHelpSupport and IHelp were deprecated in 3.0.
-// */
-// private class CompatibilityIHelpImplementation implements IHelp {
-//
-// /** @deprecated */
-// public void displayHelp() {
-// // real method - forward to help UI if available
-// AbstractHelpUI helpUI = getHelpUI();
-// if (helpUI != null) {
-// helpUI.displayHelp();
-// }
-// }
-//
-// /** @deprecated */
-// public void displayContext(IContext context, int x, int y) {
-// // real method - forward to help UI if available
-// AbstractHelpUI helpUI = getHelpUI();
-// if (helpUI != null) {
-// helpUI.displayContext(context, x, y);
-// }
-// }
-//
-// /** @deprecated */
-// public void displayContext(String contextId, int x, int y) {
-// // convenience method - funnel through the real method
-// IContext context = HelpSystem.getContext(contextId);
-// if (context != null) {
-// displayContext(context, x, y);
-// }
-// }
-//
-// /** @deprecated */
-// public void displayHelpResource(String href) {
-// // real method - forward to help UI if available
-// AbstractHelpUI helpUI = getHelpUI();
-// if (helpUI != null) {
-// helpUI.displayHelpResource(href);
-// }
-// }
-//
-// /** @deprecated */
-// public void displayHelpResource(IHelpResource helpResource) {
-// // convenience method - funnel through the real method
-// displayHelpResource(helpResource.getHref());
-// }
-//
-// /** @deprecated */
-// public void displayHelp(String toc) {
-// // deprecated method - funnel through the real method
-// displayHelpResource(toc);
-// }
-//
-// /** @deprecated */
-// public void displayHelp(String toc, String selectedTopic) {
-// // deprecated method - funnel through the real method
-// displayHelpResource(selectedTopic);
-// }
-//
-// /** @deprecated */
-// public void displayHelp(String contextId, int x, int y) {
-// // deprecated method - funnel through the real method
-// displayContext(contextId, x, y);
-// }
-//
-// /** @deprecated */
-// public void displayHelp(IContext context, int x, int y) {
-// // deprecated method - funnel through the real method
-// displayContext(context, x, y);
-// }
-//
-// /** @deprecated */
-// public IContext getContext(String contextId) {
-// // non-UI method - forward to HelpSystem
-// return HelpSystem.getContext(contextId);
-// }
-//
-// /** @deprecated */
-// public IToc[] getTocs() {
-// // non-UI method - forward to HelpSystem
-// return HelpSystem.getTocs();
-// }
-//
-// /** @deprecated */
-// public boolean isContextHelpDisplayed() {
-// // real method - forward to pluggedhelp UI
-// return isContextHelpDisplayed();
-// }
-// }
-//
-// /**
-// * A wrapper for action help context that passes the action
-// * text to be used as a title.
-// * @since 3.1
-// */
-// private static class ContextWithTitle implements IContext2 {
-// private IContext context;
-// private String title;
-//
-// ContextWithTitle(IContext context, String title) {
-// this.context = context;
-// this.title = title;
-// }
-//
-// public String getTitle() {
-// if (context instanceof IContext2) {
-// String ctitle = ((IContext2)context).getTitle();
-// if (ctitle!=null) {
-// return ctitle;
-// }
-// }
-// return title;
-// }
-//
-// public String getStyledText() {
-// if (context instanceof IContext2) {
-// return ((IContext2)context).getStyledText();
-// }
-// return context.getText();
-// }
-//
-// public String getCategory(IHelpResource topic) {
-// if (context instanceof IContext2) {
-// return ((IContext2)context).getCategory(topic);
-// }
-// return null;
-// }
-//
-// public IHelpResource[] getRelatedTopics() {
-// return context.getRelatedTopics();
-// }
-//
-// public String getText() {
-// return context.getText();
-// }
-// }
-//
-// /**
-// * Compatibility wrapper, or <code>null</code> if none. Do not access
-// * directly; see getHelpSupport().
-// */
-// private IHelp helpCompatibilityWrapper = null;
-//
-// /**
-// * The listener to attach to various widgets.
-// */
-// private static HelpListener helpListener;
-//
-// /**
-// * For debug purposes only.
-// *
-// * @return the desired help system id
-// */
-// public String getDesiredHelpSystemId() {
-// return desiredHelpSystemId;
-// }
-//
-// /**
-// * For debug purposes only.
-// *
-// * @param desiredHelpSystemId the desired help system id
-// */
-// public void setDesiredHelpSystemId(String desiredHelpSystemId) {
-// dispose(); // prep for a new help system
-// this.desiredHelpSystemId = desiredHelpSystemId;
-// }
-//
-// /**
-// * Singleton Constructor.
-// */
-// private WorkbenchHelpSystem() {
-// }
-//
-// /**
-// * Return the singleton instance of this class.
-// *
-// * @return the singleton instance
-// */
-// public static WorkbenchHelpSystem getInstance() {
+
+ /**
+ * The help listener.
+ */
+ private static class WorkbenchHelpListener implements HelpListener {
+ public void helpRequested(HelpEvent event) {
+
+ if (getInstance().getHelpUI() == null) {
+ return;
+ }
+
+ // get the help context from the widget
+ Object object = event.widget.getData(HELP_KEY);
+
+ // Since 2.0 we can expect that object is a String, however
+ // for backward compatability we handle context computers and
+ // arrays.
+ IContext context = null;
+ if (object instanceof String) {
+ // context id - this is the norm
+ context = HelpSystem.getContext((String) object);
+ } else if (object instanceof IContext) {
+ // already resolved context (pre 2.0)
+ context = (IContext) object;
+ } else if (object instanceof IContextComputer) {
+ // a computed context (pre 2.0) - compute it now
+ Object[] helpContexts = ((IContextComputer) object)
+ .computeContexts(event);
+ // extract the first entry
+ if (helpContexts != null && helpContexts.length > 0) {
+ Object primaryEntry = helpContexts[0];
+ if (primaryEntry instanceof String) {
+ context = HelpSystem.getContext((String) primaryEntry);
+ } else if (primaryEntry instanceof IContext) {
+ context = (IContext) primaryEntry;
+ }
+ }
+ } else if (object instanceof Object[]) {
+ // mixed array of String or IContext (pre 2.0) - extract the
+ // first entry
+ Object[] helpContexts = (Object[]) object;
+ // extract the first entry
+ if (helpContexts.length > 0) {
+ Object primaryEntry = helpContexts[0];
+ if (primaryEntry instanceof String) {
+ context = HelpSystem.getContext((String) primaryEntry);
+ } else if (primaryEntry instanceof IContext) {
+ context = (IContext) primaryEntry;
+ }
+ }
+ }
+
+ /*
+ * If can't find it, show the "context is missing" context.
+ */
+ if (context == null) {
+ context = HelpSystem.getContext(IWorkbenchHelpContextIds.MISSING);
+ }
+
+ if (context != null) {
+ // determine a location in the upper right corner of the
+ // widget
+ Point point = computePopUpLocation(event.widget.getDisplay());
+ // display the help
+ getInstance().displayContext(context, point.x, point.y);
+ }
+ }
+ }
+
+ /**
+ * Whether the help system has been initialized.
+ */
+ private boolean isInitialized;
+
+ /**
+ * Pluggable help UI, or <code>null</code> if none (or unknown).
+ */
+ private AbstractHelpUI pluggableHelpUI = null;
+
+ /**
+ * The id of the help extension that should be used. This is used only for
+ * debugging purposes.
+ */
+ private String desiredHelpSystemId;
+
+ /**
+ * Handles dynamic removal of the help system.
+ *
+ * @since 3.1
+ */
+ /**
+ * Handles dynamic removal of the help system.
+ *
+ * @since 3.1
+ */
+ private IExtensionChangeHandler handler = new IExtensionChangeHandler() {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.dynamicHelpers.IExtensionChangeHandler#addExtension(org.eclipse.core.runtime.dynamicHelpers.IExtensionTracker, org.eclipse.core.runtime.IExtension)
+ */
+ public void addExtension(IExtensionTracker tracker,IExtension extension) {
+ //Do nothing
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.dynamicHelpers.IExtensionChangeHandler#removeExtension(org.eclipse.core.runtime.IExtension, java.lang.Object[])
+ */
+ public void removeExtension(IExtension source, Object[] objects) {
+ for (int i = 0; i < objects.length; i++) {
+ if (objects[i] == pluggableHelpUI) {
+ isInitialized = false;
+ pluggableHelpUI = null;
+ helpCompatibilityWrapper = null;
+ // remove ourselves - we'll be added again in initalize if
+ // needed
+ PlatformUI.getWorkbench().getExtensionTracker()
+ .unregisterHandler(handler);
+ }
+ }
+ }
+ };
+
+ /**
+ * Compatibility implementation of old IHelp interface.
+ * WorkbenchHelp.getHelpSupport and IHelp were deprecated in 3.0.
+ */
+ private class CompatibilityIHelpImplementation implements IHelp {
+
+ /** @deprecated */
+ public void displayHelp() {
+ // real method - forward to help UI if available
+ AbstractHelpUI helpUI = getHelpUI();
+ if (helpUI != null) {
+ helpUI.displayHelp();
+ }
+ }
+
+ /** @deprecated */
+ public void displayContext(IContext context, int x, int y) {
+ // real method - forward to help UI if available
+ AbstractHelpUI helpUI = getHelpUI();
+ if (helpUI != null) {
+ helpUI.displayContext(context, x, y);
+ }
+ }
+
+ /** @deprecated */
+ public void displayContext(String contextId, int x, int y) {
+ // convenience method - funnel through the real method
+ IContext context = HelpSystem.getContext(contextId);
+ if (context != null) {
+ displayContext(context, x, y);
+ }
+ }
+
+ /** @deprecated */
+ public void displayHelpResource(String href) {
+ // real method - forward to help UI if available
+ AbstractHelpUI helpUI = getHelpUI();
+ if (helpUI != null) {
+ helpUI.displayHelpResource(href);
+ }
+ }
+
+ /** @deprecated */
+ public void displayHelpResource(IHelpResource helpResource) {
+ // convenience method - funnel through the real method
+ displayHelpResource(helpResource.getHref());
+ }
+
+ /** @deprecated */
+ public void displayHelp(String toc) {
+ // deprecated method - funnel through the real method
+ displayHelpResource(toc);
+ }
+
+ /** @deprecated */
+ public void displayHelp(String toc, String selectedTopic) {
+ // deprecated method - funnel through the real method
+ displayHelpResource(selectedTopic);
+ }
+
+ /** @deprecated */
+ public void displayHelp(String contextId, int x, int y) {
+ // deprecated method - funnel through the real method
+ displayContext(contextId, x, y);
+ }
+
+ /** @deprecated */
+ public void displayHelp(IContext context, int x, int y) {
+ // deprecated method - funnel through the real method
+ displayContext(context, x, y);
+ }
+
+ /** @deprecated */
+ public IContext getContext(String contextId) {
+ // non-UI method - forward to HelpSystem
+ return HelpSystem.getContext(contextId);
+ }
+
+ /** @deprecated */
+ public IToc[] getTocs() {
+ // non-UI method - forward to HelpSystem
+ return HelpSystem.getTocs();
+ }
+
+ /** @deprecated */
+ public boolean isContextHelpDisplayed() {
+ // real method - forward to pluggedhelp UI
+ return isContextHelpDisplayed();
+ }
+ }
+
+ /**
+ * A wrapper for action help context that passes the action
+ * text to be used as a title.
+ * @since 3.1
+ */
+ private static class ContextWithTitle implements IContext2 {
+ private IContext context;
+ private String title;
+
+ ContextWithTitle(IContext context, String title) {
+ this.context = context;
+ this.title = title;
+ }
+
+ public String getTitle() {
+ if (context instanceof IContext2) {
+ String ctitle = ((IContext2)context).getTitle();
+ if (ctitle!=null) {
+ return ctitle;
+ }
+ }
+ return title;
+ }
+
+ public String getStyledText() {
+ if (context instanceof IContext2) {
+ return ((IContext2)context).getStyledText();
+ }
+ return context.getText();
+ }
+
+ public String getCategory(IHelpResource topic) {
+ if (context instanceof IContext2) {
+ return ((IContext2)context).getCategory(topic);
+ }
+ return null;
+ }
+
+ public IHelpResource[] getRelatedTopics() {
+ return context.getRelatedTopics();
+ }
+
+ public String getText() {
+ return context.getText();
+ }
+ }
+
+ /**
+ * Compatibility wrapper, or <code>null</code> if none. Do not access
+ * directly; see getHelpSupport().
+ */
+ private IHelp helpCompatibilityWrapper = null;
+
+ /**
+ * The listener to attach to various widgets.
+ */
+ private static HelpListener helpListener;
+
+ /**
+ * For debug purposes only.
+ *
+ * @return the desired help system id
+ */
+ public String getDesiredHelpSystemId() {
+ return desiredHelpSystemId;
+ }
+
+ /**
+ * For debug purposes only.
+ *
+ * @param desiredHelpSystemId the desired help system id
+ */
+ public void setDesiredHelpSystemId(String desiredHelpSystemId) {
+ dispose(); // prep for a new help system
+ this.desiredHelpSystemId = desiredHelpSystemId;
+ }
+
+ /**
+ * Singleton Constructor.
+ */
+ private WorkbenchHelpSystem() {
+ }
+
+ /**
+ * Return the singleton instance of this class.
+ *
+ * @return the singleton instance
+ */
+ public static WorkbenchHelpSystem getInstance() {
+ // RAP [bm]: replaced with session singelton
// if (instance == null) {
// instance = new WorkbenchHelpSystem();
// }
//
// return instance;
-// }
-//
-// /**
-// * Disposed of the singleton of this class if it has been created.
-// */
-// public static void disposeIfNecessary() {
+ return (WorkbenchHelpSystem) SessionSingletonBase.getInstance(WorkbenchHelpSystem.class);
+ // RAPEND: [bm]
+ }
+
+ /**
+ * Disposed of the singleton of this class if it has been created.
+ */
+ public static void disposeIfNecessary() {
+ // RAP [bm]: session aware
// if (instance != null) {
// instance.dispose();
// instance = null;
// }
-// }
-//
-// /**
-// * Dispose of any resources allocated by this instance.
-// */
-// public void dispose() {
-// pluggableHelpUI = null;
-// helpCompatibilityWrapper = null;
-// isInitialized = false;
-// PlatformUI.getWorkbench().getExtensionTracker()
-// .unregisterHandler(handler);
-// }
-//
-// /**
-// * Returns the help UI for the platform, if available. This method will
-// * initialize the help UI if necessary.
-// *
-// * @return the help UI, or <code>null</code> if none
-// */
-// private AbstractHelpUI getHelpUI() {
-// if (!isInitialized) {
-// isInitialized = initializePluggableHelpUI();
-// }
-// return pluggableHelpUI;
-// }
-//
-// /**
-// * Initializes the pluggable help UI by getting an instance via the
-// * extension point.
-// */
-// private boolean initializePluggableHelpUI() {
-// final boolean[] ret = new boolean[] { false };
-//
-// BusyIndicator.showWhile(Display.getCurrent(), new Runnable() {
-//
-// /*
-// * (non-Javadoc)
-// *
-// * @see java.lang.Runnable#run()
-// */
-// public void run() {
-// // get the help UI extension from the registry
-// IExtensionPoint point = Platform.getExtensionRegistry()
-// .getExtensionPoint(HELP_SYSTEM_EXTENSION_ID);
-// if (point == null) {
-// // our extension point is missing (!) - act like there was
-// // no help UI
-// return;
-// }
-// IExtension[] extensions = point.getExtensions();
-// if (extensions.length == 0) {
-// // no help UI present
-// return;
-// }
-//
-// IConfigurationElement elementToUse = null;
-// if (desiredHelpSystemId == null) {
-// elementToUse = getFirstElement(extensions);
-// } else {
-// elementToUse = findElement(desiredHelpSystemId, extensions);
-// }
-//
-// if (elementToUse != null) {
-// ret[0] = initializePluggableHelpUI(elementToUse);
-// }
-// }
-//
-// private IConfigurationElement findElement(
-// String desiredHelpSystemId, IExtension[] extensions) {
-// for (int i = 0; i < extensions.length; i++) {
-// IExtension extension = extensions[i];
-// if (desiredHelpSystemId.equals(extension.getUniqueIdentifier())) {
-// IConfigurationElement[] elements = extensions[0]
-// .getConfigurationElements();
-// if (elements.length == 0) {
-// // help UI present but mangled - act like there was
-// // no help
-// // UI
-// return null;
-// }
-// return elements[0];
-// }
-//
-// }
-// return null;
-// }
-//
-// private IConfigurationElement getFirstElement(
-// IExtension[] extensions) {
-// // There should only be one extension/config element so we just
-// // take the first
-// IConfigurationElement[] elements = extensions[0]
-// .getConfigurationElements();
-// if (elements.length == 0) {
-// // help UI present but mangled - act like there was no help
-// // UI
-// return null;
-// }
-// return elements[0];
-// }
-//
-// private boolean initializePluggableHelpUI(
-// IConfigurationElement element) {
-// // Instantiate the help UI
-// try {
-// pluggableHelpUI = (AbstractHelpUI) WorkbenchPlugin
-// .createExtension(element,
-// HELP_SYSTEM_CLASS_ATTRIBUTE);
-// // start listening for removals
-// PlatformUI.getWorkbench().getExtensionTracker()
-// .registerHandler(handler, null);
-// // register the new help UI for removal notification
-// PlatformUI
-// .getWorkbench()
-// .getExtensionTracker()
-// .registerObject(element.getDeclaringExtension(),
-// pluggableHelpUI, IExtensionTracker.REF_WEAK);
-// return true;
-// } catch (CoreException e) {
-// WorkbenchPlugin.log(
-// "Unable to instantiate help UI" + e.getStatus(), e);//$NON-NLS-1$
-// }
-// return false;
-// }
-//
-// });
-// return ret[0];
-// }
-//
-// /**
-// * Determines the location for the help popup shell given the widget which
-// * orginated the request for help.
-// *
-// * @param display
-// * the display where the help will appear
-// */
-// private static Point computePopUpLocation(Display display) {
-// Point point = display.getCursorLocation();
-// return new Point(point.x + 15, point.y);
-// }
-//
-// /**
-// * Returns the help listener which activates the help support system.
-// *
-// * @return the help listener
-// */
-// private HelpListener getHelpListener() {
-// if (helpListener == null) {
-// helpListener = new WorkbenchHelpListener();
-// }
-// return helpListener;
-// }
-//
-// /**
-// * Returns the help support system for the platform, if available.
-// *
-// * @return the help support system, or <code>null</code> if none
-// * @deprecated Use the static methods on this class and on
-// * {@link org.eclipse.help.HelpSystem HelpSystem}instead of the
-// * IHelp methods on the object returned by this method.
-// */
-// public IHelp getHelpSupport() {
-// AbstractHelpUI helpUI = getHelpUI();
-// if (helpUI != null && helpCompatibilityWrapper == null) {
-// // create instance only once, and only if needed
-// helpCompatibilityWrapper = new CompatibilityIHelpImplementation();
-// }
-// return helpCompatibilityWrapper;
-//
-// }
-//
-// /**
-// * Sets the given help contexts on the given action.
-// * <p>
-// * Use this method when the list of help contexts is known in advance. Help
-// * contexts can either supplied as a static list, or calculated with a
-// * context computer (but not both).
-// * </p>
-// *
-// * @param action
-// * the action on which to register the computer
-// * @param contexts
-// * the contexts to use when F1 help is invoked; a mixed-type
-// * array of context ids (type <code>String</code>) and/or help
-// * contexts (type <code>IContext</code>)
-// * @deprecated use setHelp with a single context id parameter
-// */
-// public void setHelp(IAction action, final Object[] contexts) {
-// for (int i = 0; i < contexts.length; i++) {
-// Assert.isTrue(contexts[i] instanceof String
-// || contexts[i] instanceof IContext);
-// }
-// action.setHelpListener(new HelpListener() {
-// public void helpRequested(HelpEvent event) {
-// if (contexts != null && contexts.length > 0
-// && getHelpUI() != null) {
-// // determine the context
-// IContext context = null;
-// if (contexts[0] instanceof String) {
-// context = HelpSystem.getContext((String) contexts[0]);
-// } else if (contexts[0] instanceof IContext) {
-// context = (IContext) contexts[0];
-// }
-// if (context != null) {
-// Point point = computePopUpLocation(event.widget
-// .getDisplay());
-// displayContext(context, point.x, point.y);
-// }
-// }
-// }
-// });
-// }
-//
-// /**
-// * Sets the given help context computer on the given action.
-// * <p>
-// * Use this method when the help contexts cannot be computed in advance.
-// * Help contexts can either supplied as a static list, or calculated with a
-// * context computer (but not both).
-// * </p>
-// *
-// * @param action
-// * the action on which to register the computer
-// * @param computer
-// * the computer to determine the help contexts for the control
-// * when F1 help is invoked
-// * @deprecated context computers are no longer supported, clients should
-// * implement their own help listener
-// */
-// public void setHelp(IAction action, final IContextComputer computer) {
-// action.setHelpListener(new HelpListener() {
-// public void helpRequested(HelpEvent event) {
-// Object[] helpContexts = computer.computeContexts(event);
-// if (helpContexts != null && helpContexts.length > 0
-// && getHelpUI() != null) {
-// // determine the context
-// IContext context = null;
-// if (helpContexts[0] instanceof String) {
-// context = HelpSystem
-// .getContext((String) helpContexts[0]);
-// } else if (helpContexts[0] instanceof IContext) {
-// context = (IContext) helpContexts[0];
-// }
-// if (context != null) {
-// Point point = computePopUpLocation(event.widget
-// .getDisplay());
-// displayContext(context, point.x, point.y);
-// }
-// }
-// }
-// });
-// }
-//
-// /**
-// * Sets the given help contexts on the given control.
-// * <p>
-// * Use this method when the list of help contexts is known in advance. Help
-// * contexts can either supplied as a static list, or calculated with a
-// * context computer (but not both).
-// * </p>
-// *
-// * @param control
-// * the control on which to register the contexts
-// * @param contexts
-// * the contexts to use when F1 help is invoked; a mixed-type
-// * array of context ids (type <code>String</code>) and/or help
-// * contexts (type <code>IContext</code>)
-// * @deprecated use setHelp with single context id parameter
-// */
-// public void setHelp(Control control, Object[] contexts) {
-// for (int i = 0; i < contexts.length; i++) {
-// Assert.isTrue(contexts[i] instanceof String
-// || contexts[i] instanceof IContext);
-// }
-//
-// control.setData(HELP_KEY, contexts);
-// // ensure that the listener is only registered once
-// control.removeHelpListener(getHelpListener());
-// control.addHelpListener(getHelpListener());
-// }
-//
-// /**
-// * Sets the given help context computer on the given control.
-// * <p>
-// * Use this method when the help contexts cannot be computed in advance.
-// * Help contexts can either supplied as a static list, or calculated with a
-// * context computer (but not both).
-// * </p>
-// *
-// * @param control
-// * the control on which to register the computer
-// * @param computer
-// * the computer to determine the help contexts for the control
-// * when F1 help is invoked
-// * @deprecated context computers are no longer supported, clients should
-// * implement their own help listener
-// */
-// public void setHelp(Control control, IContextComputer computer) {
-// control.setData(HELP_KEY, computer);
-// // ensure that the listener is only registered once
-// control.removeHelpListener(getHelpListener());
-// control.addHelpListener(getHelpListener());
-// }
-//
-// /**
-// * Sets the given help contexts on the given menu.
-// * <p>
-// * Use this method when the list of help contexts is known in advance. Help
-// * contexts can either supplied as a static list, or calculated with a
-// * context computer (but not both).
-// * </p>
-// *
-// * @param menu
-// * the menu on which to register the context
-// * @param contexts
-// * the contexts to use when F1 help is invoked; a mixed-type
-// * array of context ids (type <code>String</code>) and/or help
-// * contexts (type <code>IContext</code>)
-// * @deprecated use setHelp with single context id parameter
-// */
-// public void setHelp(Menu menu, Object[] contexts) {
-// for (int i = 0; i < contexts.length; i++) {
-// Assert.isTrue(contexts[i] instanceof String
-// || contexts[i] instanceof IContext);
-// }
-// menu.setData(HELP_KEY, contexts);
-// // ensure that the listener is only registered once
-// menu.removeHelpListener(getHelpListener());
-// menu.addHelpListener(getHelpListener());
-// }
-//
-// /**
-// * Sets the given help context computer on the given menu.
-// * <p>
-// * Use this method when the help contexts cannot be computed in advance.
-// * Help contexts can either supplied as a static list, or calculated with a
-// * context computer (but not both).
-// * </p>
-// *
-// * @param menu
-// * the menu on which to register the computer
-// * @param computer
-// * the computer to determine the help contexts for the control
-// * when F1 help is invoked
-// * @deprecated context computers are no longer supported, clients should
-// * implement their own help listener
-// */
-// public void setHelp(Menu menu, IContextComputer computer) {
-// menu.setData(HELP_KEY, computer);
-// // ensure that the listener is only registered once
-// menu.removeHelpListener(getHelpListener());
-// menu.addHelpListener(getHelpListener());
-// }
-//
-// /**
-// * Sets the given help contexts on the given menu item.
-// * <p>
-// * Use this method when the list of help contexts is known in advance. Help
-// * contexts can either supplied as a static list, or calculated with a
-// * context computer (but not both).
-// * </p>
-// *
-// * @param item
-// * the menu item on which to register the context
-// * @param contexts
-// * the contexts to use when F1 help is invoked; a mixed-type
-// * array of context ids (type <code>String</code>) and/or help
-// * contexts (type <code>IContext</code>)
-// * @deprecated use setHelp with single context id parameter
-// */
-// public void setHelp(MenuItem item, Object[] contexts) {
-// for (int i = 0; i < contexts.length; i++) {
-// Assert.isTrue(contexts[i] instanceof String
-// || contexts[i] instanceof IContext);
-// }
-// item.setData(HELP_KEY, contexts);
-// // ensure that the listener is only registered once
-// item.removeHelpListener(getHelpListener());
-// item.addHelpListener(getHelpListener());
-// }
-//
-// /**
-// * Sets the given help context computer on the given menu item.
-// * <p>
-// * Use this method when the help contexts cannot be computed in advance.
-// * Help contexts can either supplied as a static list, or calculated with a
-// * context computer (but not both).
-// * </p>
-// *
-// * @param item
-// * the menu item on which to register the computer
-// * @param computer
-// * the computer to determine the help contexts for the control
-// * when F1 help is invoked
-// * @deprecated context computers are no longer supported, clients should
-// * implement their own help listener
-// */
-// public void setHelp(MenuItem item, IContextComputer computer) {
-// item.setData(HELP_KEY, computer);
-// // ensure that the listener is only registered once
-// item.removeHelpListener(getHelpListener());
-// item.addHelpListener(getHelpListener());
-// }
-//
-// /**
-// * Creates a new help listener for the given command. This retrieves the
-// * help context ID from the command, and creates an appropriate listener
-// * based on this.
-// *
-// * @param command
-// * The command for which the listener should be created; must
-// * not be <code>null</code>.
-// * @return A help listener; never <code>null</code>.
-// */
-// public HelpListener createHelpListener(ICommand command) {
-// // TODO Need a help ID from the context
-// // final String contextId = command.getHelpId();
-// final String contextId = ""; //$NON-NLS-1$
-// return new HelpListener() {
-// public void helpRequested(HelpEvent event) {
-// if (getHelpUI() != null) {
-// IContext context = HelpSystem.getContext(contextId);
-// if (context != null) {
-// Point point = computePopUpLocation(event.widget
-// .getDisplay());
-// displayContext(context, point.x, point.y);
-// }
-// }
-// }
-// };
-// }
-//
-// /*
-// * (non-Javadoc)
-// *
-// * @see org.eclipse.ui.help.IWorkbenchHelpSystem#displayHelp()
-// */
-// public void displayHelp() {
-// AbstractHelpUI helpUI = getHelpUI();
-// if (helpUI != null) {
-// helpUI.displayHelp();
-// }
-// }
-//
-// /*
-// * (non-Javadoc)
-// *
-// * @see org.eclipse.ui.help.IWorkbenchHelpSystem#displaySearch()
-// */
-// public void displaySearch() {
-// AbstractHelpUI helpUI = getHelpUI();
-// if (helpUI != null) {
-// helpUI.displaySearch();
-// }
-// }
-//
-// /*
-// * (non-Javadoc)
-// *
-// * @see org.eclipse.ui.help.IWorkbenchHelpSystem#displaySearch()
-// */
-// public void displayDynamicHelp() {
-// AbstractHelpUI helpUI = getHelpUI();
-// if (helpUI != null) {
-// helpUI.displayDynamicHelp();
-// }
-// }
-//
-// /*
-// * (non-Javadoc)
-// *
-// * @see org.eclipse.ui.help.IWorkbenchHelpSystem#search(java.lang.String)
-// */
-// public void search(String expression) {
-// AbstractHelpUI helpUI = getHelpUI();
-// if (helpUI != null) {
-// helpUI.search(expression);
-// }
-// }
-//
-// /* (non-Javadoc)
-// * @see org.eclipse.ui.help.IWorkbenchHelpSystem#resolve(java.lang.String, boolean)
-// */
-// public URL resolve(String href, boolean documentOnly) {
-// AbstractHelpUI helpUI = getHelpUI();
-// if (helpUI != null) {
-// return helpUI.resolve(href, documentOnly);
-// }
-// return null;
-// }
-//
-// /*
-// * (non-Javadoc)
-// *
-// * @see org.eclipse.ui.help.IWorkbenchHelpSystem#displayContext(org.eclipse.help.IContext,
-// * int, int)
-// */
-// public void displayContext(IContext context, int x, int y) {
-// if (context == null) {
-// throw new IllegalArgumentException();
-// }
-// AbstractHelpUI helpUI = getHelpUI();
-// if (helpUI != null) {
-// helpUI.displayContext(context, x, y);
-// }
-// }
-//
-// /*
-// * (non-Javadoc)
-// *
-// * @see org.eclipse.ui.help.IWorkbenchHelpSystem#displayHelpResource(java.lang.String)
-// */
-// public void displayHelpResource(String href) {
-// if (href == null) {
-// throw new IllegalArgumentException();
-// }
-// AbstractHelpUI helpUI = getHelpUI();
-// if (helpUI != null) {
-// helpUI.displayHelpResource(href);
-// }
-// }
-//
-// /*
-// * (non-Javadoc)
-// *
-// * @see org.eclipse.ui.help.IWorkbenchHelpSystem#displayHelp(java.lang.String)
-// */
-// public void displayHelp(String contextId) {
-// IContext context = HelpSystem.getContext(contextId);
-// if (context != null) {
-// Point point = computePopUpLocation(Display.getCurrent());
-// displayContext(context, point.x, point.y);
-// }
-// }
-//
-// /*
-// * (non-Javadoc)
-// *
-// * @see org.eclipse.ui.help.IWorkbenchHelpSystem#displayHelp(org.eclipse.help.IContext)
-// */
-// public void displayHelp(IContext context) {
-// Point point = computePopUpLocation(Display.getCurrent());
-// AbstractHelpUI helpUI = getHelpUI();
-// if (helpUI != null) {
-// helpUI.displayContext(context, point.x, point.y);
-// }
-// }
-//
-// /*
-// * (non-Javadoc)
-// *
-// * @see org.eclipse.ui.help.IWorkbenchHelpSystem#isContextHelpDisplayed()
-// */
-// public boolean isContextHelpDisplayed() {
-// if (!isInitialized) {
-// return false;
-// }
-// AbstractHelpUI helpUI = getHelpUI();
-// return helpUI != null && helpUI.isContextHelpDisplayed();
-// }
-//
-// /*
-// * (non-Javadoc)
-// *
-// * @see org.eclipse.ui.help.IWorkbenchHelpSystem#setHelp(org.eclipse.jface.action.IAction,
-// * java.lang.String)
-// */
-// public void setHelp(final IAction action, final String contextId) {
-// action.setHelpListener(new HelpListener() {
-// public void helpRequested(HelpEvent event) {
-// if (getHelpUI() != null) {
-// IContext context = HelpSystem.getContext(contextId);
-// if (context != null) {
-// Point point = computePopUpLocation(event.widget
-// .getDisplay());
-// displayContext(new ContextWithTitle(context, action.getText()), point.x, point.y);
-// }
-// }
-// }
-// });
-// }
-//
-// /*
-// * (non-Javadoc)
-// *
-// * @see org.eclipse.ui.help.IWorkbenchHelpSystem#setHelp(org.eclipse.swt.widgets.Control,
-// * java.lang.String)
-// */
-// public void setHelp(Control control, String contextId) {
-// control.setData(HELP_KEY, contextId);
-// // ensure that the listener is only registered once
-// control.removeHelpListener(getHelpListener());
-// control.addHelpListener(getHelpListener());
-// }
-//
-// /*
-// * (non-Javadoc)
-// *
-// * @see org.eclipse.ui.help.IWorkbenchHelpSystem#setHelp(org.eclipse.swt.widgets.Menu,
-// * java.lang.String)
-// */
-// public void setHelp(Menu menu, String contextId) {
-// menu.setData(HELP_KEY, contextId);
-// // ensure that the listener is only registered once
-// menu.removeHelpListener(getHelpListener());
-// menu.addHelpListener(getHelpListener());
-// }
-//
-// /*
-// * (non-Javadoc)
-// *
-// * @see org.eclipse.ui.help.IWorkbenchHelpSystem#setHelp(org.eclipse.swt.widgets.MenuItem,
-// * java.lang.String)
-// */
-// public void setHelp(MenuItem item, String contextId) {
-// item.setData(HELP_KEY, contextId);
-// // ensure that the listener is only registered once
-// item.removeHelpListener(getHelpListener());
-// item.addHelpListener(getHelpListener());
-// }
-//
-// /* (non-Javadoc)
-// * @see org.eclipse.ui.help.IWorkbenchHelpSystem#hasHelpUI()
-// */
-// public boolean hasHelpUI() {
-// return getHelpUI() != null;
-// }
-//}
+ getInstance().dispose();
+ // RAPEND: [bm]
+ }
+
+ /**
+ * Dispose of any resources allocated by this instance.
+ */
+ public void dispose() {
+ pluggableHelpUI = null;
+ helpCompatibilityWrapper = null;
+ isInitialized = false;
+ PlatformUI.getWorkbench().getExtensionTracker()
+ .unregisterHandler(handler);
+ }
+
+ /**
+ * Returns the help UI for the platform, if available. This method will
+ * initialize the help UI if necessary.
+ *
+ * @return the help UI, or <code>null</code> if none
+ */
+ private AbstractHelpUI getHelpUI() {
+ if (!isInitialized) {
+ isInitialized = initializePluggableHelpUI();
+ }
+ return pluggableHelpUI;
+ }
+
+ /**
+ * Initializes the pluggable help UI by getting an instance via the
+ * extension point.
+ */
+ private boolean initializePluggableHelpUI() {
+ final boolean[] ret = new boolean[] { false };
+
+ BusyIndicator.showWhile(Display.getCurrent(), new Runnable() {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.lang.Runnable#run()
+ */
+ public void run() {
+ // get the help UI extension from the registry
+ IExtensionPoint point = Platform.getExtensionRegistry()
+ .getExtensionPoint(HELP_SYSTEM_EXTENSION_ID);
+ if (point == null) {
+ // our extension point is missing (!) - act like there was
+ // no help UI
+ return;
+ }
+ IExtension[] extensions = point.getExtensions();
+ if (extensions.length == 0) {
+ // no help UI present
+ return;
+ }
+
+ IConfigurationElement elementToUse = null;
+ if (desiredHelpSystemId == null) {
+ elementToUse = getFirstElement(extensions);
+ } else {
+ elementToUse = findElement(desiredHelpSystemId, extensions);
+ }
+
+ if (elementToUse != null) {
+ ret[0] = initializePluggableHelpUI(elementToUse);
+ }
+ }
+
+ private IConfigurationElement findElement(
+ String desiredHelpSystemId, IExtension[] extensions) {
+ for (int i = 0; i < extensions.length; i++) {
+ IExtension extension = extensions[i];
+ if (desiredHelpSystemId.equals(extension.getUniqueIdentifier())) {
+ IConfigurationElement[] elements = extensions[0]
+ .getConfigurationElements();
+ if (elements.length == 0) {
+ // help UI present but mangled - act like there was
+ // no help
+ // UI
+ return null;
+ }
+ return elements[0];
+ }
+
+ }
+ return null;
+ }
+
+ private IConfigurationElement getFirstElement(
+ IExtension[] extensions) {
+ // There should only be one extension/config element so we just
+ // take the first
+ IConfigurationElement[] elements = extensions[0]
+ .getConfigurationElements();
+ if (elements.length == 0) {
+ // help UI present but mangled - act like there was no help
+ // UI
+ return null;
+ }
+ return elements[0];
+ }
+
+ private boolean initializePluggableHelpUI(
+ IConfigurationElement element) {
+ // Instantiate the help UI
+ try {
+ pluggableHelpUI = (AbstractHelpUI) WorkbenchPlugin
+ .createExtension(element,
+ HELP_SYSTEM_CLASS_ATTRIBUTE);
+ // start listening for removals
+ PlatformUI.getWorkbench().getExtensionTracker()
+ .registerHandler(handler, null);
+ // register the new help UI for removal notification
+ PlatformUI
+ .getWorkbench()
+ .getExtensionTracker()
+ .registerObject(element.getDeclaringExtension(),
+ pluggableHelpUI, IExtensionTracker.REF_WEAK);
+ return true;
+ } catch (CoreException e) {
+ WorkbenchPlugin.log(
+ "Unable to instantiate help UI" + e.getStatus(), e);//$NON-NLS-1$
+ }
+ return false;
+ }
+
+ });
+ return ret[0];
+ }
+
+ /**
+ * Determines the location for the help popup shell given the widget which
+ * orginated the request for help.
+ *
+ * @param display
+ * the display where the help will appear
+ */
+ private static Point computePopUpLocation(Display display) {
+ Point point = display.getCursorLocation();
+ return new Point(point.x + 15, point.y);
+ }
+
+ /**
+ * Returns the help listener which activates the help support system.
+ *
+ * @return the help listener
+ */
+ private HelpListener getHelpListener() {
+ if (helpListener == null) {
+ helpListener = new WorkbenchHelpListener();
+ }
+ return helpListener;
+ }
+
+ /**
+ * Returns the help support system for the platform, if available.
+ *
+ * @return the help support system, or <code>null</code> if none
+ * @deprecated Use the static methods on this class and on
+ * {@link org.eclipse.help.HelpSystem HelpSystem}instead of the
+ * IHelp methods on the object returned by this method.
+ */
+ public IHelp getHelpSupport() {
+ AbstractHelpUI helpUI = getHelpUI();
+ if (helpUI != null && helpCompatibilityWrapper == null) {
+ // create instance only once, and only if needed
+ helpCompatibilityWrapper = new CompatibilityIHelpImplementation();
+ }
+ return helpCompatibilityWrapper;
+
+ }
+
+ /**
+ * Sets the given help contexts on the given action.
+ * <p>
+ * Use this method when the list of help contexts is known in advance. Help
+ * contexts can either supplied as a static list, or calculated with a
+ * context computer (but not both).
+ * </p>
+ *
+ * @param action
+ * the action on which to register the computer
+ * @param contexts
+ * the contexts to use when F1 help is invoked; a mixed-type
+ * array of context ids (type <code>String</code>) and/or help
+ * contexts (type <code>IContext</code>)
+ * @deprecated use setHelp with a single context id parameter
+ */
+ public void setHelp(IAction action, final Object[] contexts) {
+ for (int i = 0; i < contexts.length; i++) {
+ Assert.isTrue(contexts[i] instanceof String
+ || contexts[i] instanceof IContext);
+ }
+ action.setHelpListener(new HelpListener() {
+ public void helpRequested(HelpEvent event) {
+ if (contexts != null && contexts.length > 0
+ && getHelpUI() != null) {
+ // determine the context
+ IContext context = null;
+ if (contexts[0] instanceof String) {
+ context = HelpSystem.getContext((String) contexts[0]);
+ } else if (contexts[0] instanceof IContext) {
+ context = (IContext) contexts[0];
+ }
+ if (context != null) {
+ Point point = computePopUpLocation(event.widget
+ .getDisplay());
+ displayContext(context, point.x, point.y);
+ }
+ }
+ }
+ });
+ }
+
+ /**
+ * Sets the given help context computer on the given action.
+ * <p>
+ * Use this method when the help contexts cannot be computed in advance.
+ * Help contexts can either supplied as a static list, or calculated with a
+ * context computer (but not both).
+ * </p>
+ *
+ * @param action
+ * the action on which to register the computer
+ * @param computer
+ * the computer to determine the help contexts for the control
+ * when F1 help is invoked
+ * @deprecated context computers are no longer supported, clients should
+ * implement their own help listener
+ */
+ public void setHelp(IAction action, final IContextComputer computer) {
+ action.setHelpListener(new HelpListener() {
+ public void helpRequested(HelpEvent event) {
+ Object[] helpContexts = computer.computeContexts(event);
+ if (helpContexts != null && helpContexts.length > 0
+ && getHelpUI() != null) {
+ // determine the context
+ IContext context = null;
+ if (helpContexts[0] instanceof String) {
+ context = HelpSystem
+ .getContext((String) helpContexts[0]);
+ } else if (helpContexts[0] instanceof IContext) {
+ context = (IContext) helpContexts[0];
+ }
+ if (context != null) {
+ Point point = computePopUpLocation(event.widget
+ .getDisplay());
+ displayContext(context, point.x, point.y);
+ }
+ }
+ }
+ });
+ }
+
+ /**
+ * Sets the given help contexts on the given control.
+ * <p>
+ * Use this method when the list of help contexts is known in advance. Help
+ * contexts can either supplied as a static list, or calculated with a
+ * context computer (but not both).
+ * </p>
+ *
+ * @param control
+ * the control on which to register the contexts
+ * @param contexts
+ * the contexts to use when F1 help is invoked; a mixed-type
+ * array of context ids (type <code>String</code>) and/or help
+ * contexts (type <code>IContext</code>)
+ * @deprecated use setHelp with single context id parameter
+ */
+ public void setHelp(Control control, Object[] contexts) {
+ for (int i = 0; i < contexts.length; i++) {
+ Assert.isTrue(contexts[i] instanceof String
+ || contexts[i] instanceof IContext);
+ }
+
+ control.setData(HELP_KEY, contexts);
+ // ensure that the listener is only registered once
+ control.removeHelpListener(getHelpListener());
+ control.addHelpListener(getHelpListener());
+ }
+
+ /**
+ * Sets the given help context computer on the given control.
+ * <p>
+ * Use this method when the help contexts cannot be computed in advance.
+ * Help contexts can either supplied as a static list, or calculated with a
+ * context computer (but not both).
+ * </p>
+ *
+ * @param control
+ * the control on which to register the computer
+ * @param computer
+ * the computer to determine the help contexts for the control
+ * when F1 help is invoked
+ * @deprecated context computers are no longer supported, clients should
+ * implement their own help listener
+ */
+ public void setHelp(Control control, IContextComputer computer) {
+ control.setData(HELP_KEY, computer);
+ // ensure that the listener is only registered once
+ control.removeHelpListener(getHelpListener());
+ control.addHelpListener(getHelpListener());
+ }
+
+ /**
+ * Sets the given help contexts on the given menu.
+ * <p>
+ * Use this method when the list of help contexts is known in advance. Help
+ * contexts can either supplied as a static list, or calculated with a
+ * context computer (but not both).
+ * </p>
+ *
+ * @param menu
+ * the menu on which to register the context
+ * @param contexts
+ * the contexts to use when F1 help is invoked; a mixed-type
+ * array of context ids (type <code>String</code>) and/or help
+ * contexts (type <code>IContext</code>)
+ * @deprecated use setHelp with single context id parameter
+ */
+ public void setHelp(Menu menu, Object[] contexts) {
+ for (int i = 0; i < contexts.length; i++) {
+ Assert.isTrue(contexts[i] instanceof String
+ || contexts[i] instanceof IContext);
+ }
+ menu.setData(HELP_KEY, contexts);
+ // ensure that the listener is only registered once
+ menu.removeHelpListener(getHelpListener());
+ menu.addHelpListener(getHelpListener());
+ }
+
+ /**
+ * Sets the given help context computer on the given menu.
+ * <p>
+ * Use this method when the help contexts cannot be computed in advance.
+ * Help contexts can either supplied as a static list, or calculated with a
+ * context computer (but not both).
+ * </p>
+ *
+ * @param menu
+ * the menu on which to register the computer
+ * @param computer
+ * the computer to determine the help contexts for the control
+ * when F1 help is invoked
+ * @deprecated context computers are no longer supported, clients should
+ * implement their own help listener
+ */
+ public void setHelp(Menu menu, IContextComputer computer) {
+ menu.setData(HELP_KEY, computer);
+ // ensure that the listener is only registered once
+ menu.removeHelpListener(getHelpListener());
+ menu.addHelpListener(getHelpListener());
+ }
+
+ /**
+ * Sets the given help contexts on the given menu item.
+ * <p>
+ * Use this method when the list of help contexts is known in advance. Help
+ * contexts can either supplied as a static list, or calculated with a
+ * context computer (but not both).
+ * </p>
+ *
+ * @param item
+ * the menu item on which to register the context
+ * @param contexts
+ * the contexts to use when F1 help is invoked; a mixed-type
+ * array of context ids (type <code>String</code>) and/or help
+ * contexts (type <code>IContext</code>)
+ * @deprecated use setHelp with single context id parameter
+ */
+ public void setHelp(MenuItem item, Object[] contexts) {
+ for (int i = 0; i < contexts.length; i++) {
+ Assert.isTrue(contexts[i] instanceof String
+ || contexts[i] instanceof IContext);
+ }
+ item.setData(HELP_KEY, contexts);
+ // ensure that the listener is only registered once
+ item.removeHelpListener(getHelpListener());
+ item.addHelpListener(getHelpListener());
+ }
+
+ /**
+ * Sets the given help context computer on the given menu item.
+ * <p>
+ * Use this method when the help contexts cannot be computed in advance.
+ * Help contexts can either supplied as a static list, or calculated with a
+ * context computer (but not both).
+ * </p>
+ *
+ * @param item
+ * the menu item on which to register the computer
+ * @param computer
+ * the computer to determine the help contexts for the control
+ * when F1 help is invoked
+ * @deprecated context computers are no longer supported, clients should
+ * implement their own help listener
+ */
+ public void setHelp(MenuItem item, IContextComputer computer) {
+ item.setData(HELP_KEY, computer);
+ // ensure that the listener is only registered once
+ item.removeHelpListener(getHelpListener());
+ item.addHelpListener(getHelpListener());
+ }
+
+ /**
+ * Creates a new help listener for the given command. This retrieves the
+ * help context ID from the command, and creates an appropriate listener
+ * based on this.
+ *
+ * @param command
+ * The command for which the listener should be created; must
+ * not be <code>null</code>.
+ * @return A help listener; never <code>null</code>.
+ */
+ public HelpListener createHelpListener(ICommand command) {
+ // TODO Need a help ID from the context
+ // final String contextId = command.getHelpId();
+ final String contextId = ""; //$NON-NLS-1$
+ return new HelpListener() {
+ public void helpRequested(HelpEvent event) {
+ if (getHelpUI() != null) {
+ IContext context = HelpSystem.getContext(contextId);
+ if (context != null) {
+ Point point = computePopUpLocation(event.widget
+ .getDisplay());
+ displayContext(context, point.x, point.y);
+ }
+ }
+ }
+ };
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.help.IWorkbenchHelpSystem#displayHelp()
+ */
+ public void displayHelp() {
+ AbstractHelpUI helpUI = getHelpUI();
+ if (helpUI != null) {
+ helpUI.displayHelp();
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.help.IWorkbenchHelpSystem#displaySearch()
+ */
+ public void displaySearch() {
+ AbstractHelpUI helpUI = getHelpUI();
+ if (helpUI != null) {
+ helpUI.displaySearch();
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.help.IWorkbenchHelpSystem#displaySearch()
+ */
+ public void displayDynamicHelp() {
+ AbstractHelpUI helpUI = getHelpUI();
+ if (helpUI != null) {
+ helpUI.displayDynamicHelp();
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.help.IWorkbenchHelpSystem#search(java.lang.String)
+ */
+ public void search(String expression) {
+ AbstractHelpUI helpUI = getHelpUI();
+ if (helpUI != null) {
+ helpUI.search(expression);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.help.IWorkbenchHelpSystem#resolve(java.lang.String, boolean)
+ */
+ public URL resolve(String href, boolean documentOnly) {
+ AbstractHelpUI helpUI = getHelpUI();
+ if (helpUI != null) {
+ return helpUI.resolve(href, documentOnly);
+ }
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.help.IWorkbenchHelpSystem#displayContext(org.eclipse.help.IContext,
+ * int, int)
+ */
+ public void displayContext(IContext context, int x, int y) {
+ if (context == null) {
+ throw new IllegalArgumentException();
+ }
+ AbstractHelpUI helpUI = getHelpUI();
+ if (helpUI != null) {
+ helpUI.displayContext(context, x, y);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.help.IWorkbenchHelpSystem#displayHelpResource(java.lang.String)
+ */
+ public void displayHelpResource(String href) {
+ if (href == null) {
+ throw new IllegalArgumentException();
+ }
+ AbstractHelpUI helpUI = getHelpUI();
+ if (helpUI != null) {
+ helpUI.displayHelpResource(href);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.help.IWorkbenchHelpSystem#displayHelp(java.lang.String)
+ */
+ public void displayHelp(String contextId) {
+ IContext context = HelpSystem.getContext(contextId);
+ if (context != null) {
+ Point point = computePopUpLocation(Display.getCurrent());
+ displayContext(context, point.x, point.y);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.help.IWorkbenchHelpSystem#displayHelp(org.eclipse.help.IContext)
+ */
+ public void displayHelp(IContext context) {
+ Point point = computePopUpLocation(Display.getCurrent());
+ AbstractHelpUI helpUI = getHelpUI();
+ if (helpUI != null) {
+ helpUI.displayContext(context, point.x, point.y);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.help.IWorkbenchHelpSystem#isContextHelpDisplayed()
+ */
+ public boolean isContextHelpDisplayed() {
+ if (!isInitialized) {
+ return false;
+ }
+ AbstractHelpUI helpUI = getHelpUI();
+ return helpUI != null && helpUI.isContextHelpDisplayed();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.help.IWorkbenchHelpSystem#setHelp(org.eclipse.jface.action.IAction,
+ * java.lang.String)
+ */
+ public void setHelp(final IAction action, final String contextId) {
+ action.setHelpListener(new HelpListener() {
+ public void helpRequested(HelpEvent event) {
+ if (getHelpUI() != null) {
+ IContext context = HelpSystem.getContext(contextId);
+ if (context != null) {
+ Point point = computePopUpLocation(event.widget
+ .getDisplay());
+ displayContext(new ContextWithTitle(context, action.getText()), point.x, point.y);
+ }
+ }
+ }
+ });
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.help.IWorkbenchHelpSystem#setHelp(org.eclipse.swt.widgets.Control,
+ * java.lang.String)
+ */
+ public void setHelp(Control control, String contextId) {
+ control.setData(HELP_KEY, contextId);
+ // ensure that the listener is only registered once
+ control.removeHelpListener(getHelpListener());
+ control.addHelpListener(getHelpListener());
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.help.IWorkbenchHelpSystem#setHelp(org.eclipse.swt.widgets.Menu,
+ * java.lang.String)
+ */
+ public void setHelp(Menu menu, String contextId) {
+ menu.setData(HELP_KEY, contextId);
+ // ensure that the listener is only registered once
+ menu.removeHelpListener(getHelpListener());
+ menu.addHelpListener(getHelpListener());
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.help.IWorkbenchHelpSystem#setHelp(org.eclipse.swt.widgets.MenuItem,
+ * java.lang.String)
+ */
+ public void setHelp(MenuItem item, String contextId) {
+ item.setData(HELP_KEY, contextId);
+ // ensure that the listener is only registered once
+ item.removeHelpListener(getHelpListener());
+ item.addHelpListener(getHelpListener());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.help.IWorkbenchHelpSystem#hasHelpUI()
+ */
+ public boolean hasHelpUI() {
+ return getHelpUI() != null;
+ }
+}
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/LegacyActionPersistence.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/LegacyActionPersistence.java
index 8932e23886..b3e70e356a 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/LegacyActionPersistence.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/LegacyActionPersistence.java
@@ -542,12 +542,10 @@ public final class LegacyActionPersistence extends RegistryPersistence {
enabledWhenExpression, viewId);
// Read the help context id.
- // RAP [bm]: Help
-// final String helpContextId = readOptional(element, ATT_HELP_CONTEXT_ID);
-// if (helpContextId != null) {
-// commandService.setHelpContextId(handler, helpContextId);
-// }
- // RAPEND: [bm]
+ final String helpContextId = readOptional(element, ATT_HELP_CONTEXT_ID);
+ if (helpContextId != null) {
+ commandService.setHelpContextId(handler, helpContextId);
+ }
// Activate the handler.
final String commandId = command.getId();
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/DetailedProgressViewer.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/DetailedProgressViewer.java
index 1c8bd01dbb..13e2caefa9 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/DetailedProgressViewer.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/DetailedProgressViewer.java
@@ -30,6 +30,8 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Widget;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
/**
* The DetailedProgressViewer is a viewer that shows the details of all in
@@ -110,9 +112,8 @@ public class DetailedProgressViewer extends AbstractProgressViewer {
}
});
-// RAP [fappel]: help system not available
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(control,
-// IWorkbenchHelpContextIds.RESPONSIVE_UI);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(control,
+ IWorkbenchHelpContextIds.RESPONSIVE_UI);
scrolled.setContent(control);
hookControl(control);
@@ -129,9 +130,8 @@ public class DetailedProgressViewer extends AbstractProgressViewer {
noEntryLabel.setEditable(false);
-// RAP [fappel]: help system not available
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(noEntryLabel,
-// IWorkbenchHelpContextIds.RESPONSIVE_UI);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(noEntryLabel,
+ IWorkbenchHelpContextIds.RESPONSIVE_UI);
}
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressView.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressView.java
index c66de370a7..fb232a54f8 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressView.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressView.java
@@ -10,13 +10,24 @@
*******************************************************************************/
package org.eclipse.ui.internal.progress;
-import org.eclipse.jface.action.*;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.*;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Menu;
-import org.eclipse.ui.*;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.WorkbenchImages;
import org.eclipse.ui.part.ViewPart;
import org.eclipse.ui.preferences.ViewPreferencesAction;
@@ -48,9 +59,8 @@ public class ProgressView extends ViewPart implements IViewPart {
// viewer.getControl().setLayoutData(
// new GridData(SWT.FILL, SWT.FILL, true, true));
-// RAP [fappel]: help system not supported
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
-// IWorkbenchHelpContextIds.RESPONSIVE_UI);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
+ IWorkbenchHelpContextIds.RESPONSIVE_UI);
initContentProvider();
createClearAllAction();
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/menus/CommandContributionItem.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/menus/CommandContributionItem.java
index e21d78ff1f..c69c5b2fe1 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/menus/CommandContributionItem.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/menus/CommandContributionItem.java
@@ -38,12 +38,14 @@ import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.swt.widgets.ToolBar;
import org.eclipse.swt.widgets.ToolItem;
import org.eclipse.swt.widgets.Widget;
+import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.commands.ICommandImageService;
import org.eclipse.ui.commands.ICommandService;
import org.eclipse.ui.commands.IElementReference;
import org.eclipse.ui.handlers.IHandlerService;
+import org.eclipse.ui.help.IWorkbenchHelpSystem;
import org.eclipse.ui.internal.WorkbenchPlugin;
import org.eclipse.ui.services.IServiceLocator;
@@ -127,11 +129,9 @@ public final class CommandContributionItem extends ContributionItem {
private String dropDownMenuOverride;
- // RAP [bm]: Helpsystem
-// private IWorkbenchHelpSystem workbenchHelpSystem;
+ private IWorkbenchHelpSystem workbenchHelpSystem;
-// private String helpContextId;
- // RAPEND: [bm]
+ private String helpContextId;
private int mode = 0;
@@ -160,8 +160,7 @@ public final class CommandContributionItem extends ContributionItem {
this.mnemonic = contributionParameters.mnemonic;
this.tooltip = contributionParameters.tooltip;
this.style = contributionParameters.style;
- // RAP [bm]:
-// this.helpContextId = contributionParameters.helpContextId;
+ this.helpContextId = contributionParameters.helpContextId;
this.visibleEnabled = contributionParameters.visibleEnabled;
this.mode = contributionParameters.mode;
@@ -216,21 +215,19 @@ public final class CommandContributionItem extends ContributionItem {
setImages(contributionParameters.serviceLocator,
contributionParameters.iconStyle);
- // RAP [bm]: HelpSystem
-// if (contributionParameters.helpContextId == null) {
-// try {
-// this.helpContextId = commandService
-// .getHelpContextId(contributionParameters.commandId);
-// } catch (NotDefinedException e) {
-// // it's OK to not have a helpContextId
-// }
-// }
-// IWorkbench workbench = (IWorkbench) contributionParameters.serviceLocator
-// .getService(IWorkbench.class);
-// if (workbench != null && helpContextId != null) {
-// this.workbenchHelpSystem = workbench.getHelpSystem();
-// }
- // RAPEND: [bm]
+ if (contributionParameters.helpContextId == null) {
+ try {
+ this.helpContextId = commandService
+ .getHelpContextId(contributionParameters.commandId);
+ } catch (NotDefinedException e) {
+ // it's OK to not have a helpContextId
+ }
+ }
+ IWorkbench workbench = (IWorkbench) contributionParameters.serviceLocator
+ .getService(IWorkbench.class);
+ if (workbench != null && helpContextId != null) {
+ this.workbenchHelpSystem = workbench.getHelpSystem();
+ }
} catch (NotDefinedException e) {
WorkbenchPlugin
.log("Unable to register menu item \"" + getId() //$NON-NLS-1$
@@ -388,11 +385,9 @@ public final class CommandContributionItem extends ContributionItem {
item = new MenuItem(parent, tmpStyle);
}
item.setData(this);
- // RAP [bm]: HelpSystem
-// if (workbenchHelpSystem != null) {
-// workbenchHelpSystem.setHelp(item, helpContextId);
-// }
- // RAPEND: [bm]
+ if (workbenchHelpSystem != null) {
+ workbenchHelpSystem.setHelp(item, helpContextId);
+ }
item.addListener(SWT.Dispose, getItemListener());
item.addListener(SWT.Selection, getItemListener());
@@ -656,11 +651,9 @@ public final class CommandContributionItem extends ContributionItem {
final MenuManager menuManager = new MenuManager();
Menu menu = menuManager.createContextMenu(ti.getParent());
- // RAP [bm]: HelpSystem
-// if (workbenchHelpSystem != null) {
-// workbenchHelpSystem.setHelp(menu, helpContextId);
-// }
- // RAPEND: [bm]
+ if (workbenchHelpSystem != null) {
+ workbenchHelpSystem.setHelp(menu, helpContextId);
+ }
menuManager.addMenuListener(new IMenuListener() {
public void menuAboutToShow(IMenuManager manager) {
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/part/CellEditorActionHandler.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/part/CellEditorActionHandler.java
index 7df0e1e979..105005ddba 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/part/CellEditorActionHandler.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/part/CellEditorActionHandler.java
@@ -24,9 +24,9 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.ui.IActionBars;
-//import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.ActionFactory;
-//import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.WorkbenchMessages;
/**
@@ -214,8 +214,7 @@ public class CellEditorActionHandler {
protected CutActionHandler() {
setId("CellEditorCutActionHandler");//$NON-NLS-1$
setEnabled(false);
-// RAP [rh] help system missing
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IWorkbenchHelpContextIds.CELL_CUT_ACTION);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IWorkbenchHelpContextIds.CELL_CUT_ACTION);
}
public void runWithEvent(Event event) {
@@ -246,8 +245,7 @@ public class CellEditorActionHandler {
protected CopyActionHandler() {
setId("CellEditorCopyActionHandler");//$NON-NLS-1$
setEnabled(false);
-// RAP [rh] help system missing
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IWorkbenchHelpContextIds.CELL_COPY_ACTION);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IWorkbenchHelpContextIds.CELL_COPY_ACTION);
}
public void runWithEvent(Event event) {
@@ -278,8 +276,7 @@ public class CellEditorActionHandler {
protected PasteActionHandler() {
setId("CellEditorPasteActionHandler");//$NON-NLS-1$
setEnabled(false);
-// RAP [rh] help system missing
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IWorkbenchHelpContextIds.CELL_PASTE_ACTION);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IWorkbenchHelpContextIds.CELL_PASTE_ACTION);
}
public void runWithEvent(Event event) {
@@ -310,8 +307,7 @@ public class CellEditorActionHandler {
protected DeleteActionHandler() {
setId("CellEditorDeleteActionHandler");//$NON-NLS-1$
setEnabled(false);
-// RAP [rh] help system missing
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IWorkbenchHelpContextIds.CELL_DELETE_ACTION);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IWorkbenchHelpContextIds.CELL_DELETE_ACTION);
}
public void runWithEvent(Event event) {
@@ -342,8 +338,7 @@ public class CellEditorActionHandler {
protected SelectAllActionHandler() {
setId("CellEditorSelectAllActionHandler");//$NON-NLS-1$
setEnabled(false);
-// RAP [rh] help system missing
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IWorkbenchHelpContextIds.CELL_SELECT_ALL_ACTION);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IWorkbenchHelpContextIds.CELL_SELECT_ALL_ACTION);
}
public void runWithEvent(Event event) {
@@ -374,8 +369,7 @@ public class CellEditorActionHandler {
protected FindActionHandler() {
setId("CellEditorFindActionHandler");//$NON-NLS-1$
setEnabled(false);
-// RAP [rh] help system missing
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IWorkbenchHelpContextIds.CELL_FIND_ACTION);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IWorkbenchHelpContextIds.CELL_FIND_ACTION);
}
public void runWithEvent(Event event) {
@@ -406,8 +400,7 @@ public class CellEditorActionHandler {
protected UndoActionHandler() {
setId("CellEditorUndoActionHandler");//$NON-NLS-1$
setEnabled(false);
-// RAP [rh] help system missing
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IWorkbenchHelpContextIds.CELL_UNDO_ACTION);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IWorkbenchHelpContextIds.CELL_UNDO_ACTION);
}
public void runWithEvent(Event event) {
@@ -442,8 +435,7 @@ public class CellEditorActionHandler {
protected RedoActionHandler() {
setId("CellEditorRedoActionHandler");//$NON-NLS-1$
setEnabled(false);
-// RAP [rh] help system missing
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IWorkbenchHelpContextIds.CELL_REDO_ACTION);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IWorkbenchHelpContextIds.CELL_REDO_ACTION);
}
public void runWithEvent(Event event) {
diff --git a/bundles/org.eclipse.rap.ui.workbench/META-INF/MANIFEST.MF b/bundles/org.eclipse.rap.ui.workbench/META-INF/MANIFEST.MF
index fe3a6086cf..7007158456 100755
--- a/bundles/org.eclipse.rap.ui.workbench/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.rap.ui.workbench/META-INF/MANIFEST.MF
@@ -96,6 +96,7 @@ Export-Package: org.eclipse.rap.ui.branding,
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)";visibility:=reexport,
org.eclipse.rap.jface;bundle-version="[1.2.0,2.0.0)",
org.eclipse.rap.rwt;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.rap.help;bundle-version="[1.3.0,2.0.0)",
org.eclipse.core.expressions;bundle-version="[3.2.0,4.0.0)",
org.eclipse.rap.jface.databinding;bundle-version="[1.2.0,2.0.0)";resolution:=optional,
org.eclipse.core.databinding;bundle-version="[1.1.0,2.0.0)";resolution:=optional,
diff --git a/bundles/org.eclipse.rap.ui/plugin.xml b/bundles/org.eclipse.rap.ui/plugin.xml
index 39769ea13f..1c9adbcaaf 100755
--- a/bundles/org.eclipse.rap.ui/plugin.xml
+++ b/bundles/org.eclipse.rap.ui/plugin.xml
@@ -45,9 +45,7 @@
<!-- RAP [bm] deprecated
<extension-point id="org.eclipse.ui.fontDefinitions" name="%ExtPoint.fontDefinitions" schema="schema/fontDefinitions.exsd"/>
-->
- <!-- RAP [bm] help
<extension-point id="org.eclipse.ui.helpSupport" name="%ExtPoint.helpSupport" schema="schema/helpSupport.exsd"/>
- -->
<extension-point id="org.eclipse.ui.importWizards" name="%ExtPoint.importWizards" schema="schema/importWizards.exsd"/>
<extension-point id="org.eclipse.ui.intro" name="%ExtPoint.intro" schema="schema/intro.exsd"/>
<extension-point id="org.eclipse.ui.keywords" name="%ExtPoint.keywords" schema="schema/keywords.exsd"/>
@@ -1110,7 +1108,6 @@
optional="true">
</commandParameter>
</command>
- <!-- RAP [bm] HelpSystem
<command
defaultHandler="org.eclipse.ui.internal.handlers.DisplayHelpHandler"
description="%command.displayHelp.description"
@@ -1122,7 +1119,6 @@
name="%command.displayHelp.hrefParameter"
optional="true"/>
</command>
- -->
<command
categoryId="org.eclipse.ui.category.file"
description="%command.closeOthers.description"
diff --git a/bundles/org.eclipse.rap.ui/schema/commands.exsd b/bundles/org.eclipse.rap.ui/schema/commands.exsd
index 89d6070d6f..7172e4bc68 100755
--- a/bundles/org.eclipse.rap.ui/schema/commands.exsd
+++ b/bundles/org.eclipse.rap.ui/schema/commands.exsd
@@ -18,11 +18,11 @@ The &lt;code&gt;org.eclipse.ui.commands&lt;/code&gt; extension point is used to
<element ref="category" minOccurs="0" maxOccurs="unbounded"/>
<element ref="command" minOccurs="0" maxOccurs="unbounded"/>
<element ref="commandParameterType" minOccurs="0" maxOccurs="unbounded"/>
- <element ref="keyBinding" minOccurs="0" maxOccurs="unbounded"/>
- <element ref="keyConfiguration" minOccurs="0" maxOccurs="unbounded"/>
+ <!--element ref="keyBinding" minOccurs="0" maxOccurs="unbounded"/ -->
+ <!--<element ref="keyConfiguration" minOccurs="0" maxOccurs="unbounded"/-->
<element ref="context" minOccurs="0" maxOccurs="unbounded"/>
<element ref="scope" minOccurs="0" maxOccurs="unbounded"/>
- <element ref="activeKeyConfiguration" minOccurs="0" maxOccurs="1"/>
+ <!--<element ref="activeKeyConfiguration" minOccurs="0" maxOccurs="1"/-->
</sequence>
<attribute name="id" type="string">
<annotation>

Back to the top