当前位置: 首页>>代码示例>>Java>>正文


Java JavaUI.getLibraryJavadocLocation方法代码示例

本文整理汇总了Java中org.eclipse.jdt.ui.JavaUI.getLibraryJavadocLocation方法的典型用法代码示例。如果您正苦于以下问题:Java JavaUI.getLibraryJavadocLocation方法的具体用法?Java JavaUI.getLibraryJavadocLocation怎么用?Java JavaUI.getLibraryJavadocLocation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.jdt.ui.JavaUI的用法示例。


在下文中一共展示了JavaUI.getLibraryJavadocLocation方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: configureJavadocLocation

import org.eclipse.jdt.ui.JavaUI; //导入方法依赖的package包/类
/**
 * Shows the UI for configuring a javadoc location attribute of the classpath entry. <code>null</code> is returned
 * if the user cancels the dialog. The dialog does not apply any changes.
 *
 * @param shell The parent shell for the dialog.
 * @param initialEntry The entry to edit. The kind of the classpath entry must be either
 * <code>IClasspathEntry.CPE_LIBRARY</code> or <code>IClasspathEntry.CPE_VARIABLE</code>.
 * @return Returns the resulting classpath entry containing a potentially modified javadoc location attribute
 * The resulting entry can be used to replace the original entry on the classpath.
 * Note that the dialog does not make any changes on the passed entry nor on the classpath that
 * contains it.
 *
 * @since 3.1
 */
public static IClasspathEntry configureJavadocLocation(Shell shell, IClasspathEntry initialEntry) {
	if (initialEntry == null) {
		throw new IllegalArgumentException();
	}
	int entryKind= initialEntry.getEntryKind();
	if (entryKind != IClasspathEntry.CPE_LIBRARY && entryKind != IClasspathEntry.CPE_VARIABLE) {
		throw new IllegalArgumentException();
	}

	URL location= JavaUI.getLibraryJavadocLocation(initialEntry);
	JavadocLocationDialog dialog=  new JavadocLocationDialog(shell, BasicElementLabels.getPathLabel(initialEntry.getPath(), false), location);
	if (dialog.open() == Window.OK) {
		CPListElement element= CPListElement.createFromExisting(initialEntry, null);
		URL res= dialog.getResult();
		element.setAttribute(CPListElement.JAVADOC, res != null ? res.toExternalForm() : null);
		return element.getClasspathEntry();
	}
	return null;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:34,代码来源:BuildPathDialogAccess.java

示例2: getURL

import org.eclipse.jdt.ui.JavaUI; //导入方法依赖的package包/类
public URL getURL() {
	if (isProjectRef()) {
		return JavaUI.getProjectJavadocLocation(fProject);
	} else {
		return JavaUI.getLibraryJavadocLocation(fClasspathEntry);
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:8,代码来源:JavadocLinkRef.java


注:本文中的org.eclipse.jdt.ui.JavaUI.getLibraryJavadocLocation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。