本文整理汇总了Java中org.eclipse.jdt.core.IClasspathEntry.isExported方法的典型用法代码示例。如果您正苦于以下问题:Java IClasspathEntry.isExported方法的具体用法?Java IClasspathEntry.isExported怎么用?Java IClasspathEntry.isExported使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jdt.core.IClasspathEntry
的用法示例。
在下文中一共展示了IClasspathEntry.isExported方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fixBackofficeJars
import org.eclipse.jdt.core.IClasspathEntry; //导入方法依赖的package包/类
/**
* Make sure all the relevant backoffice jars are exported
*
* @param monitor
* @param javaProject
* @throws JavaModelException
*/
private void fixBackofficeJars(IProgressMonitor monitor, IJavaProject javaProject) throws JavaModelException
{
if (javaProject.getProject().getName().equalsIgnoreCase("backoffice"))
{
List<IClasspathEntry> entries = new LinkedList<IClasspathEntry>();
IClasspathEntry[] classPathEntries = javaProject.getRawClasspath();
boolean change = false;
for (IClasspathEntry classpathEntry : classPathEntries) {
// fix jar files
if (classpathEntry.getEntryKind() == IClasspathEntry.CPE_LIBRARY) {
if (classpathEntry.getPath().toString().contains("/backoffice/web/webroot/WEB-INF/lib/backoffice-core-") ||
classpathEntry.getPath().toString().contains("/backoffice/web/webroot/WEB-INF/lib/backoffice-widgets-") ||
classpathEntry.getPath().toString().contains("/backoffice/web/webroot/WEB-INF/lib/cockpitframework-") ||
classpathEntry.getPath().toString().contains("/backoffice/web/webroot/WEB-INF/lib/cockpitcore-") ||
classpathEntry.getPath().toString().contains("/backoffice/web/webroot/WEB-INF/lib/cockpittesting-") ||
classpathEntry.getPath().toString().contains("/backoffice/web/webroot/WEB-INF/lib/cockpitwidgets-") ||
classpathEntry.getPath().toString().contains("/backoffice/web/webroot/WEB-INF/lib/cockpit-") ||
classpathEntry.getPath().toString().contains("/backoffice/web/webroot/WEB-INF/lib/zk") ||
classpathEntry.getPath().toString().contains("/backoffice/web/webroot/WEB-INF/lib/zul-") ||
classpathEntry.getPath().toString().contains("/backoffice/web/webroot/WEB-INF/lib/zcommon-"))
{
if (!classpathEntry.isExported())
{
change = true;
IClasspathEntry clonedEntry = JavaCore.newLibraryEntry(classpathEntry.getPath(), classpathEntry.getSourceAttachmentPath(), classpathEntry.getSourceAttachmentRootPath(), classpathEntry.getAccessRules(), classpathEntry.getExtraAttributes(), true);
entries.add(clonedEntry);
continue;
}
}
}
entries.add(classpathEntry);
}
if (change)
{
FixProjectsUtils.setClasspath(entries.toArray(new IClasspathEntry[entries.size()]), javaProject, monitor);
}
}
}