* specified URL
*/
public void showFunctionHelp(String url) {
IWorkbenchBrowserSupport browserSupport = PlatformUI.getWorkbench()
.getBrowserSupport();
IWebBrowser browser;
try {
IPreferenceStore store = PHPUiPlugin.getDefault()
.getPreferenceStore();
if (store
.getBoolean(PreferenceConstants.PHP_MANUAL_OPEN_IN_NEW_BROWSER)) {
browser = browserSupport.createBrowser(BROWSER_ID
+ ++browserCount);
} else {
browser = browserSupport.createBrowser(BROWSER_ID);
}
if (url.startsWith("mk:")) { //$NON-NLS-1$
browser.openURL(new URL(null, url, new MkHandler()));
} else if (url.startsWith("help://")) { //$NON-NLS-1$
// convert to help system URL
String helpURL = url.substring("help://".length()); //$NON-NLS-1$
// open in Help System
PlatformUI.getWorkbench().getHelpSystem()
.displayHelpResource(helpURL);
} else {
URL url2 = validateUrlExists(url);
if (null == url2) {
// need to open some kind of err dialog and return
MessageDialog d = new MessageDialog(PlatformUI
.getWorkbench().getActiveWorkbenchWindow()
.getShell(), PHPUIMessages.PHPManual_title, null,
PHPUIMessages.PHPManual_noManual_msg,
MessageDialog.INFORMATION,
new String[] { IDialogConstants.OK_LABEL }, 0);
d.open();
return;
}
browser.openURL(url2);
}
} catch (PartInitException e) {
Logger.logException(e);
} catch (MalformedURLException e) {