diff options
author | Chris Goldthorpe | 2011-09-21 18:23:06 +0000 |
---|---|---|
committer | Chris Goldthorpe | 2011-09-21 18:23:06 +0000 |
commit | b6e6b5b2dc48bc43b8fdbebae97ab06eb810c038 (patch) | |
tree | 5469e3c746149fae7c82f4c3f70ae8fa5b85f5c7 /org.eclipse.help.ui/src | |
parent | 1da5474857f78280aa9dd5e70399af518be312f8 (diff) | |
download | eclipse.platform.ua-b6e6b5b2dc48bc43b8fdbebae97ab06eb810c038.tar.gz eclipse.platform.ua-b6e6b5b2dc48bc43b8fdbebae97ab06eb810c038.tar.xz eclipse.platform.ua-b6e6b5b2dc48bc43b8fdbebae97ab06eb810c038.zip |
Bug 353140 - [Help] Handle situation where documentation is not
installed
Diffstat (limited to 'org.eclipse.help.ui/src')
9 files changed, 282 insertions, 71 deletions
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/IHelpUIConstants.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/IHelpUIConstants.java index a6f1a5c29..dbeae8518 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/IHelpUIConstants.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/IHelpUIConstants.java @@ -73,7 +73,8 @@ public interface IHelpUIConstants { public static final String HV_BROWSER_PAGE = "browser-page"; //$NON-NLS-1$ public static final String HV_RELATED_TOPICS = "related-topics"; //$NON-NLS-1$ public static final String HV_CONTEXT_HELP_PAGE = "context-help-page"; //$NON-NLS-1$ - + public static final String HV_MISSING_CONTENT = "missing-content"; //$NON-NLS-1$ + public static final String HV_INDEX = "index"; //$NON-NLS-1$ public static final String HV_INDEX_TYPEIN = "index-typein"; //$NON-NLS-1$ public static final String HV_INDEX_PAGE = "index-page"; //$NON-NLS-1$ diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/Messages.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/Messages.java index 96ec41590..d366db497 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/Messages.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/Messages.java @@ -43,6 +43,7 @@ public final class Messages extends NLS { public static String ReusableHelpPart_bookmarkAction_label; public static String ReusableHelpPart_status; public static String ReusableHelpPart_indexPage_name; + public static String ReusableHelpPart_missingContent; public static String HelpView_defaultText; public static String expression; public static String expression_label; diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/Messages.properties b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/Messages.properties index 027531ba3..2090e1eda 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/Messages.properties +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/Messages.properties @@ -46,6 +46,7 @@ ReusableHelpPart_bookmarkAction_label=&Add Bookmark ReusableHelpPart_internalBrowserTitle=Help ReusableHelpPart_status = {0} - {1} ReusableHelpPart_indexPage_name=Index +ReusableHelpPart_missingContent=Additional help content available HelpView_defaultText=Click on any workbench part to show related help topics. diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/BrowserPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/BrowserPart.java index 4be56d97c..f1690bd10 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/BrowserPart.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/BrowserPart.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2010 IBM Corporation and others. + * Copyright (c) 2000, 2011 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 @@ -17,6 +17,7 @@ import java.util.StringTokenizer; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.preferences.IEclipsePreferences; +import org.eclipse.core.runtime.preferences.IScopeContext; import org.eclipse.core.runtime.preferences.InstanceScope; import org.eclipse.help.internal.base.BaseHelpSystem; import org.eclipse.help.internal.base.HelpBasePlugin; @@ -246,7 +247,7 @@ public class BrowserPart extends AbstractFormPart implements IHelpPart { highlightAction = new Action() { public void run() { - InstanceScope instanceScope = new InstanceScope(); + IScopeContext instanceScope = InstanceScope.INSTANCE; IEclipsePreferences prefs = instanceScope.getNode(HelpBasePlugin.PLUGIN_ID); prefs.putBoolean(HIGHLIGHT_ON, highlightAction.isChecked()); if (browser.getUrl().indexOf("resultof")!=-1) browser.execute("setHighlight(" +highlightAction.isChecked()+");"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ @@ -409,13 +410,14 @@ public class BrowserPart extends AbstractFormPart implements IHelpPart { private boolean redirectLink(final String url) { if (url.indexOf("/topic/") != -1) { //$NON-NLS-1$ if (url.indexOf("noframes") == -1) { //$NON-NLS-1$ - // char sep = url.lastIndexOf('?') != -1 ? '&' : '?'; - // String newURL = url + sep + "noframes=true"; //$NON-NLS-1$ return true; } } else if (url.indexOf("livehelp/?pluginID=")>0) { //$NON-NLS-1$ processLiveAction(url); return true; + } else if (url.indexOf("helpview:") == 0) { //$NON-NLS-1$ + HelpviewProtocol.handleProtocolCall(url, parent); + return true; } return false; } @@ -482,7 +484,7 @@ public class BrowserPart extends AbstractFormPart implements IHelpPart { private void doMagnify(int percent) { fontScalePercentage += percent; - InstanceScope instanceScope = new InstanceScope(); + IScopeContext instanceScope = InstanceScope.INSTANCE; IEclipsePreferences prefs = instanceScope.getNode(HelpBasePlugin.PLUGIN_ID); prefs.putInt(HELP_VIEW_SCALE, fontScalePercentage); try { diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HelpviewProtocol.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HelpviewProtocol.java new file mode 100644 index 000000000..6869af147 --- /dev/null +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HelpviewProtocol.java @@ -0,0 +1,38 @@ +/******************************************************************************* + * Copyright (c) 2011 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.help.ui.internal.views; + +import org.eclipse.help.internal.base.MissingContentManager; + +/** + * The helpview: protocol is used as a way to create hyperlinks which perform specific functions within the help view. + */ + +public class HelpviewProtocol { + public static final String HELPVIEW_PROTOCOL = "helpview:"; //$NON-NLS-1$ + public static final String CHECK_REMOTE_STATUS = "checkremote"; //$NON-NLS-1$ + public static final String IGNORE_MISSING_BOOKS = "ignoreMissingBooks"; //$NON-NLS-1$ + + public static void handleProtocolCall(String url, ReusableHelpPart part) { + int index = url.indexOf(HELPVIEW_PROTOCOL); + if (index == -1) { + return; + } + String command = url.substring(index + HELPVIEW_PROTOCOL.length()); + if ( command.equals(CHECK_REMOTE_STATUS) ) { + part.checkRemoteStatus(); + } + if ( command.equals(IGNORE_MISSING_BOOKS)) { + MissingContentManager.getInstance().ignoreAllMissingPlaceholders(); + part.checkPlaceholderStatus(); + } + } +} diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/IgnoreMissingPlaceholderHandler.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/IgnoreMissingPlaceholderHandler.java new file mode 100644 index 000000000..e243632c9 --- /dev/null +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/IgnoreMissingPlaceholderHandler.java @@ -0,0 +1,27 @@ +/*******************************************************************************
+ * Copyright (c) 2011 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.help.ui.internal.views;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.help.internal.base.MissingContentManager;
+
+
+public class IgnoreMissingPlaceholderHandler extends AbstractHandler {
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ MissingContentManager.getInstance().ignoreAllMissingPlaceholders();
+ return null;
+ }
+
+}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/MissingContentPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/MissingContentPart.java new file mode 100644 index 000000000..de0cc5a16 --- /dev/null +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/MissingContentPart.java @@ -0,0 +1,165 @@ +/******************************************************************************* + * Copyright (c) 2011 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.help.ui.internal.views; + +import org.eclipse.help.internal.base.MissingContentManager; +import org.eclipse.help.internal.base.remote.RemoteStatusData; +import org.eclipse.help.ui.internal.Messages; +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.action.IMenuManager; +import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.jface.resource.JFaceResources; +import org.eclipse.swt.SWT; +import org.eclipse.swt.graphics.Image; +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.ui.IMemento; +import org.eclipse.ui.forms.AbstractFormPart; +import org.eclipse.ui.forms.events.HyperlinkAdapter; +import org.eclipse.ui.forms.events.HyperlinkEvent; +import org.eclipse.ui.forms.widgets.FormToolkit; +import org.eclipse.ui.forms.widgets.ImageHyperlink; + +public class MissingContentPart extends AbstractFormPart implements IHelpPart { + + private Composite container; + private String id; + private ReusableHelpPart helpPart; + private ImageHyperlink statusLink; + private boolean wasRemoteHelpUnavailable = false; + private boolean wasUnresolvedPlaceholders = false; + + public MissingContentPart(Composite parent, FormToolkit toolkit) { + container = toolkit.createComposite(parent, SWT.NULL); + container.setBackgroundMode(SWT.INHERIT_DEFAULT); + GridLayout layout = new GridLayout(); + layout.marginHeight = 0; + layout.verticalSpacing = 0; + layout.marginTop = 2; + container.setLayout(layout); + updateStatus(); + } + + public void updateStatus() { + // Only update the controls if the status has changed + boolean isRemoteHelpUnavailable = RemoteStatusData.isAnyRemoteHelpUnavailable(); + if ( isRemoteHelpUnavailable && wasRemoteHelpUnavailable) { + return; // Nothing to do, remote help unavailable message already showing + } + boolean isUnresolvedPlaceholders = MissingContentManager.getInstance().isUnresolvedPlaceholders(); + if ( isRemoteHelpUnavailable == wasRemoteHelpUnavailable && isUnresolvedPlaceholders == wasUnresolvedPlaceholders ) { + return; + } + disposeLink(); + wasRemoteHelpUnavailable = isRemoteHelpUnavailable; + wasUnresolvedPlaceholders = isUnresolvedPlaceholders; + FormToolkit toolkit = new FormToolkit(container.getDisplay()); + if ( isRemoteHelpUnavailable ) { + createHelpMissingLink(container, toolkit, Dialog.DLG_IMG_MESSAGE_WARNING, Messages.remoteHelpUnavailable, + MissingContentManager.getInstance().getRemoteHelpUnavailablePage(true), true); + } else if ( isUnresolvedPlaceholders) { + createHelpMissingLink(container, toolkit, Dialog.DLG_IMG_MESSAGE_INFO, Messages.ReusableHelpPart_missingContent, + MissingContentManager.getInstance().getHelpMissingPage(true), false); + } + toolkit.dispose(); + } + + private void createHelpMissingLink(Composite container, FormToolkit toolkit, String imageKey, String linkText, String linkTarget, boolean isRemoteUnavailableLink) { + final String target = linkTarget; + final boolean isRemote = isRemoteUnavailableLink; + Composite padding = new Composite(container, SWT.NULL); + GridData paddingData = new GridData(); + paddingData.heightHint = 2; + padding.setLayoutData(paddingData); + toolkit.adapt(padding); + Image warningImage = JFaceResources.getImage(imageKey); + statusLink = toolkit.createImageHyperlink(container, SWT.NULL); + statusLink.setText(linkText); + statusLink.setImage(warningImage); + statusLink.addHyperlinkListener(new HyperlinkAdapter() { + public void linkActivated(HyperlinkEvent e) { + helpPart.showURL(target); + if ( isRemote ) { + helpPart.checkRemoteStatus(); + } else { + helpPart.checkPlaceholderStatus(); + } + } + }); + GridData statusData = new GridData(GridData.BEGINNING, GridData.CENTER, false, false); + statusLink.setLayoutData(statusData); + } + + private void disposeLink() { + if (statusLink != null) { + statusLink.dispose(); + } + statusLink = null; + } + + public void setSubsequentPage(String subsequentPage) { + + } + + public void init(ReusableHelpPart parent, String id, IMemento memento) { + this.id = id; + this.helpPart = parent; + } + + public void saveState(IMemento memento) { + } + + public Control getControl() { + return container; + } + + public String getId() { + return id; + } + + public void setVisible(boolean visible) { + if (container != null) { + container.setVisible(visible); + } + } + + public boolean hasFocusControl(Control control) { + return false; + } + + public boolean fillContextMenu(IMenuManager manager) { + return false; + } + + public IAction getGlobalAction(String id) { + return null; + } + + public void stop() { + + } + + public void toggleRoleFilter() { + + } + + public void refilter() { + + } + + public void dispose() { + disposeLink(); + } + +} diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ReusableHelpPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ReusableHelpPart.java index 4d6b1e20e..1951c74c5 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ReusableHelpPart.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ReusableHelpPart.java @@ -33,6 +33,7 @@ import org.eclipse.help.internal.base.BaseHelpSystem; import org.eclipse.help.internal.base.HelpBasePlugin; import org.eclipse.help.internal.base.HelpEvaluationContext; import org.eclipse.help.internal.base.IHelpBaseConstants; +import org.eclipse.help.internal.base.MissingContentManager; import org.eclipse.help.internal.base.util.LinkUtil; import org.eclipse.help.internal.protocols.HelpURLConnection; import org.eclipse.help.internal.search.federated.IndexerJob; @@ -547,10 +548,11 @@ public class ReusableHelpPart implements IHelpUIConstants, } public void setFocus() { - // Focus on the first part that is not the see also links + // Focus on the first part that is not the see also links or missing content link for (int focusPart = 0; focusPart < partRecs.size(); focusPart++) { PartRec rec = (PartRec) partRecs.get(focusPart); - if ( rec.part.getId() != IHelpUIConstants.HV_SEE_ALSO ) { + String partId = rec.part.getId(); + if ( partId != IHelpUIConstants.HV_SEE_ALSO && partId != IHelpUIConstants.HV_MISSING_CONTENT) { rec.part.setFocus(); return; } @@ -747,6 +749,7 @@ public class ReusableHelpPart implements IHelpUIConstants, IHelpUIConstants.IMAGE_HELP_SEARCH); page.setVerticalSpacing(0); page.addPart(HV_SEE_ALSO, false); + page.addPart(HV_MISSING_CONTENT, false); page.addPart(HV_FSEARCH, false); page.addPart(HV_FSEARCH_RESULT, true); pages.add(page); @@ -758,6 +761,7 @@ public class ReusableHelpPart implements IHelpUIConstants, page.setVerticalSpacing(0); page.setHorizontalMargin(0); page.addPart(HV_SEE_ALSO, false); + page.addPart(HV_MISSING_CONTENT, false); page.addPart(HV_SCOPE_SELECT, false); page.addPart(HV_TOPIC_TREE, true); pages.add(page); @@ -788,6 +792,7 @@ public class ReusableHelpPart implements IHelpUIConstants, page.setVerticalSpacing(0); page.setHorizontalMargin(0); page.addPart(HV_SEE_ALSO, false); + page.addPart(HV_MISSING_CONTENT, false); page.addPart(HV_RELATED_TOPICS, true); pages.add(page); @@ -797,6 +802,7 @@ public class ReusableHelpPart implements IHelpUIConstants, IHelpUIConstants.IMAGE_INDEX); page.setVerticalSpacing(0); page.addPart(HV_SEE_ALSO, false); + page.addPart(HV_MISSING_CONTENT, false); page.addPart(HV_SCOPE_SELECT, false); page.addPart(HV_INDEX_TYPEIN, false); page.addPart(HV_INDEX, true); @@ -1190,6 +1196,8 @@ public class ReusableHelpPart implements IHelpUIConstants, part = new IndexPart(parent, mform.getToolkit(), tbm); } else if (id.equals(HV_INDEX_TYPEIN)) { part = new IndexTypeinPart(parent, mform.getToolkit(), tbm); + } else if (id.equals(HV_MISSING_CONTENT)) { + part = new MissingContentPart(parent, mform.getToolkit()); } if (part != null) { mform.addPart(part); @@ -1723,5 +1731,36 @@ public class ReusableHelpPart implements IHelpUIConstants, } return style; } + + public void checkRemoteStatus() { + clearBrowser(); + showURL("/org.eclipse.help.webapp/" + MissingContentManager.REMOTE_STATUS_HELP_VIEW_HREF); //$NON-NLS-1$ + updateStatusLinks(); + } + + public void checkPlaceholderStatus() { + clearBrowser(); + showURL("/org.eclipse.help.webapp/" + MissingContentManager.MISSING_BOOKS_HELP_VIEW_HREF); //$NON-NLS-1$ + updateStatusLinks(); + + } + + private void clearBrowser() { + IHelpPart part = findPart(HV_BROWSER); + if ( part == null ) { + return; + } + BrowserPart browserPart = (BrowserPart) part; + browserPart.clearBrowser(); + } + + private void updateStatusLinks() { + IHelpPart part = findPart(HV_MISSING_CONTENT); + if ( part == null ) { + return; + } + MissingContentPart mcPart = (MissingContentPart) part; + mcPart.updateStatus(); + } } diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchPart.java index 08ad71ac8..acd240910 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchPart.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchPart.java @@ -23,7 +23,6 @@ import org.eclipse.core.runtime.jobs.IJobChangeListener; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.help.HelpSystem; import org.eclipse.help.internal.base.BaseHelpSystem; -import org.eclipse.help.internal.base.remote.RemoteStatusData; import org.eclipse.help.internal.search.federated.FederatedSearchEntry; import org.eclipse.help.internal.search.federated.FederatedSearchJob; import org.eclipse.help.internal.search.federated.LocalHelp; @@ -35,10 +34,8 @@ import org.eclipse.help.ui.internal.IHelpUIConstants; import org.eclipse.help.ui.internal.Messages; import org.eclipse.jface.action.IAction; import org.eclipse.jface.action.IMenuManager; -import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.preference.PreferenceDialog; import org.eclipse.jface.preference.PreferenceManager; -import org.eclipse.jface.resource.JFaceResources; import org.eclipse.osgi.util.NLS; import org.eclipse.swt.SWT; import org.eclipse.swt.events.KeyAdapter; @@ -47,7 +44,6 @@ import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; @@ -65,7 +61,6 @@ import org.eclipse.ui.forms.events.HyperlinkEvent; import org.eclipse.ui.forms.widgets.FormText; import org.eclipse.ui.forms.widgets.FormToolkit; import org.eclipse.ui.forms.widgets.Hyperlink; -import org.eclipse.ui.forms.widgets.ImageHyperlink; import org.eclipse.ui.forms.widgets.Section; import org.eclipse.ui.forms.widgets.TableWrapData; import org.eclipse.ui.forms.widgets.TableWrapLayout; @@ -93,10 +88,6 @@ public class SearchPart extends AbstractFormPart implements IHelpPart, IHelpUICo private static final String HREF_SEARCH_HELP = "/org.eclipse.platform.doc.user/tasks/help_search.htm"; //$NON-NLS-1$ private static boolean SEARCH_HELP_AVAILABLE = false; - - - private ImageHyperlink remoteStatusLink; - private boolean wasHelpUnavailable = false; static { InputStream is = HelpSystem.getHelpContent(HREF_SEARCH_HELP); @@ -268,27 +259,12 @@ public class SearchPart extends AbstractFormPart implements IHelpPart, IHelpUICo createScopeSection(toolkit); - createRemoteStatusLink(toolkit); - // createAlternateQueriesSection(toolkit); toolkit.paintBordersFor(container); jobListener = new JobListener(); Job.getJobManager().addJobChangeListener(jobListener); } - - public boolean isStale() - { - boolean currentAvailability = RemoteStatusData.isAnyRemoteHelpUnavailable(); - - if (wasHelpUnavailable!=currentAvailability) - { - wasHelpUnavailable=currentAvailability; - return true; - } - - return false; - } private void createScopeSection(FormToolkit toolkit) { TableWrapData td; @@ -337,37 +313,6 @@ public class SearchPart extends AbstractFormPart implements IHelpPart, IHelpUICo toolkit.paintBordersFor(detailGroup); } - private void createRemoteStatusLink(FormToolkit toolkit){ - TableWrapData td; - - Image warningImage = JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_WARNING); - - remoteStatusLink = toolkit.createImageHyperlink(container, SWT.NULL); - remoteStatusLink.setText(Messages.remoteHelpUnavailable); - remoteStatusLink.setImage(warningImage); - remoteStatusLink.addHyperlinkListener(new HyperlinkAdapter() { - - public void linkActivated(HyperlinkEvent e) { - doRemoteStatus(); - } - }); - - td = new TableWrapData(); - td.colspan = 2; - td.align = TableWrapData.FILL; - remoteStatusLink.setLayoutData(td); - - if (wasHelpUnavailable = RemoteStatusData.isAnyRemoteHelpUnavailable()) - { - remoteStatusLink.setVisible(true); - } - else - { - remoteStatusLink.dispose(); - } - - } - private void createAlternateQueriesSection(FormToolkit toolkit){ TableWrapData td = new TableWrapData(); @@ -706,10 +651,6 @@ public class SearchPart extends AbstractFormPart implements IHelpPart, IHelpUICo updateMasters(set); } - private void doRemoteStatus() { - SearchPart.this.parent.showURL("org.eclipse.help.webapp/SearchNetworkHelpStatus.html",true); //$NON-NLS-1$ - } - private void doChangeScopeSet() { ScopeSetDialog dialog = new ScopeSetDialog(container.getShell(), scopeSetManager, parent .getEngineManager(), false); @@ -790,10 +731,6 @@ public class SearchPart extends AbstractFormPart implements IHelpPart, IHelpUICo doSearch(searchWordCombo.getText()); } - if(RemoteStatusData.isAnyRemoteHelpUnavailable()) - createRemoteStatusLink(toolkit); - else - remoteStatusLink.dispose(); } public String getId() { |