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


Java CPListElement.getEntryKind方法代码示例

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


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

示例1: containsSourceFolders

import org.eclipse.jdt.internal.ui.wizards.buildpaths.CPListElement; //导入方法依赖的package包/类
private static boolean containsSourceFolders(CPJavaProject cpProject) {
	List<CPListElement> elements= cpProject.getCPListElements();
	for (Iterator<CPListElement> iterator= elements.iterator(); iterator.hasNext();) {
     CPListElement element= iterator.next();
     if (element.getEntryKind() == IClasspathEntry.CPE_SOURCE)
     	return true;
    }
 return false;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:10,代码来源:ClasspathModifier.java

示例2: getListElement

import org.eclipse.jdt.internal.ui.wizards.buildpaths.CPListElement; //导入方法依赖的package包/类
/**
 * For a given path, find the corresponding element in the list.
 *
 * @param path the path to found an entry for
 * @param elements a list of <code>CPListElement</code>s
 * @return the matched <code>CPListElement</code> or <code>null</code> if
 * no match could be found
 */
public static CPListElement getListElement(IPath path, List<CPListElement> elements) {
	for (int i= 0; i < elements.size(); i++) {
		CPListElement element= elements.get(i);
		if (element.getEntryKind() == IClasspathEntry.CPE_SOURCE && element.getPath().equals(path)) {
			return element;
		}
	}
	return null;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:18,代码来源:ClasspathModifier.java

示例3: isExternalArchiveOrLibrary

import org.eclipse.jdt.internal.ui.wizards.buildpaths.CPListElement; //导入方法依赖的package包/类
private static boolean isExternalArchiveOrLibrary(CPListElement entry) {
	if (entry.getEntryKind() == IClasspathEntry.CPE_LIBRARY || entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER) {
		if (entry.getResource() instanceof IFolder) {
			return false;
		}
		return true;
	}
	return false;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:10,代码来源:ClasspathModifier.java

示例4: findElement

import org.eclipse.jdt.internal.ui.wizards.buildpaths.CPListElement; //导入方法依赖的package包/类
private static CPListElement findElement(IJavaElement element, CPListElement[] elements) {
	IPath path= element.getPath();
	for (int i= 0; i < elements.length; i++) {
		CPListElement cur= elements[i];
		if (cur.getEntryKind() == IClasspathEntry.CPE_SOURCE && cur.getPath().equals(path)) {
			return cur;
		}
	}
	return null;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:11,代码来源:EditFilterAction.java

示例5: doUpdateUI

import org.eclipse.jdt.internal.ui.wizards.buildpaths.CPListElement; //导入方法依赖的package包/类
private void doUpdateUI() {
      fPackageExplorer.setInput(fJavaProject);

boolean useFolderOutputs= false;
List<CPListElement> cpelements= fClassPathList.getElements();
for (int i= 0; i < cpelements.size() && !useFolderOutputs; i++) {
	CPListElement cpe= cpelements.get(i);
	if (cpe.getEntryKind() == IClasspathEntry.CPE_SOURCE) {
		if (cpe.getAttribute(CPListElement.OUTPUT) != null) {
			useFolderOutputs= true;
		}
	}
}
fUseFolderOutputs.setSelection(useFolderOutputs);
  }
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:16,代码来源:NewSourceContainerWorkbookPage.java

示例6: getClasspathEntry

import org.eclipse.jdt.internal.ui.wizards.buildpaths.CPListElement; //导入方法依赖的package包/类
/**
 * Try to find the corresponding and modified <code>CPListElement</code> for the root
 * in the list of elements and return it.
 * If no one can be found, the roots <code>ClasspathEntry</code> is converted to a
 * <code>CPListElement</code> and returned.
 *
 * @param elements a list of <code>CPListElements</code>
 * @param root the root to find the <code>ClasspathEntry</code> for represented by
 * a <code>CPListElement</code>
 * @return the <code>CPListElement</code> found in the list (matching by using the path) or
 * the roots own <code>IClasspathEntry</code> converted to a <code>CPListElement</code>.
 * @throws JavaModelException
 */
public static CPListElement getClasspathEntry(List<CPListElement> elements, IPackageFragmentRoot root) throws JavaModelException {
	IClasspathEntry entry= root.getRawClasspathEntry();
	for (int i= 0; i < elements.size(); i++) {
		CPListElement element= elements.get(i);
		if (element.getPath().equals(root.getPath()) && element.getEntryKind() == entry.getEntryKind())
			return elements.get(i);
	}
	CPListElement newElement= CPListElement.createFromExisting(entry, root.getJavaProject());
	elements.add(newElement);
	return newElement;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:25,代码来源:ClasspathModifier.java


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