本文整理汇总了Java中org.eclipse.jdt.core.IJavaElementDelta.F_ADDED_TO_CLASSPATH属性的典型用法代码示例。如果您正苦于以下问题:Java IJavaElementDelta.F_ADDED_TO_CLASSPATH属性的具体用法?Java IJavaElementDelta.F_ADDED_TO_CLASSPATH怎么用?Java IJavaElementDelta.F_ADDED_TO_CLASSPATH使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.jdt.core.IJavaElementDelta
的用法示例。
在下文中一共展示了IJavaElementDelta.F_ADDED_TO_CLASSPATH属性的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getJavaProjectsWithClasspathChange
private Set<IJavaProject> getJavaProjectsWithClasspathChange(IJavaElementDelta delta) {
IJavaElement element = delta.getElement();
if (element instanceof IPackageFragmentRoot) {
IPackageFragmentRoot root = (IPackageFragmentRoot) element;
if (delta.getKind() == IJavaElementDelta.REMOVED || delta.getKind() == IJavaElementDelta.ADDED
|| (delta.getFlags() & IJavaElementDelta.F_REORDER) != 0
|| (delta.getFlags() & IJavaElementDelta.F_REMOVED_FROM_CLASSPATH) != 0
|| (delta.getFlags() & IJavaElementDelta.F_ADDED_TO_CLASSPATH) != 0
|| (root.isExternal() && (delta.getFlags() & // external folders change
(IJavaElementDelta.F_CONTENT | IJavaElementDelta.F_SOURCEATTACHED | IJavaElementDelta.F_SOURCEDETACHED)) == delta
.getFlags())) {
return Collections.singleton(root.getJavaProject());
}
} else if (element instanceof IJavaModel) {
return getPackageFragmentRootDeltas(delta.getAffectedChildren());
} else if (element instanceof IJavaProject) {
if ((delta.getFlags() & IJavaElementDelta.F_CLASSPATH_CHANGED) != 0
|| (delta.getFlags() & IJavaElementDelta.F_RESOLVED_CLASSPATH_CHANGED) != 0)
return Collections.singleton((IJavaProject) element);
return getPackageFragmentRootDeltas(delta.getAffectedChildren());
}
return Collections.emptySet();
}
示例2: isAffectingPackageFragmentRoots
private boolean isAffectingPackageFragmentRoots(IJavaElementDelta delta) {
IJavaElement element = delta.getElement();
if (element instanceof IPackageFragmentRoot) {
if (delta.getKind() == IJavaElementDelta.REMOVED
|| delta.getKind() == IJavaElementDelta.ADDED
|| (delta.getFlags() & IJavaElementDelta.F_REORDER) != 0
|| (delta.getFlags() & IJavaElementDelta.F_REMOVED_FROM_CLASSPATH) != 0
|| (delta.getFlags() & IJavaElementDelta.F_ADDED_TO_CLASSPATH) != 0
|| (((IPackageFragmentRoot) element).isExternal() && (delta.getFlags() & // external folders change
(IJavaElementDelta.F_CONTENT
| IJavaElementDelta.F_SOURCEATTACHED
| IJavaElementDelta.F_SOURCEDETACHED)) == delta.getFlags())) {
return true;
}
} else if (element instanceof IJavaModel) {
return isAffectingPackageFragmentRoots(delta.getAffectedChildren());
} else if (element instanceof IJavaProject) {
if ((delta.getFlags() & IJavaElementDelta.F_CLASSPATH_CHANGED) != 0 ||
(delta.getFlags() & IJavaElementDelta.F_RESOLVED_CLASSPATH_CHANGED) != 0)
return true;
return isAffectingPackageFragmentRoots(delta.getAffectedChildren());
}
return false;
}
示例3: isClasspathChangeFlag
/**
* Do the flags indicate a classpath change?
* @param flags the flags to inspect
* @return true if the flag flags a classpath change
*/
private boolean isClasspathChangeFlag(int flags) {
if ((flags & IJavaElementDelta.F_RESOLVED_CLASSPATH_CHANGED) != 0)
return true;
if ((flags & IJavaElementDelta.F_ADDED_TO_CLASSPATH) != 0)
return true;
if ((flags & IJavaElementDelta.F_REMOVED_FROM_CLASSPATH) != 0)
return true;
if ((flags & IJavaElementDelta.F_ARCHIVE_CONTENT_CHANGED) != 0)
return true;
return false;
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:20,代码来源:SWTTemplateCompletionProposalComputer.java
示例4: isClasspathChangeFlag
/**
* Do the flags indicate a classpath change?
*
* @param flags the flags to inspect
* @return true if the flag flags a classpath change
*/
private boolean isClasspathChangeFlag(int flags) {
if ((flags & IJavaElementDelta.F_RESOLVED_CLASSPATH_CHANGED) != 0) {
return true;
}
if ((flags & IJavaElementDelta.F_ADDED_TO_CLASSPATH) != 0) {
return true;
}
if ((flags & IJavaElementDelta.F_REMOVED_FROM_CLASSPATH) != 0) {
return true;
}
if ((flags & IJavaElementDelta.F_ARCHIVE_CONTENT_CHANGED) != 0) {
return true;
}
return false;
}
示例5: isClassPathChange
/**
* Tests if the a Java element delta contains a class path change
*
* @param delta the Java element delta
* @return returns <code>true</code> if the delta contains a class path change
*/
protected boolean isClassPathChange(IJavaElementDelta delta) {
// need to test the flags only for package fragment roots
if (delta.getElement().getElementType() != IJavaElement.PACKAGE_FRAGMENT_ROOT) return false;
int flags = delta.getFlags();
return (delta.getKind() == IJavaElementDelta.CHANGED
&& ((flags & IJavaElementDelta.F_ADDED_TO_CLASSPATH) != 0)
|| ((flags & IJavaElementDelta.F_REMOVED_FROM_CLASSPATH) != 0)
|| ((flags & IJavaElementDelta.F_REORDER) != 0));
}
示例6: isClassPathChange
/**
* Tests if the a Java element delta contains a class path change
*
* @param delta the Java element delta
* @return returns <code>true</code> if the delta contains a class path change
*/
protected boolean isClassPathChange(IJavaElementDelta delta) {
// need to test the flags only for package fragment roots
if (delta.getElement().getElementType() != IJavaElement.PACKAGE_FRAGMENT_ROOT)
return false;
int flags= delta.getFlags();
return (delta.getKind() == IJavaElementDelta.CHANGED &&
((flags & IJavaElementDelta.F_ADDED_TO_CLASSPATH) != 0) ||
((flags & IJavaElementDelta.F_REMOVED_FROM_CLASSPATH) != 0) ||
((flags & IJavaElementDelta.F_REORDER) != 0));
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:18,代码来源:StandardJavaElementContentProvider.java
示例7: processDelta
@Override
protected void processDelta(IJavaElementDelta delta, List<IJavaElement> result) {
IJavaElement elem= delta.getElement();
boolean isChanged= delta.getKind() == IJavaElementDelta.CHANGED;
boolean isRemoved= delta.getKind() == IJavaElementDelta.REMOVED;
int flags= delta.getFlags();
switch (elem.getElementType()) {
case IJavaElement.JAVA_MODEL:
processChildrenDelta(delta, result);
return;
case IJavaElement.JAVA_PROJECT:
if (isRemoved || (isChanged &&
(flags & IJavaElementDelta.F_CLOSED) != 0)) {
return;
}
processChildrenDelta(delta, result);
return;
case IJavaElement.PACKAGE_FRAGMENT_ROOT:
if (isRemoved) {
return;
}
try {
if ((((flags & IJavaElementDelta.F_REMOVED_FROM_CLASSPATH) != 0) ||
((flags & IJavaElementDelta.F_ADDED_TO_CLASSPATH) != 0))
&& ((IPackageFragmentRoot)elem).getKind() != IPackageFragmentRoot.K_SOURCE) {
result.add(elem);
}
} catch (JavaModelException e) {
// don't update
}
return;
default:
return;
}
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:37,代码来源:BuildpathIndicatorLabelDecorator.java
示例8: isClassPathChange
protected boolean isClassPathChange(IJavaElementDelta delta) {
// need to test the flags only for package fragment roots
if (delta.getElement().getElementType() != IJavaElement.PACKAGE_FRAGMENT_ROOT)
return false;
int flags= delta.getFlags();
return (delta.getKind() == IJavaElementDelta.CHANGED &&
((flags & IJavaElementDelta.F_ADDED_TO_CLASSPATH) != 0) ||
((flags & IJavaElementDelta.F_REMOVED_FROM_CLASSPATH) != 0) ||
((flags & IJavaElementDelta.F_REORDER) != 0));
}