} catch (JavaModelException e) {
WojPlugin.log("Error while getting user set javadoc url for:"+element, e); //$NON-NLS-1$
}
try {
String jarPath = PDEJavaModelUtil.getContainingJarPath(element);
ModuleInfo moduleInfo = WojServicesHelper.getDefault().getModuleInfo(jarPath);
if(moduleInfo == null || !moduleInfo.isKnown()) {
LOGGER.debug("module is unknow");//$NON-NLS-1$
MessageDialogWithToggle dialogWithToggle = MessageDialogWithToggle.openYesNoQuestion(shell, Messages.getString("javadoc.addmodule.title"), Messages.getString("javadoc.addmodule.message"), Messages.getString("javadoc.addmodule.toggle.message"), false, WojPlugin.getDefault().getPreferenceStore(), PreferenceConstants.ASK_ADDMODULE_FROM_JAVADOC); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
int response = dialogWithToggle.getReturnCode();
if(response == MessageDialogWithToggle.OK || response == 2) {//seems that return value is 2 for ok instaed of 0
AddModule.showAddModuleDialog(jarPath);
}
} else if(!moduleInfo.hasJavadoc()) {
LOGGER.debug("module has no javadoc");//$NON-NLS-1$
MessageDialog.openWarning(shell, Messages.getString("javadoc.nodoc.title"), Messages.getString("javadoc.nodoc.message", moduleInfo)); //$NON-NLS-1$ //$NON-NLS-2$
} else {
String docBase = getJavadocLocation("", element, false); //$NON-NLS-1$
String member = getMember(element);